/[meta-cvs]/meta-cvs/F-83F0E6A90D5BBCDFB58440970E850925.c
ViewVC logotype

Diff of /meta-cvs/F-83F0E6A90D5BBCDFB58440970E850925.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.15 by kaz, Sat Dec 11 07:58:05 2004 UTC revision 1.16 by kaz, Fri Jun 24 07:22:53 2005 UTC
# Line 236  char *mcvs_ctermid(void) Line 236  char *mcvs_ctermid(void)
236      return 0;      return 0;
237    return ctermid(buf);    return ctermid(buf);
238  }  }
239    
240    /*
241     * Main function. We arrange this by a hack; when we build the
242     * Lisp image, we rename the main function in the lisp.a archive
243     * to clisp_main using the objcopy utility. Then we can have our
244     * own main. See lisp.sh file.
245     */
246    
247    int main(int argc, char **argv)
248    {
249      extern int clisp_main(int argc, char **argv);
250      int new_argc = argc + 2;
251      char **new_argv = malloc(sizeof *new_argv * (new_argc + 1));
252      int i;
253      char E_option[] = "-Eforeign";
254      char E_arg[] = "iso-8859-1";
255      int retcode;
256    
257      if (argv == 0) {
258        fprintf(stderr, "%s: out of memory\n", argv[0]);
259        return EXIT_FAILURE;
260      }
261    
262      new_argv[0] = argv[0];
263      new_argv[1] = E_option;
264      new_argv[2] = E_arg;
265      memcpy(&new_argv[3], &argv[1], sizeof argv[1] * (argc - 1));
266      new_argv[new_argc] = 0;
267    
268      retcode = clisp_main(new_argc, new_argv);
269    
270      free(new_argv);
271    
272      return retcode;
273    }

Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

  ViewVC Help
Powered by ViewVC 1.1.5