Mercurial > hg > xemacs-beta
comparison src/emacs.c @ 265:8efd647ea9ca r20-5b31
Import from CVS: tag r20-5b31
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:25:37 +0200 |
parents | 727739f917cb |
children | 966663fcf606 |
comparison
equal
deleted
inserted
replaced
264:682d2a9d41a5 | 265:8efd647ea9ca |
---|---|
331 /* Do not trust to what crt0 has stuffed into argv[0] */ | 331 /* Do not trust to what crt0 has stuffed into argv[0] */ |
332 char full_exe_path [MAX_PATH]; | 332 char full_exe_path [MAX_PATH]; |
333 GetModuleFileName (NULL, full_exe_path, MAX_PATH); | 333 GetModuleFileName (NULL, full_exe_path, MAX_PATH); |
334 result = Fcons (build_ext_string (full_exe_path, FORMAT_FILENAME), | 334 result = Fcons (build_ext_string (full_exe_path, FORMAT_FILENAME), |
335 result); | 335 result); |
336 #if defined(HAVE_SHLIB) | |
337 (void)dll_init(full_exe_path); | |
338 #endif | |
336 } | 339 } |
337 else | 340 else |
338 #endif | 341 #endif |
339 result = Fcons (build_ext_string (argv [i], FORMAT_FILENAME), result); | 342 result = Fcons (build_ext_string (argv [i], FORMAT_FILENAME), result); |
340 } | 343 } |
842 #ifdef HAVE_DIALOGS | 845 #ifdef HAVE_DIALOGS |
843 syms_of_dialog (); | 846 syms_of_dialog (); |
844 #endif | 847 #endif |
845 syms_of_dired (); | 848 syms_of_dired (); |
846 #ifdef HAVE_SHLIB | 849 #ifdef HAVE_SHLIB |
847 syms_of_dlopen (); | 850 syms_of_dll (); |
848 #endif | 851 #endif |
849 syms_of_doc (); | 852 syms_of_doc (); |
850 syms_of_editfns (); | 853 syms_of_editfns (); |
851 syms_of_elhash (); | 854 syms_of_elhash (); |
852 syms_of_emacs (); | 855 syms_of_emacs (); |
1529 init_hpplay (); | 1532 init_hpplay (); |
1530 #endif | 1533 #endif |
1531 #ifdef HAVE_TTY | 1534 #ifdef HAVE_TTY |
1532 init_device_tty (); | 1535 init_device_tty (); |
1533 #endif | 1536 #endif |
1534 #ifdef HAVE_GIF | |
1535 init_gif_err (); | |
1536 #endif | |
1537 init_console_stream (); /* Create the first console */ | 1537 init_console_stream (); /* Create the first console */ |
1538 | 1538 |
1539 /* try to get the actual pathname of the exec file we are running */ | 1539 /* try to get the actual pathname of the exec file we are running */ |
1540 if (!restart) | 1540 if (!restart) |
1541 { | 1541 { |
1560 Vinvocation_directory = Vinvocation_name; | 1560 Vinvocation_directory = Vinvocation_name; |
1561 | 1561 |
1562 Vinvocation_name = Ffile_name_nondirectory (Vinvocation_directory); | 1562 Vinvocation_name = Ffile_name_nondirectory (Vinvocation_directory); |
1563 Vinvocation_directory = Ffile_name_directory (Vinvocation_directory); | 1563 Vinvocation_directory = Ffile_name_directory (Vinvocation_directory); |
1564 } | 1564 } |
1565 | |
1566 #if defined(HAVE_SHLIB) && !defined(WINDOWSNT) | |
1567 /* This is Unix only. MS Windows NT has a library call that does | |
1568 The Right Thing on that system. Rumor has it, this must be | |
1569 called for GNU dld in temacs and xemacs. */ | |
1570 { | |
1571 char *buf = (char *)alloca (XSTRING_LENGTH (Vinvocation_directory) | |
1572 + XSTRING_LENGTH (Vinvocation_name) | |
1573 + 2); | |
1574 sprintf (buf, "%s/%s", XSTRING_DATA(Vinvocation_directory), | |
1575 XSTRING_DATA(Vinvocation_name)); | |
1576 | |
1577 /* All we can do is cry if an error happens, so ignore it. */ | |
1578 (void)dll_init(buf); | |
1579 } | |
1580 #endif | |
1565 | 1581 |
1566 #if defined (LOCALTIME_CACHE) && defined (HAVE_TZSET) | 1582 #if defined (LOCALTIME_CACHE) && defined (HAVE_TZSET) |
1567 /* sun's localtime() has a bug. it caches the value of the time | 1583 /* sun's localtime() has a bug. it caches the value of the time |
1568 zone rather than looking it up every time. Since localtime() is | 1584 zone rather than looking it up every time. Since localtime() is |
1569 called to bolt the undumping time into the undumped emacs, this | 1585 called to bolt the undumping time into the undumped emacs, this |
2353 | 2369 |
2354 #ifndef SEPCHAR | 2370 #ifndef SEPCHAR |
2355 #define SEPCHAR ':' | 2371 #define SEPCHAR ':' |
2356 #endif | 2372 #endif |
2357 | 2373 |
2374 DEFUN ("parse-colon-path", Fparse_colon_path, 1, 1, 0, /* | |
2375 Explode a colon-separated list of paths into a string list. | |
2376 */ | |
2377 (cd_path)) | |
2378 { | |
2379 CHECK_STRING (cd_path); | |
2380 | |
2381 return decode_path(XSTRING_DATA(cd_path)); | |
2382 } | |
2383 | |
2358 Lisp_Object | 2384 Lisp_Object |
2359 decode_path (CONST char *path) | 2385 decode_path (CONST char *path) |
2360 { | 2386 { |
2361 REGISTER CONST char *p; | 2387 REGISTER CONST char *p; |
2362 Lisp_Object lpath = Qnil; | 2388 Lisp_Object lpath = Qnil; |
2370 while (1) | 2396 while (1) |
2371 { | 2397 { |
2372 p = strchr (path, SEPCHAR); | 2398 p = strchr (path, SEPCHAR); |
2373 if (!p) p = path + strlen (path); | 2399 if (!p) p = path + strlen (path); |
2374 lpath = Fcons (((p != path) | 2400 lpath = Fcons (((p != path) |
2375 ? make_string ((CONST Bufbyte *) path, p - path) | 2401 #if 0 |
2376 : Qnil), | 2402 ? Ffile_name_as_directory(make_string ((CONST Bufbyte *) path, p - path)) |
2377 lpath); | 2403 #else |
2404 ? make_string ((CONST Bufbyte *) path, p - path) | |
2405 #endif | |
2406 : Qnil), | |
2407 lpath); | |
2378 if (*p) | 2408 if (*p) |
2379 path = p + 1; | 2409 path = p + 1; |
2380 else | 2410 else |
2381 break; | 2411 break; |
2382 } | 2412 } |
2479 #ifdef QUANTIFY | 2509 #ifdef QUANTIFY |
2480 DEFSUBR (Fquantify_start_recording_data); | 2510 DEFSUBR (Fquantify_start_recording_data); |
2481 DEFSUBR (Fquantify_stop_recording_data); | 2511 DEFSUBR (Fquantify_stop_recording_data); |
2482 DEFSUBR (Fquantify_clear_data); | 2512 DEFSUBR (Fquantify_clear_data); |
2483 #endif /* QUANTIFY */ | 2513 #endif /* QUANTIFY */ |
2514 | |
2515 DEFSUBR (Fparse_colon_path); | |
2484 | 2516 |
2485 defsymbol (&Qkill_emacs_hook, "kill-emacs-hook"); | 2517 defsymbol (&Qkill_emacs_hook, "kill-emacs-hook"); |
2486 defsymbol (&Qsave_buffers_kill_emacs, "save-buffers-kill-emacs"); | 2518 defsymbol (&Qsave_buffers_kill_emacs, "save-buffers-kill-emacs"); |
2487 } | 2519 } |
2488 | 2520 |