diff options
| author | Ken Raeburn | 2002-07-15 00:01:34 +0000 |
|---|---|---|
| committer | Ken Raeburn | 2002-07-15 00:01:34 +0000 |
| commit | d5db40779d7505244d37476b4f046641f07eea2b (patch) | |
| tree | 5c8bf4dad41639287e722cb7cbdc0709e47a9e53 /src/process.c | |
| parent | 491c2516d32fa8b9ba9422ec142c8925dd82af00 (diff) | |
| download | emacs-d5db40779d7505244d37476b4f046641f07eea2b.tar.gz emacs-d5db40779d7505244d37476b4f046641f07eea2b.zip | |
Most uses of XSTRING combined with STRING_BYTES or indirection changed to
SCHARS, SBYTES, STRING_INTERVALS, SREF, SDATA; explicit size_byte references
left unchanged for now.
Diffstat (limited to 'src/process.c')
| -rw-r--r-- | src/process.c | 132 |
1 files changed, 66 insertions, 66 deletions
diff --git a/src/process.c b/src/process.c index 771a4e1fe62..df6646e0b62 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -419,7 +419,7 @@ status_message (status) | |||
| 419 | signame = "unknown"; | 419 | signame = "unknown"; |
| 420 | string = build_string (signame); | 420 | string = build_string (signame); |
| 421 | string2 = build_string (coredump ? " (core dumped)\n" : "\n"); | 421 | string2 = build_string (coredump ? " (core dumped)\n" : "\n"); |
| 422 | XSTRING (string)->data[0] = DOWNCASE (XSTRING (string)->data[0]); | 422 | SREF (string, 0) = DOWNCASE (SREF (string, 0)); |
| 423 | return concat2 (string, string2); | 423 | return concat2 (string, string2); |
| 424 | } | 424 | } |
| 425 | else if (EQ (symbol, Qexit)) | 425 | else if (EQ (symbol, Qexit)) |
| @@ -637,7 +637,7 @@ get_process (name) | |||
| 637 | if (NILP (obj)) | 637 | if (NILP (obj)) |
| 638 | obj = Fget_buffer (name); | 638 | obj = Fget_buffer (name); |
| 639 | if (NILP (obj)) | 639 | if (NILP (obj)) |
| 640 | error ("Process %s does not exist", XSTRING (name)->data); | 640 | error ("Process %s does not exist", SDATA (name)); |
| 641 | } | 641 | } |
| 642 | else if (NILP (name)) | 642 | else if (NILP (name)) |
| 643 | obj = Fcurrent_buffer (); | 643 | obj = Fcurrent_buffer (); |
| @@ -650,7 +650,7 @@ get_process (name) | |||
| 650 | { | 650 | { |
| 651 | proc = Fget_buffer_process (obj); | 651 | proc = Fget_buffer_process (obj); |
| 652 | if (NILP (proc)) | 652 | if (NILP (proc)) |
| 653 | error ("Buffer %s has no process", XSTRING (XBUFFER (obj)->name)->data); | 653 | error ("Buffer %s has no process", SDATA (XBUFFER (obj)->name)); |
| 654 | } | 654 | } |
| 655 | else | 655 | else |
| 656 | { | 656 | { |
| @@ -1070,17 +1070,17 @@ list_processes_1 (query_only) | |||
| 1070 | if (!NILP (query_only) && !NILP (p->kill_without_query)) | 1070 | if (!NILP (query_only) && !NILP (p->kill_without_query)) |
| 1071 | continue; | 1071 | continue; |
| 1072 | if (STRINGP (p->name) | 1072 | if (STRINGP (p->name) |
| 1073 | && ( i = XSTRING (p->name)->size, (i > w_proc))) | 1073 | && ( i = SCHARS (p->name), (i > w_proc))) |
| 1074 | w_proc = i; | 1074 | w_proc = i; |
| 1075 | if (!NILP (p->buffer)) | 1075 | if (!NILP (p->buffer)) |
| 1076 | { | 1076 | { |
| 1077 | if (NILP (XBUFFER (p->buffer)->name) && w_buffer < 8) | 1077 | if (NILP (XBUFFER (p->buffer)->name) && w_buffer < 8) |
| 1078 | w_buffer = 8; /* (Killed) */ | 1078 | w_buffer = 8; /* (Killed) */ |
| 1079 | else if ((i = XSTRING (XBUFFER (p->buffer)->name)->size, (i > w_buffer))) | 1079 | else if ((i = SCHARS (XBUFFER (p->buffer)->name), (i > w_buffer))) |
| 1080 | w_buffer = i; | 1080 | w_buffer = i; |
| 1081 | } | 1081 | } |
| 1082 | if (STRINGP (p->tty_name) | 1082 | if (STRINGP (p->tty_name) |
| 1083 | && (i = XSTRING (p->tty_name)->size, (i > w_tty))) | 1083 | && (i = SCHARS (p->tty_name), (i > w_tty))) |
| 1084 | w_tty = i; | 1084 | w_tty = i; |
| 1085 | } | 1085 | } |
| 1086 | 1086 | ||
| @@ -1206,7 +1206,7 @@ list_processes_1 (query_only) | |||
| 1206 | port = Fnumber_to_string (port); | 1206 | port = Fnumber_to_string (port); |
| 1207 | sprintf (tembuf, "(network %s server on %s)\n", | 1207 | sprintf (tembuf, "(network %s server on %s)\n", |
| 1208 | (DATAGRAM_CHAN_P (XINT (p->infd)) ? "datagram" : "stream"), | 1208 | (DATAGRAM_CHAN_P (XINT (p->infd)) ? "datagram" : "stream"), |
| 1209 | XSTRING (port)->data); | 1209 | SDATA (port)); |
| 1210 | insert_string (tembuf); | 1210 | insert_string (tembuf); |
| 1211 | } | 1211 | } |
| 1212 | else if (NETCONN1_P (p)) | 1212 | else if (NETCONN1_P (p)) |
| @@ -1222,7 +1222,7 @@ list_processes_1 (query_only) | |||
| 1222 | } | 1222 | } |
| 1223 | sprintf (tembuf, "(network %s connection to %s)\n", | 1223 | sprintf (tembuf, "(network %s connection to %s)\n", |
| 1224 | (DATAGRAM_CHAN_P (XINT (p->infd)) ? "datagram" : "stream"), | 1224 | (DATAGRAM_CHAN_P (XINT (p->infd)) ? "datagram" : "stream"), |
| 1225 | XSTRING (host)->data); | 1225 | SDATA (host)); |
| 1226 | insert_string (tembuf); | 1226 | insert_string (tembuf); |
| 1227 | } | 1227 | } |
| 1228 | else | 1228 | else |
| @@ -1400,21 +1400,21 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1400 | #ifdef VMS | 1400 | #ifdef VMS |
| 1401 | /* Make a one member argv with all args concatenated | 1401 | /* Make a one member argv with all args concatenated |
| 1402 | together separated by a blank. */ | 1402 | together separated by a blank. */ |
| 1403 | len = STRING_BYTES (XSTRING (program)) + 2; | 1403 | len = SBYTES (program) + 2; |
| 1404 | for (i = 3; i < nargs; i++) | 1404 | for (i = 3; i < nargs; i++) |
| 1405 | { | 1405 | { |
| 1406 | tem = args[i]; | 1406 | tem = args[i]; |
| 1407 | CHECK_STRING (tem); | 1407 | CHECK_STRING (tem); |
| 1408 | len += STRING_BYTES (XSTRING (tem)) + 1; /* count the blank */ | 1408 | len += SBYTES (tem) + 1; /* count the blank */ |
| 1409 | } | 1409 | } |
| 1410 | new_argv = (unsigned char *) alloca (len); | 1410 | new_argv = (unsigned char *) alloca (len); |
| 1411 | strcpy (new_argv, XSTRING (program)->data); | 1411 | strcpy (new_argv, SDATA (program)); |
| 1412 | for (i = 3; i < nargs; i++) | 1412 | for (i = 3; i < nargs; i++) |
| 1413 | { | 1413 | { |
| 1414 | tem = args[i]; | 1414 | tem = args[i]; |
| 1415 | CHECK_STRING (tem); | 1415 | CHECK_STRING (tem); |
| 1416 | strcat (new_argv, " "); | 1416 | strcat (new_argv, " "); |
| 1417 | strcat (new_argv, XSTRING (tem)->data); | 1417 | strcat (new_argv, SDATA (tem)); |
| 1418 | } | 1418 | } |
| 1419 | /* Need to add code here to check for program existence on VMS */ | 1419 | /* Need to add code here to check for program existence on VMS */ |
| 1420 | 1420 | ||
| @@ -1422,9 +1422,9 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1422 | new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *)); | 1422 | new_argv = (unsigned char **) alloca ((nargs - 1) * sizeof (char *)); |
| 1423 | 1423 | ||
| 1424 | /* If program file name is not absolute, search our path for it */ | 1424 | /* If program file name is not absolute, search our path for it */ |
| 1425 | if (!IS_DIRECTORY_SEP (XSTRING (program)->data[0]) | 1425 | if (!IS_DIRECTORY_SEP (SREF (program, 0)) |
| 1426 | && !(XSTRING (program)->size > 1 | 1426 | && !(SCHARS (program) > 1 |
| 1427 | && IS_DEVICE_SEP (XSTRING (program)->data[1]))) | 1427 | && IS_DEVICE_SEP (SREF (program, 1)))) |
| 1428 | { | 1428 | { |
| 1429 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 1429 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 1430 | 1430 | ||
| @@ -1436,7 +1436,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1436 | report_file_error ("Searching for program", Fcons (program, Qnil)); | 1436 | report_file_error ("Searching for program", Fcons (program, Qnil)); |
| 1437 | tem = Fexpand_file_name (tem, Qnil); | 1437 | tem = Fexpand_file_name (tem, Qnil); |
| 1438 | tem = ENCODE_FILE (tem); | 1438 | tem = ENCODE_FILE (tem); |
| 1439 | new_argv[0] = XSTRING (tem)->data; | 1439 | new_argv[0] = SDATA (tem); |
| 1440 | } | 1440 | } |
| 1441 | else | 1441 | else |
| 1442 | { | 1442 | { |
| @@ -1444,7 +1444,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1444 | error ("Specified program for new process is a directory"); | 1444 | error ("Specified program for new process is a directory"); |
| 1445 | 1445 | ||
| 1446 | tem = ENCODE_FILE (program); | 1446 | tem = ENCODE_FILE (program); |
| 1447 | new_argv[0] = XSTRING (tem)->data; | 1447 | new_argv[0] = SDATA (tem); |
| 1448 | } | 1448 | } |
| 1449 | 1449 | ||
| 1450 | /* Here we encode arguments by the coding system used for sending | 1450 | /* Here we encode arguments by the coding system used for sending |
| @@ -1459,7 +1459,7 @@ usage: (start-process NAME BUFFER PROGRAM &rest PROGRAM-ARGS) */) | |||
| 1459 | if (STRING_MULTIBYTE (tem)) | 1459 | if (STRING_MULTIBYTE (tem)) |
| 1460 | tem = (code_convert_string_norecord | 1460 | tem = (code_convert_string_norecord |
| 1461 | (tem, XPROCESS (proc)->encode_coding_system, 1)); | 1461 | (tem, XPROCESS (proc)->encode_coding_system, 1)); |
| 1462 | new_argv[i - 2] = XSTRING (tem)->data; | 1462 | new_argv[i - 2] = SDATA (tem); |
| 1463 | } | 1463 | } |
| 1464 | new_argv[i - 2] = 0; | 1464 | new_argv[i - 2] = 0; |
| 1465 | #endif /* not VMS */ | 1465 | #endif /* not VMS */ |
| @@ -2092,7 +2092,7 @@ conv_lisp_to_sockaddr (family, address, sa, len) | |||
| 2092 | if (family == AF_LOCAL) | 2092 | if (family == AF_LOCAL) |
| 2093 | { | 2093 | { |
| 2094 | struct sockaddr_un *sockun = (struct sockaddr_un *) sa; | 2094 | struct sockaddr_un *sockun = (struct sockaddr_un *) sa; |
| 2095 | cp = XSTRING (address)->data; | 2095 | cp = SDATA (address); |
| 2096 | for (i = 0; i < sizeof (sockun->sun_path) && *cp; i++) | 2096 | for (i = 0; i < sizeof (sockun->sun_path) && *cp; i++) |
| 2097 | sockun->sun_path[i] = *cp++; | 2097 | sockun->sun_path[i] = *cp++; |
| 2098 | } | 2098 | } |
| @@ -2232,9 +2232,9 @@ set_socket_options (s, opts, no_error) | |||
| 2232 | opt = XCAR (opt); | 2232 | opt = XCAR (opt); |
| 2233 | } | 2233 | } |
| 2234 | if (STRINGP (opt)) | 2234 | if (STRINGP (opt)) |
| 2235 | name = (char *) XSTRING (opt)->data; | 2235 | name = (char *) SDATA (opt); |
| 2236 | else if (SYMBOLP (opt)) | 2236 | else if (SYMBOLP (opt)) |
| 2237 | name = (char *) XSTRING (SYMBOL_NAME (opt))->data; | 2237 | name = (char *) SDATA (SYMBOL_NAME (opt)); |
| 2238 | else { | 2238 | else { |
| 2239 | error ("Mal-formed option list"); | 2239 | error ("Mal-formed option list"); |
| 2240 | return 0; | 2240 | return 0; |
| @@ -2300,9 +2300,9 @@ set_socket_options (s, opts, no_error) | |||
| 2300 | if (NILP (val)) | 2300 | if (NILP (val)) |
| 2301 | arg = ""; | 2301 | arg = ""; |
| 2302 | else if (STRINGP (val)) | 2302 | else if (STRINGP (val)) |
| 2303 | arg = (char *) XSTRING (val)->data; | 2303 | arg = (char *) SDATA (val); |
| 2304 | else if (XSYMBOL (val)) | 2304 | else if (XSYMBOL (val)) |
| 2305 | arg = (char *) XSTRING (SYMBOL_NAME (val))->data; | 2305 | arg = (char *) SDATA (SYMBOL_NAME (val)); |
| 2306 | else | 2306 | else |
| 2307 | error ("Invalid argument to %s option", name); | 2307 | error ("Invalid argument to %s option", name); |
| 2308 | } | 2308 | } |
| @@ -2632,16 +2632,16 @@ usage: (make-network-process &rest ARGS) */) | |||
| 2632 | { | 2632 | { |
| 2633 | struct servent *svc_info; | 2633 | struct servent *svc_info; |
| 2634 | CHECK_STRING (service); | 2634 | CHECK_STRING (service); |
| 2635 | svc_info = getservbyname (XSTRING (service)->data, "tcp"); | 2635 | svc_info = getservbyname (SDATA (service), "tcp"); |
| 2636 | if (svc_info == 0) | 2636 | if (svc_info == 0) |
| 2637 | error ("Unknown service: %s", XSTRING (service)->data); | 2637 | error ("Unknown service: %s", SDATA (service)); |
| 2638 | port = svc_info->s_port; | 2638 | port = svc_info->s_port; |
| 2639 | } | 2639 | } |
| 2640 | 2640 | ||
| 2641 | s = connect_server (0); | 2641 | s = connect_server (0); |
| 2642 | if (s < 0) | 2642 | if (s < 0) |
| 2643 | report_file_error ("error creating socket", Fcons (name, Qnil)); | 2643 | report_file_error ("error creating socket", Fcons (name, Qnil)); |
| 2644 | send_command (s, C_PORT, 0, "%s:%d", XSTRING (host)->data, ntohs (port)); | 2644 | send_command (s, C_PORT, 0, "%s:%d", SDATA (host), ntohs (port)); |
| 2645 | send_command (s, C_DUMB, 1, 0); | 2645 | send_command (s, C_DUMB, 1, 0); |
| 2646 | 2646 | ||
| 2647 | #else /* not TERM */ | 2647 | #else /* not TERM */ |
| @@ -2694,7 +2694,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 2694 | CHECK_STRING (service); | 2694 | CHECK_STRING (service); |
| 2695 | bzero (&address_un, sizeof address_un); | 2695 | bzero (&address_un, sizeof address_un); |
| 2696 | address_un.sun_family = AF_LOCAL; | 2696 | address_un.sun_family = AF_LOCAL; |
| 2697 | strncpy (address_un.sun_path, XSTRING (service)->data, sizeof address_un.sun_path); | 2697 | strncpy (address_un.sun_path, SDATA (service), sizeof address_un.sun_path); |
| 2698 | ai.ai_addr = (struct sockaddr *) &address_un; | 2698 | ai.ai_addr = (struct sockaddr *) &address_un; |
| 2699 | ai.ai_addrlen = sizeof address_un; | 2699 | ai.ai_addrlen = sizeof address_un; |
| 2700 | goto open_socket; | 2700 | goto open_socket; |
| @@ -2739,7 +2739,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 2739 | else | 2739 | else |
| 2740 | { | 2740 | { |
| 2741 | CHECK_STRING (service); | 2741 | CHECK_STRING (service); |
| 2742 | portstring = XSTRING (service)->data; | 2742 | portstring = SDATA (service); |
| 2743 | } | 2743 | } |
| 2744 | 2744 | ||
| 2745 | immediate_quit = 1; | 2745 | immediate_quit = 1; |
| @@ -2749,12 +2749,12 @@ usage: (make-network-process &rest ARGS) */) | |||
| 2749 | hints.ai_family = NILP (Fplist_member (contact, QCfamily)) ? AF_UNSPEC : family; | 2749 | hints.ai_family = NILP (Fplist_member (contact, QCfamily)) ? AF_UNSPEC : family; |
| 2750 | hints.ai_socktype = socktype; | 2750 | hints.ai_socktype = socktype; |
| 2751 | hints.ai_protocol = 0; | 2751 | hints.ai_protocol = 0; |
| 2752 | ret = getaddrinfo (XSTRING (host)->data, portstring, &hints, &res); | 2752 | ret = getaddrinfo (SDATA (host), portstring, &hints, &res); |
| 2753 | if (ret) | 2753 | if (ret) |
| 2754 | #ifdef HAVE_GAI_STRERROR | 2754 | #ifdef HAVE_GAI_STRERROR |
| 2755 | error ("%s/%s %s", XSTRING (host)->data, portstring, gai_strerror(ret)); | 2755 | error ("%s/%s %s", SDATA (host), portstring, gai_strerror(ret)); |
| 2756 | #else | 2756 | #else |
| 2757 | error ("%s/%s getaddrinfo error %d", XSTRING (host)->data, portstring, ret); | 2757 | error ("%s/%s getaddrinfo error %d", SDATA (host), portstring, ret); |
| 2758 | #endif | 2758 | #endif |
| 2759 | immediate_quit = 0; | 2759 | immediate_quit = 0; |
| 2760 | 2760 | ||
| @@ -2773,10 +2773,10 @@ usage: (make-network-process &rest ARGS) */) | |||
| 2773 | { | 2773 | { |
| 2774 | struct servent *svc_info; | 2774 | struct servent *svc_info; |
| 2775 | CHECK_STRING (service); | 2775 | CHECK_STRING (service); |
| 2776 | svc_info = getservbyname (XSTRING (service)->data, | 2776 | svc_info = getservbyname (SDATA (service), |
| 2777 | (socktype == SOCK_DGRAM ? "udp" : "tcp")); | 2777 | (socktype == SOCK_DGRAM ? "udp" : "tcp")); |
| 2778 | if (svc_info == 0) | 2778 | if (svc_info == 0) |
| 2779 | error ("Unknown service: %s", XSTRING (service)->data); | 2779 | error ("Unknown service: %s", SDATA (service)); |
| 2780 | port = svc_info->s_port; | 2780 | port = svc_info->s_port; |
| 2781 | } | 2781 | } |
| 2782 | 2782 | ||
| @@ -2794,7 +2794,7 @@ usage: (make-network-process &rest ARGS) */) | |||
| 2794 | as it may `hang' emacs for a very long time. */ | 2794 | as it may `hang' emacs for a very long time. */ |
| 2795 | immediate_quit = 1; | 2795 | immediate_quit = 1; |
| 2796 | QUIT; | 2796 | QUIT; |
| 2797 | host_info_ptr = gethostbyname (XSTRING (host)->data); | 2797 | host_info_ptr = gethostbyname (SDATA (host)); |
| 2798 | immediate_quit = 0; | 2798 | immediate_quit = 0; |
| 2799 | 2799 | ||
| 2800 | if (host_info_ptr) | 2800 | if (host_info_ptr) |
| @@ -2808,9 +2808,9 @@ usage: (make-network-process &rest ARGS) */) | |||
| 2808 | /* Attempt to interpret host as numeric inet address */ | 2808 | /* Attempt to interpret host as numeric inet address */ |
| 2809 | { | 2809 | { |
| 2810 | IN_ADDR numeric_addr; | 2810 | IN_ADDR numeric_addr; |
| 2811 | numeric_addr = inet_addr ((char *) XSTRING (host)->data); | 2811 | numeric_addr = inet_addr ((char *) SDATA (host)); |
| 2812 | if (NUMERIC_ADDR_ERROR) | 2812 | if (NUMERIC_ADDR_ERROR) |
| 2813 | error ("Unknown host \"%s\"", XSTRING (host)->data); | 2813 | error ("Unknown host \"%s\"", SDATA (host)); |
| 2814 | 2814 | ||
| 2815 | bcopy ((char *)&numeric_addr, (char *) &address_in.sin_addr, | 2815 | bcopy ((char *)&numeric_addr, (char *) &address_in.sin_addr, |
| 2816 | sizeof (address_in.sin_addr)); | 2816 | sizeof (address_in.sin_addr)); |
| @@ -4283,7 +4283,7 @@ read_process_output (proc, channel) | |||
| 4283 | the tail of decoding buffer) should be prepended to the new | 4283 | the tail of decoding buffer) should be prepended to the new |
| 4284 | data read to decode all together. */ | 4284 | data read to decode all together. */ |
| 4285 | chars = (char *) alloca (nbytes + carryover); | 4285 | chars = (char *) alloca (nbytes + carryover); |
| 4286 | bcopy (XSTRING (p->decoding_buf)->data, buf, carryover); | 4286 | bcopy (SDATA (p->decoding_buf), buf, carryover); |
| 4287 | bcopy (vs->inputBuffer, chars + carryover, nbytes); | 4287 | bcopy (vs->inputBuffer, chars + carryover, nbytes); |
| 4288 | } | 4288 | } |
| 4289 | #else /* not VMS */ | 4289 | #else /* not VMS */ |
| @@ -4301,7 +4301,7 @@ read_process_output (proc, channel) | |||
| 4301 | chars = (char *) alloca (carryover + readmax); | 4301 | chars = (char *) alloca (carryover + readmax); |
| 4302 | if (carryover) | 4302 | if (carryover) |
| 4303 | /* See the comment above. */ | 4303 | /* See the comment above. */ |
| 4304 | bcopy (XSTRING (p->decoding_buf)->data, chars, carryover); | 4304 | bcopy (SDATA (p->decoding_buf), chars, carryover); |
| 4305 | 4305 | ||
| 4306 | #ifdef DATAGRAM_SOCKETS | 4306 | #ifdef DATAGRAM_SOCKETS |
| 4307 | /* We have a working select, so proc_buffered_char is always -1. */ | 4307 | /* We have a working select, so proc_buffered_char is always -1. */ |
| @@ -4414,11 +4414,11 @@ read_process_output (proc, channel) | |||
| 4414 | } | 4414 | } |
| 4415 | 4415 | ||
| 4416 | carryover = nbytes - coding->consumed; | 4416 | carryover = nbytes - coding->consumed; |
| 4417 | bcopy (chars + coding->consumed, XSTRING (p->decoding_buf)->data, | 4417 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), |
| 4418 | carryover); | 4418 | carryover); |
| 4419 | XSETINT (p->decoding_carryover, carryover); | 4419 | XSETINT (p->decoding_carryover, carryover); |
| 4420 | nbytes = STRING_BYTES (XSTRING (text)); | 4420 | nbytes = SBYTES (text); |
| 4421 | nchars = XSTRING (text)->size; | 4421 | nchars = SCHARS (text); |
| 4422 | if (nbytes > 0) | 4422 | if (nbytes > 0) |
| 4423 | internal_condition_case_1 (read_process_output_call, | 4423 | internal_condition_case_1 (read_process_output_call, |
| 4424 | Fcons (outstream, | 4424 | Fcons (outstream, |
| @@ -4515,7 +4515,7 @@ read_process_output (proc, channel) | |||
| 4515 | } | 4515 | } |
| 4516 | } | 4516 | } |
| 4517 | carryover = nbytes - coding->consumed; | 4517 | carryover = nbytes - coding->consumed; |
| 4518 | bcopy (chars + coding->consumed, XSTRING (p->decoding_buf)->data, | 4518 | bcopy (chars + coding->consumed, SDATA (p->decoding_buf), |
| 4519 | carryover); | 4519 | carryover); |
| 4520 | XSETINT (p->decoding_carryover, carryover); | 4520 | XSETINT (p->decoding_carryover, carryover); |
| 4521 | /* Adjust the multibyteness of TEXT to that of the buffer. */ | 4521 | /* Adjust the multibyteness of TEXT to that of the buffer. */ |
| @@ -4524,8 +4524,8 @@ read_process_output (proc, channel) | |||
| 4524 | text = (STRING_MULTIBYTE (text) | 4524 | text = (STRING_MULTIBYTE (text) |
| 4525 | ? Fstring_as_unibyte (text) | 4525 | ? Fstring_as_unibyte (text) |
| 4526 | : Fstring_as_multibyte (text)); | 4526 | : Fstring_as_multibyte (text)); |
| 4527 | nbytes = STRING_BYTES (XSTRING (text)); | 4527 | nbytes = SBYTES (text); |
| 4528 | nchars = XSTRING (text)->size; | 4528 | nchars = SCHARS (text); |
| 4529 | /* Insert before markers in case we are inserting where | 4529 | /* Insert before markers in case we are inserting where |
| 4530 | the buffer's mark is, and the user's next command is Meta-y. */ | 4530 | the buffer's mark is, and the user's next command is Meta-y. */ |
| 4531 | insert_from_string_before_markers (text, 0, 0, nchars, nbytes, 0); | 4531 | insert_from_string_before_markers (text, 0, 0, nchars, nbytes, 0); |
| @@ -4633,10 +4633,10 @@ send_process (proc, buf, len, object) | |||
| 4633 | update_status (XPROCESS (proc)); | 4633 | update_status (XPROCESS (proc)); |
| 4634 | if (! EQ (XPROCESS (proc)->status, Qrun)) | 4634 | if (! EQ (XPROCESS (proc)->status, Qrun)) |
| 4635 | error ("Process %s not running", | 4635 | error ("Process %s not running", |
| 4636 | XSTRING (XPROCESS (proc)->name)->data); | 4636 | SDATA (XPROCESS (proc)->name)); |
| 4637 | if (XINT (XPROCESS (proc)->outfd) < 0) | 4637 | if (XINT (XPROCESS (proc)->outfd) < 0) |
| 4638 | error ("Output file descriptor of %s is closed", | 4638 | error ("Output file descriptor of %s is closed", |
| 4639 | XSTRING (XPROCESS (proc)->name)->data); | 4639 | SDATA (XPROCESS (proc)->name)); |
| 4640 | 4640 | ||
| 4641 | coding = proc_encode_coding_system[XINT (XPROCESS (proc)->outfd)]; | 4641 | coding = proc_encode_coding_system[XINT (XPROCESS (proc)->outfd)]; |
| 4642 | Vlast_coding_system_used = coding->symbol; | 4642 | Vlast_coding_system_used = coding->symbol; |
| @@ -4691,7 +4691,7 @@ send_process (proc, buf, len, object) | |||
| 4691 | } | 4691 | } |
| 4692 | else if (STRINGP (object)) | 4692 | else if (STRINGP (object)) |
| 4693 | { | 4693 | { |
| 4694 | from_byte = buf - XSTRING (object)->data; | 4694 | from_byte = buf - SDATA (object); |
| 4695 | from = string_byte_to_char (object, from_byte); | 4695 | from = string_byte_to_char (object, from_byte); |
| 4696 | to = string_byte_to_char (object, from_byte + len); | 4696 | to = string_byte_to_char (object, from_byte + len); |
| 4697 | } | 4697 | } |
| @@ -4704,19 +4704,19 @@ send_process (proc, buf, len, object) | |||
| 4704 | coding->composing = COMPOSITION_DISABLED; | 4704 | coding->composing = COMPOSITION_DISABLED; |
| 4705 | } | 4705 | } |
| 4706 | 4706 | ||
| 4707 | if (STRING_BYTES (XSTRING (XPROCESS (proc)->encoding_buf)) < require) | 4707 | if (SBYTES (XPROCESS (proc)->encoding_buf) < require) |
| 4708 | XPROCESS (proc)->encoding_buf = make_uninit_string (require); | 4708 | XPROCESS (proc)->encoding_buf = make_uninit_string (require); |
| 4709 | 4709 | ||
| 4710 | if (from_byte >= 0) | 4710 | if (from_byte >= 0) |
| 4711 | buf = (BUFFERP (object) | 4711 | buf = (BUFFERP (object) |
| 4712 | ? BUF_BYTE_ADDRESS (XBUFFER (object), from_byte) | 4712 | ? BUF_BYTE_ADDRESS (XBUFFER (object), from_byte) |
| 4713 | : XSTRING (object)->data + from_byte); | 4713 | : SDATA (object) + from_byte); |
| 4714 | 4714 | ||
| 4715 | object = XPROCESS (proc)->encoding_buf; | 4715 | object = XPROCESS (proc)->encoding_buf; |
| 4716 | encode_coding (coding, (char *) buf, XSTRING (object)->data, | 4716 | encode_coding (coding, (char *) buf, SDATA (object), |
| 4717 | len, STRING_BYTES (XSTRING (object))); | 4717 | len, SBYTES (object)); |
| 4718 | len = coding->produced; | 4718 | len = coding->produced; |
| 4719 | buf = XSTRING (object)->data; | 4719 | buf = SDATA (object); |
| 4720 | if (temp_buf) | 4720 | if (temp_buf) |
| 4721 | xfree (temp_buf); | 4721 | xfree (temp_buf); |
| 4722 | } | 4722 | } |
| @@ -4849,7 +4849,7 @@ send_process (proc, buf, len, object) | |||
| 4849 | if (BUFFERP (object)) | 4849 | if (BUFFERP (object)) |
| 4850 | offset = BUF_PTR_BYTE_POS (XBUFFER (object), buf); | 4850 | offset = BUF_PTR_BYTE_POS (XBUFFER (object), buf); |
| 4851 | else if (STRINGP (object)) | 4851 | else if (STRINGP (object)) |
| 4852 | offset = buf - XSTRING (object)->data; | 4852 | offset = buf - SDATA (object); |
| 4853 | 4853 | ||
| 4854 | XSETFASTINT (zero, 0); | 4854 | XSETFASTINT (zero, 0); |
| 4855 | #ifdef EMACS_HAS_USECS | 4855 | #ifdef EMACS_HAS_USECS |
| @@ -4861,7 +4861,7 @@ send_process (proc, buf, len, object) | |||
| 4861 | if (BUFFERP (object)) | 4861 | if (BUFFERP (object)) |
| 4862 | buf = BUF_BYTE_ADDRESS (XBUFFER (object), offset); | 4862 | buf = BUF_BYTE_ADDRESS (XBUFFER (object), offset); |
| 4863 | else if (STRINGP (object)) | 4863 | else if (STRINGP (object)) |
| 4864 | buf = offset + XSTRING (object)->data; | 4864 | buf = offset + SDATA (object); |
| 4865 | 4865 | ||
| 4866 | rv = 0; | 4866 | rv = 0; |
| 4867 | } | 4867 | } |
| @@ -4893,10 +4893,10 @@ send_process (proc, buf, len, object) | |||
| 4893 | deactivate_process (proc); | 4893 | deactivate_process (proc); |
| 4894 | #ifdef VMS | 4894 | #ifdef VMS |
| 4895 | error ("Error writing to process %s; closed it", | 4895 | error ("Error writing to process %s; closed it", |
| 4896 | XSTRING (XPROCESS (proc)->name)->data); | 4896 | SDATA (XPROCESS (proc)->name)); |
| 4897 | #else | 4897 | #else |
| 4898 | error ("SIGPIPE raised on process %s; closed it", | 4898 | error ("SIGPIPE raised on process %s; closed it", |
| 4899 | XSTRING (XPROCESS (proc)->name)->data); | 4899 | SDATA (XPROCESS (proc)->name)); |
| 4900 | #endif | 4900 | #endif |
| 4901 | } | 4901 | } |
| 4902 | 4902 | ||
| @@ -4946,8 +4946,8 @@ Output from processes can arrive in between bunches. */) | |||
| 4946 | Lisp_Object proc; | 4946 | Lisp_Object proc; |
| 4947 | CHECK_STRING (string); | 4947 | CHECK_STRING (string); |
| 4948 | proc = get_process (process); | 4948 | proc = get_process (process); |
| 4949 | send_process (proc, XSTRING (string)->data, | 4949 | send_process (proc, SDATA (string), |
| 4950 | STRING_BYTES (XSTRING (string)), string); | 4950 | SBYTES (string), string); |
| 4951 | return Qnil; | 4951 | return Qnil; |
| 4952 | } | 4952 | } |
| 4953 | 4953 | ||
| @@ -4970,10 +4970,10 @@ return t unconditionally. */) | |||
| 4970 | 4970 | ||
| 4971 | if (!EQ (p->childp, Qt)) | 4971 | if (!EQ (p->childp, Qt)) |
| 4972 | error ("Process %s is not a subprocess", | 4972 | error ("Process %s is not a subprocess", |
| 4973 | XSTRING (p->name)->data); | 4973 | SDATA (p->name)); |
| 4974 | if (XINT (p->infd) < 0) | 4974 | if (XINT (p->infd) < 0) |
| 4975 | error ("Process %s is not active", | 4975 | error ("Process %s is not active", |
| 4976 | XSTRING (p->name)->data); | 4976 | SDATA (p->name)); |
| 4977 | 4977 | ||
| 4978 | #ifdef TIOCGPGRP | 4978 | #ifdef TIOCGPGRP |
| 4979 | if (!NILP (p->subtty)) | 4979 | if (!NILP (p->subtty)) |
| @@ -5018,10 +5018,10 @@ process_send_signal (process, signo, current_group, nomsg) | |||
| 5018 | 5018 | ||
| 5019 | if (!EQ (p->childp, Qt)) | 5019 | if (!EQ (p->childp, Qt)) |
| 5020 | error ("Process %s is not a subprocess", | 5020 | error ("Process %s is not a subprocess", |
| 5021 | XSTRING (p->name)->data); | 5021 | SDATA (p->name)); |
| 5022 | if (XINT (p->infd) < 0) | 5022 | if (XINT (p->infd) < 0) |
| 5023 | error ("Process %s is not active", | 5023 | error ("Process %s is not active", |
| 5024 | XSTRING (p->name)->data); | 5024 | SDATA (p->name)); |
| 5025 | 5025 | ||
| 5026 | if (NILP (p->pty_flag)) | 5026 | if (NILP (p->pty_flag)) |
| 5027 | current_group = Qnil; | 5027 | current_group = Qnil; |
| @@ -5337,7 +5337,7 @@ SIGCODE may be an integer, or a symbol whose name is a signal name. */) | |||
| 5337 | unsigned char *name; | 5337 | unsigned char *name; |
| 5338 | 5338 | ||
| 5339 | CHECK_SYMBOL (sigcode); | 5339 | CHECK_SYMBOL (sigcode); |
| 5340 | name = XSTRING (SYMBOL_NAME (sigcode))->data; | 5340 | name = SDATA (SYMBOL_NAME (sigcode)); |
| 5341 | 5341 | ||
| 5342 | if (0) | 5342 | if (0) |
| 5343 | ; | 5343 | ; |
| @@ -5464,7 +5464,7 @@ text to PROCESS after you call this function. */) | |||
| 5464 | if (! NILP (XPROCESS (proc)->raw_status_low)) | 5464 | if (! NILP (XPROCESS (proc)->raw_status_low)) |
| 5465 | update_status (XPROCESS (proc)); | 5465 | update_status (XPROCESS (proc)); |
| 5466 | if (! EQ (XPROCESS (proc)->status, Qrun)) | 5466 | if (! EQ (XPROCESS (proc)->status, Qrun)) |
| 5467 | error ("Process %s not running", XSTRING (XPROCESS (proc)->name)->data); | 5467 | error ("Process %s not running", SDATA (XPROCESS (proc)->name)); |
| 5468 | 5468 | ||
| 5469 | if (CODING_REQUIRE_FLUSHING (coding)) | 5469 | if (CODING_REQUIRE_FLUSHING (coding)) |
| 5470 | { | 5470 | { |
| @@ -5946,9 +5946,9 @@ encode subprocess input. */) | |||
| 5946 | CHECK_PROCESS (proc); | 5946 | CHECK_PROCESS (proc); |
| 5947 | p = XPROCESS (proc); | 5947 | p = XPROCESS (proc); |
| 5948 | if (XINT (p->infd) < 0) | 5948 | if (XINT (p->infd) < 0) |
| 5949 | error ("Input file descriptor of %s closed", XSTRING (p->name)->data); | 5949 | error ("Input file descriptor of %s closed", SDATA (p->name)); |
| 5950 | if (XINT (p->outfd) < 0) | 5950 | if (XINT (p->outfd) < 0) |
| 5951 | error ("Output file descriptor of %s closed", XSTRING (p->name)->data); | 5951 | error ("Output file descriptor of %s closed", SDATA (p->name)); |
| 5952 | 5952 | ||
| 5953 | p->decode_coding_system = Fcheck_coding_system (decoding); | 5953 | p->decode_coding_system = Fcheck_coding_system (decoding); |
| 5954 | p->encode_coding_system = Fcheck_coding_system (encoding); | 5954 | p->encode_coding_system = Fcheck_coding_system (encoding); |