comparison src/callproc.c @ 439:350065270fc8

*** empty log message ***
author Jim Blandy <jimb@redhat.com>
date Wed, 04 Dec 1991 05:48:56 +0000
parents 9e60d5c117db
children 8b101799ff37
comparison
equal deleted inserted replaced
438:8b54ee2c82d6 439:350065270fc8
55 extern char **environ; 55 extern char **environ;
56 #endif 56 #endif
57 57
58 #define max(a, b) ((a) > (b) ? (a) : (b)) 58 #define max(a, b) ((a) > (b) ? (a) : (b))
59 59
60 Lisp_Object Vexec_path, Vexec_directory; 60 Lisp_Object Vexec_path, Vexec_directory, Vdata_directory;
61 61
62 Lisp_Object Vshell_file_name; 62 Lisp_Object Vshell_file_name;
63 63
64 #ifndef MAINTAIN_ENVIRONMENT 64 #ifndef MAINTAIN_ENVIRONMENT
65 /* List of strings to append to front of environment of 65 /* List of strings to append to front of environment of
446 446
447 init_callproc () 447 init_callproc ()
448 { 448 {
449 register char * sh; 449 register char * sh;
450 register char **envp; 450 register char **envp;
451 Lisp_Object execdir; 451 Lisp_Object tempdir;
452
453 Vdata_directory = Ffile_name_as_directory (build_string (PATH_DATA));
452 454
453 /* Turn PATH_EXEC into a path. `==' is just a string which we know 455 /* Turn PATH_EXEC into a path. `==' is just a string which we know
454 will not be the name of an environment variable. */ 456 will not be the name of an environment variable. */
455 Vexec_path = decode_env_path ("==", PATH_EXEC); 457 Vexec_path = decode_env_path ("==", PATH_EXEC);
456 Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path)); 458 Vexec_directory = Ffile_name_as_directory (Fcar (Vexec_path));
457 Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path); 459 Vexec_path = nconc2 (decode_env_path ("PATH", ""), Vexec_path);
458 460
459 execdir = Fdirectory_file_name (Vexec_directory); 461 tempdir = Fdirectory_file_name (Vexec_directory);
460 if (access (XSTRING (execdir)->data, 0) < 0) 462 if (access (XSTRING (tempdir)->data, 0) < 0)
461 { 463 {
462 printf ("Warning: executable/documentation dir (%s) does not exist.\n", 464 printf ("Warning: arch-dependent data dir (%s) does not exist.\n",
463 XSTRING (Vexec_directory)->data); 465 XSTRING (Vexec_directory)->data);
466 sleep (2);
467 }
468
469 tempdir = Fdirectory_file_name (Vdata_directory);
470 if (access (XSTRING (tempdir)->data, 0) < 0)
471 {
472 printf ("Warning: arch-independent data dir (%s) does not exist.\n",
473 XSTRING (Vdata_directory)->data);
464 sleep (2); 474 sleep (2);
465 } 475 }
466 476
467 #ifdef VMS 477 #ifdef VMS
468 Vshell_file_name = build_string ("*dcl*"); 478 Vshell_file_name = build_string ("*dcl*");
493 DEFVAR_LISP ("exec-path", &Vexec_path, 503 DEFVAR_LISP ("exec-path", &Vexec_path,
494 "*List of directories to search programs to run in subprocesses.\n\ 504 "*List of directories to search programs to run in subprocesses.\n\
495 Each element is a string (directory name) or nil (try default directory)."); 505 Each element is a string (directory name) or nil (try default directory).");
496 506
497 DEFVAR_LISP ("exec-directory", &Vexec_directory, 507 DEFVAR_LISP ("exec-directory", &Vexec_directory,
498 "Directory that holds programs that come with GNU Emacs,\n\ 508 "Directory of architecture-dependent files that come with GNU Emacs,\n\
499 intended for Emacs to invoke."); 509 especially executable programs intended for Emacs to invoke.");
510
511 DEFVAR_LISP ("data-directory", &Vdata_directory,
512 "Directory of architecture-independent files that come with GNU Emacs,\n\
513 intended for Emacs to use.");
500 514
501 #ifndef MAINTAIN_ENVIRONMENT 515 #ifndef MAINTAIN_ENVIRONMENT
502 DEFVAR_LISP ("process-environment", &Vprocess_environment, 516 DEFVAR_LISP ("process-environment", &Vprocess_environment,
503 "List of strings to append to environment of subprocesses that are started.\n\ 517 "List of strings to append to environment of subprocesses that are started.\n\
504 Each string should have the format ENVVARNAME=VALUE."); 518 Each string should have the format ENVVARNAME=VALUE.");