aboutsummaryrefslogtreecommitdiffstats
path: root/src/process.c
diff options
context:
space:
mode:
authorRichard M. Stallman1997-07-04 02:01:31 +0000
committerRichard M. Stallman1997-07-04 02:01:31 +0000
commitb684d043b2a439cf66d349d7f394b40bc0eff0ea (patch)
treebf8ef8fc330f6c6cbe1726fd696fb40ed24b419f /src/process.c
parent1707b2dade678b6dc2c28cee82281614325e6a53 (diff)
downloademacs-b684d043b2a439cf66d349d7f394b40bc0eff0ea.tar.gz
emacs-b684d043b2a439cf66d349d7f394b40bc0eff0ea.zip
(send_process): Make buf and temp_buf `unsigned char *'.
Diffstat (limited to 'src/process.c')
-rw-r--r--src/process.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/src/process.c b/src/process.c
index e718533f035..459b822df61 100644
--- a/src/process.c
+++ b/src/process.c
@@ -2941,7 +2941,7 @@ send_process_trap ()
2941 2941
2942send_process (proc, buf, len, object) 2942send_process (proc, buf, len, object)
2943 volatile Lisp_Object proc; 2943 volatile Lisp_Object proc;
2944 char *buf; 2944 unsigned char *buf;
2945 int len; 2945 int len;
2946 Lisp_Object object; 2946 Lisp_Object object;
2947{ 2947{
@@ -2970,27 +2970,27 @@ send_process (proc, buf, len, object)
2970 { 2970 {
2971 int require = encoding_buffer_size (coding, len); 2971 int require = encoding_buffer_size (coding, len);
2972 int offset, dummy; 2972 int offset, dummy;
2973 char *temp_buf = NULL; 2973 unsigned char *temp_buf = NULL;
2974 2974
2975 /* Remember the offset of data because a string or a buffer may 2975 /* Remember the offset of data because a string or a buffer may
2976 be relocated. Setting OFFSET to -1 means we don't have to 2976 be relocated. Setting OFFSET to -1 means we don't have to
2977 care relocation. */ 2977 care relocation. */
2978 offset = (BUFFERP (object) 2978 offset = (BUFFERP (object)
2979 ? BUF_PTR_CHAR_POS (XBUFFER (object), (unsigned char *) buf) 2979 ? BUF_PTR_CHAR_POS (XBUFFER (object), buf)
2980 : (STRINGP (object) 2980 : (STRINGP (object)
2981 ? offset = buf - (char *) XSTRING (object)->data 2981 ? offset = buf - XSTRING (object)->data
2982 : -1)); 2982 : -1));
2983 2983
2984 if (coding->carryover_size > 0) 2984 if (coding->carryover_size > 0)
2985 { 2985 {
2986 temp_buf = (char *) xmalloc (len + coding->carryover_size); 2986 temp_buf = (unsigned char *) xmalloc (len + coding->carryover_size);
2987 2987
2988 if (offset >= 0) 2988 if (offset >= 0)
2989 { 2989 {
2990 if (BUFFERP (object)) 2990 if (BUFFERP (object))
2991 buf = (char *) BUF_CHAR_ADDRESS (XBUFFER (object), offset); 2991 buf = BUF_CHAR_ADDRESS (XBUFFER (object), offset);
2992 else if (STRINGP (object)) 2992 else if (STRINGP (object))
2993 buf = offset + (char *) XSTRING (object)->data; 2993 buf = offset + XSTRING (object)->data;
2994 /* Now we don't have to care relocation. */ 2994 /* Now we don't have to care relocation. */
2995 offset = -1; 2995 offset = -1;
2996 } 2996 }
@@ -3006,9 +3006,9 @@ send_process (proc, buf, len, object)
3006 if (offset >= 0) 3006 if (offset >= 0)
3007 { 3007 {
3008 if (BUFFERP (object)) 3008 if (BUFFERP (object))
3009 buf = (char *) BUF_CHAR_ADDRESS (XBUFFER (object), offset); 3009 buf = BUF_CHAR_ADDRESS (XBUFFER (object), offset);
3010 else if (STRINGP (object)) 3010 else if (STRINGP (object))
3011 buf = offset + (char *) XSTRING (object)->data; 3011 buf = offset + XSTRING (object)->data;
3012 } 3012 }
3013 } 3013 }
3014 object = XPROCESS (proc)->encoding_buf; 3014 object = XPROCESS (proc)->encoding_buf;
@@ -3059,8 +3059,8 @@ send_process (proc, buf, len, object)
3059 If that proves worth handling, we need to save linepos 3059 If that proves worth handling, we need to save linepos
3060 in the process object. */ 3060 in the process object. */
3061 int linepos = 0; 3061 int linepos = 0;
3062 char *ptr = buf; 3062 unsigned char *ptr = buf;
3063 char *end = buf + len; 3063 unsigned char *end = buf + len;
3064 3064
3065 /* Scan through this text for a line that is too long. */ 3065 /* Scan through this text for a line that is too long. */
3066 while (ptr != end && linepos < pty_max_bytes) 3066 while (ptr != end && linepos < pty_max_bytes)
@@ -3103,10 +3103,9 @@ send_process (proc, buf, len, object)
3103 /* Running filters might relocate buffers or strings. 3103 /* Running filters might relocate buffers or strings.
3104 Arrange to relocate BUF. */ 3104 Arrange to relocate BUF. */
3105 if (BUFFERP (object)) 3105 if (BUFFERP (object))
3106 offset = BUF_PTR_CHAR_POS (XBUFFER (object), 3106 offset = BUF_PTR_CHAR_POS (XBUFFER (object), buf);
3107 (unsigned char *) buf);
3108 else if (STRINGP (object)) 3107 else if (STRINGP (object))
3109 offset = buf - (char *) XSTRING (object)->data; 3108 offset = buf - XSTRING (object)->data;
3110 3109
3111 XSETFASTINT (zero, 0); 3110 XSETFASTINT (zero, 0);
3112#ifdef EMACS_HAS_USECS 3111#ifdef EMACS_HAS_USECS
@@ -3116,9 +3115,9 @@ send_process (proc, buf, len, object)
3116#endif 3115#endif
3117 3116
3118 if (BUFFERP (object)) 3117 if (BUFFERP (object))
3119 buf = (char *) BUF_CHAR_ADDRESS (XBUFFER (object), offset); 3118 buf = BUF_CHAR_ADDRESS (XBUFFER (object), offset);
3120 else if (STRINGP (object)) 3119 else if (STRINGP (object))
3121 buf = offset + (char *) XSTRING (object)->data; 3120 buf = offset + XSTRING (object)->data;
3122 3121
3123 rv = 0; 3122 rv = 0;
3124 } 3123 }