OSDN Git Service

* config/mips/mips.c (TARGET_SMALL_REGISTER_CLASSES_FOR_MODE_P): Undef.
[pf3gnuchains/gcc-fork.git] / fixincludes / server.c
index 902fda1..1e50efc 100644 (file)
@@ -17,8 +17,8 @@
  *  You should have received a copy of the GNU General Public License
  *  along with Server Handling.  See the file "COPYING".  If not,
  *  write to:  The Free Software Foundation, Inc.,
- *             59 Temple Place - Suite 330,
- *             Boston,  MA  02111-1307, USA.
+ *             51 Franklin Street, Fifth Floor,
+ *             Boston,  MA  02110-1301, USA.
  *
  * As a special exception, The Free Software Foundation gives
  * permission for additional uses of the text contained in his release
@@ -83,7 +83,7 @@ load_data (FILE* fp)
   t_bool got_done = BOOL_FALSE;
 
   text_size = sizeof (z_line) * 2;
-  pz_scan = pz_text = xmalloc (text_size);
+  pz_scan = pz_text = XNEWVEC (char, text_size);
 
   for (;;)
     {
@@ -109,7 +109,7 @@ load_data (FILE* fp)
           size_t off = (size_t) (pz_scan - pz_text);
          
           text_size += 4096;
-          pz_text = xrealloc (pz_text, text_size);
+          pz_text = XRESIZEVEC (char, pz_text, text_size);
           pz_scan = pz_text + off;
         }
     }
@@ -124,7 +124,7 @@ load_data (FILE* fp)
   while ((pz_scan > pz_text) && ISSPACE (pz_scan[-1]))
     pz_scan--;
   *pz_scan = NUL;
-  return xrealloc (pz_text, strlen (pz_text) + 1);
+  return XRESIZEVEC (char, pz_text, strlen (pz_text) + 1);
 }
 
 
@@ -260,13 +260,13 @@ run_shell (const char* pz_cmd)
   if (server_id <= 0)
     {
       fprintf (stderr, zNoServer, pz_cmd);
-      return xcalloc (1, 1);
+      return XCNEW (char);
     }
 
   /*  Make sure the process will pay attention to us, send the
      supplied command, and then have it output a special marker that
      we can find.  */
-  fprintf (server_pair.pf_write, "cd %s\n%s\n\necho\necho %s\n",
+  fprintf (server_pair.pf_write, "cd \"%s\"\n%s\n\necho\necho %s\n",
            p_cur_dir, pz_cmd, z_done);
   fflush (server_pair.pf_write);
 
@@ -275,7 +275,7 @@ run_shell (const char* pz_cmd)
   if (server_id == NULLPROCESS)
     {
       fprintf (stderr, zNoServer, pz_cmd);
-      return xcalloc (1, 1);
+      return XCNEW (char);
     }
 
   /*  Now try to read back all the data.  If we fail due to either a
@@ -295,7 +295,7 @@ run_shell (const char* pz_cmd)
 
         fprintf (stderr, "CLOSING SHELL SERVER - command failure:\n\t%s\n",
                  pz_cmd);
-        pz = xcalloc (1, 1);
+        pz = XCNEW (char);
       }
 #ifdef DEBUG
     fprintf( stderr, "run_shell command success:  %s\n", pz );