aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorRichard M. Stallman1998-03-21 07:06:14 +0000
committerRichard M. Stallman1998-03-21 07:06:14 +0000
commitfc932ac6c7b54ac6f79222a2548707a97d3a44f4 (patch)
tree88f9f2ff546b9d84c11515967b4bb5cc3c16d080 /src/process.c
parente7654b4a743e7c54c08629ee336e10a5f1089da6 (diff)
downloademacs-fc932ac6c7b54ac6f79222a2548707a97d3a44f4.tar.gz
emacs-fc932ac6c7b54ac6f79222a2548707a97d3a44f4.zip
Use STRING_BYTES and SET_STRING_BYTES.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/process.c b/src/process.c
index 5c5b71e6954..05c12d10ab6 100644
--- a/src/process.c
+++ b/src/process.c
@@ -1089,12 +1089,12 @@ Remaining arguments are strings to give program as arguments.")
1089#ifdef VMS 1089#ifdef VMS
1090 /* Make a one member argv with all args concatenated 1090 /* Make a one member argv with all args concatenated
1091 together separated by a blank. */ 1091 together separated by a blank. */
1092 len = XSTRING (program)->size_byte + 2; 1092 len = STRING_BYTES (XSTRING (program)) + 2;
1093 for (i = 3; i < nargs; i++) 1093 for (i = 3; i < nargs; i++)
1094 { 1094 {
1095 tem = args[i]; 1095 tem = args[i];
1096 CHECK_STRING (tem, i); 1096 CHECK_STRING (tem, i);
1097 len += XSTRING (tem)->size_byte + 1; /* count the blank */ 1097 len += STRING_BYTES (XSTRING (tem)) + 1; /* count the blank */
1098 } 1098 }
1099 new_argv = (unsigned char *) alloca (len); 1099 new_argv = (unsigned char *) alloca (len);
1100 strcpy (new_argv, XSTRING (program)->data); 1100 strcpy (new_argv, XSTRING (program)->data);
@@ -2756,7 +2756,7 @@ read_process_output (proc, channel)
2756 char *buf = (char *) xmalloc (nbytes + carryover); 2756 char *buf = (char *) xmalloc (nbytes + carryover);
2757 2757
2758 bcopy (XSTRING (p->decoding_buf)->data 2758 bcopy (XSTRING (p->decoding_buf)->data
2759 + XSTRING (p->decoding_buf)->size_byte - carryover, 2759 + STRING_BYTES (XSTRING (p->decoding_buf)) - carryover,
2760 buf, carryover); 2760 buf, carryover);
2761 bcopy (chars, buf + carryover, nbytes); 2761 bcopy (chars, buf + carryover, nbytes);
2762 chars = buf; 2762 chars = buf;
@@ -2767,7 +2767,7 @@ read_process_output (proc, channel)
2767 if (carryover) 2767 if (carryover)
2768 /* See the comment above. */ 2768 /* See the comment above. */
2769 bcopy (XSTRING (p->decoding_buf)->data 2769 bcopy (XSTRING (p->decoding_buf)->data
2770 + XSTRING (p->decoding_buf)->size_byte - carryover, 2770 + STRING_BYTES (XSTRING (p->decoding_buf)) - carryover,
2771 buf, carryover); 2771 buf, carryover);
2772 2772
2773 if (proc_buffered_char[channel] < 0) 2773 if (proc_buffered_char[channel] < 0)
@@ -2799,10 +2799,10 @@ read_process_output (proc, channel)
2799 int require = decoding_buffer_size (coding, nbytes); 2799 int require = decoding_buffer_size (coding, nbytes);
2800 int result; 2800 int result;
2801 2801
2802 if (XSTRING (p->decoding_buf)->size_byte < require) 2802 if (STRING_BYTES (XSTRING (p->decoding_buf)) < require)
2803 p->decoding_buf = make_uninit_string (require); 2803 p->decoding_buf = make_uninit_string (require);
2804 result = decode_coding (coding, chars, XSTRING (p->decoding_buf)->data, 2804 result = decode_coding (coding, chars, XSTRING (p->decoding_buf)->data,
2805 nbytes, XSTRING (p->decoding_buf)->size_byte); 2805 nbytes, STRING_BYTES (XSTRING (p->decoding_buf)));
2806 carryover = nbytes - coding->consumed; 2806 carryover = nbytes - coding->consumed;
2807 2807
2808 /* A new coding system might be found by `decode_coding'. */ 2808 /* A new coding system might be found by `decode_coding'. */
@@ -3111,7 +3111,7 @@ send_process (proc, buf, len, object)
3111 offset = -1; 3111 offset = -1;
3112 } 3112 }
3113 bcopy ((XSTRING (XPROCESS (proc)->encoding_buf)->data 3113 bcopy ((XSTRING (XPROCESS (proc)->encoding_buf)->data
3114 + XSTRING (XPROCESS (proc)->encoding_buf)->size_byte 3114 + STRING_BYTES (XSTRING (XPROCESS (proc)->encoding_buf))
3115 - carryover), 3115 - carryover),
3116 temp_buf, 3116 temp_buf,
3117 carryover); 3117 carryover);
@@ -3119,7 +3119,7 @@ send_process (proc, buf, len, object)
3119 buf = temp_buf; 3119 buf = temp_buf;
3120 } 3120 }
3121 3121
3122 if (XSTRING (XPROCESS (proc)->encoding_buf)->size_byte < require) 3122 if (STRING_BYTES (XSTRING (XPROCESS (proc)->encoding_buf)) < require)
3123 { 3123 {
3124 XPROCESS (proc)->encoding_buf = make_uninit_string (require); 3124 XPROCESS (proc)->encoding_buf = make_uninit_string (require);
3125 3125
@@ -3133,7 +3133,7 @@ send_process (proc, buf, len, object)
3133 } 3133 }
3134 object = XPROCESS (proc)->encoding_buf; 3134 object = XPROCESS (proc)->encoding_buf;
3135 encode_coding (coding, buf, XSTRING (object)->data, 3135 encode_coding (coding, buf, XSTRING (object)->data,
3136 len, XSTRING (object)->size_byte); 3136 len, STRING_BYTES (XSTRING (object)));
3137 len = coding->produced; 3137 len = coding->produced;
3138 buf = XSTRING (object)->data; 3138 buf = XSTRING (object)->data;
3139 if (temp_buf) 3139 if (temp_buf)
@@ -3318,7 +3318,7 @@ Output from processes can arrive in between bunches.")
3318 CHECK_STRING (string, 1); 3318 CHECK_STRING (string, 1);
3319 proc = get_process (process); 3319 proc = get_process (process);
3320 send_process (proc, XSTRING (string)->data, 3320 send_process (proc, XSTRING (string)->data,
3321 XSTRING (string)->size_byte, string); 3321 STRING_BYTES (XSTRING (string)), string);
3322 return Qnil; 3322 return Qnil;
3323} 3323}
3324 3324