comparison src/process.c @ 867:804517e16990

[xemacs-hg @ 2002-06-05 09:54:39 by ben] Textual renaming: text/char names abbrev.c, alloc.c, buffer.c, buffer.h, bytecode.c, callint.c, casefiddle.c, casetab.c, charset.h, chartab.c, chartab.h, cmds.c, console-gtk.h, console-msw.c, console-msw.h, console-stream.c, console-tty.c, console-x.c, console-x.h, console.h, data.c, device-msw.c, device-x.c, dialog-msw.c, dired-msw.c, dired.c, doc.c, doprnt.c, editfns.c, eldap.c, emodules.c, eval.c, event-Xt.c, event-gtk.c, event-msw.c, event-stream.c, event-unixoid.c, events.c, events.h, file-coding.c, file-coding.h, fileio.c, filelock.c, fns.c, font-lock.c, frame-gtk.c, frame-msw.c, frame-x.c, frame.c, glyphs-eimage.c, glyphs-msw.c, glyphs-x.c, glyphs.c, glyphs.h, gpmevent.c, gui-x.c, gui-x.h, gui.c, gui.h, hpplay.c, indent.c, insdel.c, insdel.h, intl-win32.c, keymap.c, line-number.c, line-number.h, lisp-disunion.h, lisp-union.h, lisp.h, lread.c, lrecord.h, lstream.c, lstream.h, md5.c, menubar-msw.c, menubar-x.c, menubar.c, minibuf.c, mule-ccl.c, mule-charset.c, mule-coding.c, mule-wnnfns.c, ndir.h, nt.c, objects-gtk.c, objects-gtk.h, objects-msw.c, objects-tty.c, objects-x.c, objects.c, objects.h, postgresql.c, print.c, process-nt.c, process-unix.c, process.c, procimpl.h, realpath.c, redisplay-gtk.c, redisplay-msw.c, redisplay-output.c, redisplay-tty.c, redisplay-x.c, redisplay.c, redisplay.h, regex.c, search.c, select-common.h, select-gtk.c, select-x.c, sound.h, symbols.c, syntax.c, syntax.h, sysdep.c, sysdep.h, sysdir.h, sysfile.h, sysproc.h, syspwd.h, systime.h, syswindows.h, termcap.c, tests.c, text.c, text.h, toolbar-common.c, tooltalk.c, ui-gtk.c, unexnt.c, unicode.c, win32.c: Text/char naming rationalization. [a] distinguish between "charptr" when it refers to operations on the pointer itself and when it refers to operations on text; and [b] use consistent naming for everything referring to internal format, i.e. Itext == text in internal format Ibyte == a byte in such text Ichar == a char as represented in internal character format thus e.g. set_charptr_emchar -> set_itext_ichar The pre and post tags on either side of this change are: pre-internal-format-textual-renaming post-internal-format-textual-renaming See the Internals Manual for details of exactly how this was done, how to handle the change in your workspace, etc.
author ben
date Wed, 05 Jun 2002 09:58:45 +0000
parents 42375619fa45
children 34362f9d6d61
comparison
equal deleted inserted replaced
866:613552a02607 867:804517e16990
1050 Charcount 1050 Charcount
1051 read_process_output (Lisp_Object process, int read_stderr) 1051 read_process_output (Lisp_Object process, int read_stderr)
1052 { 1052 {
1053 /* This function can GC */ 1053 /* This function can GC */
1054 Bytecount nbytes, nchars; 1054 Bytecount nbytes, nchars;
1055 Intbyte chars[1025]; 1055 Ibyte chars[1025];
1056 Lisp_Object outstream; 1056 Lisp_Object outstream;
1057 Lisp_Process *p = XPROCESS (process); 1057 Lisp_Process *p = XPROCESS (process);
1058 Lisp_Object filter = read_stderr ? p->stderr_filter : p->filter; 1058 Lisp_Object filter = read_stderr ? p->stderr_filter : p->filter;
1059 Lisp_Object buffer = read_stderr ? p->stderr_buffer : p->buffer; 1059 Lisp_Object buffer = read_stderr ? p->stderr_buffer : p->buffer;
1060 Lisp_Object mark = read_stderr ? p->stderr_mark : p->mark; 1060 Lisp_Object mark = read_stderr ? p->stderr_mark : p->mark;
1169 Note that START and LEN are in Charbpos's if RELOCATABLE is a buffer, 1169 Note that START and LEN are in Charbpos's if RELOCATABLE is a buffer,
1170 and in Bytecounts otherwise. */ 1170 and in Bytecounts otherwise. */
1171 1171
1172 void 1172 void
1173 send_process (Lisp_Object process, 1173 send_process (Lisp_Object process,
1174 Lisp_Object relocatable, const Intbyte *nonrelocatable, 1174 Lisp_Object relocatable, const Ibyte *nonrelocatable,
1175 int start, int len) 1175 int start, int len)
1176 { 1176 {
1177 /* This function can GC */ 1177 /* This function can GC */
1178 struct gcpro gcpro1, gcpro2; 1178 struct gcpro gcpro1, gcpro2;
1179 Lisp_Object lstream = Qnil; 1179 Lisp_Object lstream = Qnil;
1603 if (coredump) 1603 if (coredump)
1604 string2 = build_msg_string (" (core dumped)\n"); 1604 string2 = build_msg_string (" (core dumped)\n");
1605 else 1605 else
1606 string2 = build_string ("\n"); 1606 string2 = build_string ("\n");
1607 set_string_char (string, 0, 1607 set_string_char (string, 0,
1608 DOWNCASE (0, string_emchar (string, 0))); 1608 DOWNCASE (0, string_ichar (string, 0)));
1609 return concat2 (string, string2); 1609 return concat2 (string, string2);
1610 } 1610 }
1611 else if (EQ (symbol, Qexit)) 1611 else if (EQ (symbol, Qexit))
1612 { 1612 {
1613 if (code == 0) 1613 if (code == 0)
1802 { 1802 {
1803 if (INTP (signal_)) 1803 if (INTP (signal_))
1804 return XINT (signal_); 1804 return XINT (signal_);
1805 else 1805 else
1806 { 1806 {
1807 Intbyte *name; 1807 Ibyte *name;
1808 1808
1809 CHECK_SYMBOL (signal_); 1809 CHECK_SYMBOL (signal_);
1810 name = XSTRING_DATA (XSYMBOL (signal_)->name); 1810 name = XSTRING_DATA (XSYMBOL (signal_)->name);
1811 1811
1812 #define handle_signal(sym) do { \ 1812 #define handle_signal(sym) do { \
2276 2276
2277 #endif /* 0 */ 2277 #endif /* 0 */
2278 2278
2279 2279
2280 static int 2280 static int
2281 getenv_internal (const Intbyte *var, 2281 getenv_internal (const Ibyte *var,
2282 Bytecount varlen, 2282 Bytecount varlen,
2283 Intbyte **value, 2283 Ibyte **value,
2284 Bytecount *valuelen) 2284 Bytecount *valuelen)
2285 { 2285 {
2286 Lisp_Object scan; 2286 Lisp_Object scan;
2287 2287
2288 assert (env_initted); 2288 assert (env_initted);
2310 2310
2311 return 0; 2311 return 0;
2312 } 2312 }
2313 2313
2314 static void 2314 static void
2315 putenv_internal (const Intbyte *var, 2315 putenv_internal (const Ibyte *var,
2316 Bytecount varlen, 2316 Bytecount varlen,
2317 const Intbyte *value, 2317 const Ibyte *value,
2318 Bytecount valuelen) 2318 Bytecount valuelen)
2319 { 2319 {
2320 Lisp_Object scan; 2320 Lisp_Object scan;
2321 2321
2322 assert (env_initted); 2322 assert (env_initted);
2375 VAR is a string, the name of the variable. 2375 VAR is a string, the name of the variable.
2376 When invoked interactively, prints the value in the echo area. 2376 When invoked interactively, prints the value in the echo area.
2377 */ 2377 */
2378 (var, interactivep)) 2378 (var, interactivep))
2379 { 2379 {
2380 Intbyte *value; 2380 Ibyte *value;
2381 Bytecount valuelen; 2381 Bytecount valuelen;
2382 Lisp_Object v = Qnil; 2382 Lisp_Object v = Qnil;
2383 struct gcpro gcpro1; 2383 struct gcpro gcpro1;
2384 2384
2385 CHECK_STRING (var); 2385 CHECK_STRING (var);
2416 encapsulated. 2416 encapsulated.
2417 2417
2418 WARNING: This value points into Lisp string data and thus will become 2418 WARNING: This value points into Lisp string data and thus will become
2419 invalid after a GC. */ 2419 invalid after a GC. */
2420 2420
2421 Intbyte * 2421 Ibyte *
2422 egetenv (const CIntbyte *var) 2422 egetenv (const CIbyte *var)
2423 { 2423 {
2424 /* This cannot GC -- 7-28-00 ben */ 2424 /* This cannot GC -- 7-28-00 ben */
2425 Intbyte *value; 2425 Ibyte *value;
2426 Bytecount valuelen; 2426 Bytecount valuelen;
2427 2427
2428 if (getenv_internal ((const Intbyte *) var, strlen (var), &value, &valuelen)) 2428 if (getenv_internal ((const Ibyte *) var, strlen (var), &value, &valuelen))
2429 return value; 2429 return value;
2430 else 2430 else
2431 return 0; 2431 return 0;
2432 } 2432 }
2433 2433
2434 void 2434 void
2435 eputenv (const CIntbyte *var, const CIntbyte *value) 2435 eputenv (const CIbyte *var, const CIbyte *value)
2436 { 2436 {
2437 putenv_internal ((Intbyte *) var, strlen (var), (Intbyte *) value, 2437 putenv_internal ((Ibyte *) var, strlen (var), (Ibyte *) value,
2438 strlen (value)); 2438 strlen (value));
2439 } 2439 }
2440 2440
2441 2441
2442 /* This is not named init_process in order to avoid a conflict with NS 3.3 */ 2442 /* This is not named init_process in order to avoid a conflict with NS 3.3 */
2467 } 2467 }
2468 2468
2469 { 2469 {
2470 /* Initialize shell-file-name from environment variables or best guess. */ 2470 /* Initialize shell-file-name from environment variables or best guess. */
2471 #ifdef WIN32_NATIVE 2471 #ifdef WIN32_NATIVE
2472 const Intbyte *shell = egetenv ("SHELL"); 2472 const Ibyte *shell = egetenv ("SHELL");
2473 if (!shell) shell = egetenv ("COMSPEC"); 2473 if (!shell) shell = egetenv ("COMSPEC");
2474 /* Should never happen! */ 2474 /* Should never happen! */
2475 if (!shell) shell = 2475 if (!shell) shell =
2476 (Intbyte *) (GetVersion () & 0x80000000 ? "command" : "cmd"); 2476 (Ibyte *) (GetVersion () & 0x80000000 ? "command" : "cmd");
2477 #else /* not WIN32_NATIVE */ 2477 #else /* not WIN32_NATIVE */
2478 const Intbyte *shell = egetenv ("SHELL"); 2478 const Ibyte *shell = egetenv ("SHELL");
2479 if (!shell) shell = (Intbyte *) "/bin/sh"; 2479 if (!shell) shell = (Ibyte *) "/bin/sh";
2480 #endif 2480 #endif
2481 2481
2482 #if 0 /* defined (WIN32_NATIVE) */ 2482 #if 0 /* defined (WIN32_NATIVE) */
2483 /* BAD BAD BAD. We do not wanting to be passing an XEmacs-created 2483 /* BAD BAD BAD. We do not wanting to be passing an XEmacs-created
2484 SHELL var down to some inferior Cygwin process, which might get 2484 SHELL var down to some inferior Cygwin process, which might get
2495 shell-file-name and everything will work out hunky-dorey. 2495 shell-file-name and everything will work out hunky-dorey.
2496 */ 2496 */
2497 2497
2498 if (!egetenv ("SHELL")) 2498 if (!egetenv ("SHELL"))
2499 { 2499 {
2500 Intbyte *faux_var = alloca_array (Intbyte, 7 + qxestrlen (shell)); 2500 Ibyte *faux_var = alloca_array (Ibyte, 7 + qxestrlen (shell));
2501 qxesprintf (faux_var, "SHELL=%s", shell); 2501 qxesprintf (faux_var, "SHELL=%s", shell);
2502 Vprocess_environment = Fcons (build_intstring (faux_var), 2502 Vprocess_environment = Fcons (build_intstring (faux_var),
2503 Vprocess_environment); 2503 Vprocess_environment);
2504 } 2504 }
2505 #endif /* 0 */ 2505 #endif /* 0 */