comparison lib-src/gnuclient.c @ 167:85ec50267440 r20-3b10

Import from CVS: tag r20-3b10
author cvs
date Mon, 13 Aug 2007 09:45:46 +0200
parents 25f70ba0133c
children 929b76928fce
comparison
equal deleted inserted replaced
166:7a77eb660975 167:85ec50267440
76 76
77 static pid_t emacs_pid; /* Process id for emacs process */ 77 static pid_t emacs_pid; /* Process id for emacs process */
78 78
79 void initialize_signals (void); 79 void initialize_signals (void);
80 80
81 void 81 static void
82 tell_emacs_to_resume (int sig) 82 tell_emacs_to_resume (int sig)
83 { 83 {
84 char buffer[GSERV_BUFSZ+1]; 84 char buffer[GSERV_BUFSZ+1];
85 int s; /* socket / msqid to server */ 85 int s; /* socket / msqid to server */
86 int connect_type; /* CONN_UNIX, CONN_INTERNET, or 86 int connect_type; /* CONN_UNIX, CONN_INTERNET, or
102 if (connect_type != (int) CONN_IPC) 102 if (connect_type != (int) CONN_IPC)
103 disconnect_from_server (s, FALSE); 103 disconnect_from_server (s, FALSE);
104 #endif /* !SYSV_IPC */ 104 #endif /* !SYSV_IPC */
105 } 105 }
106 106
107 void 107 static void
108 pass_signal_to_emacs (int sig) 108 pass_signal_to_emacs (int sig)
109 { 109 {
110 if (kill (emacs_pid, sig) == -1) 110 if (kill (emacs_pid, sig) == -1)
111 { 111 {
112 fprintf (stderr, "gnuattach: Could not pass signal to emacs process\n"); 112 fprintf (stderr, "gnuattach: Could not pass signal to emacs process\n");
194 194
195 } /* filename_expand */ 195 } /* filename_expand */
196 196
197 /* Encase the string in quotes, escape all the backslashes and quotes 197 /* Encase the string in quotes, escape all the backslashes and quotes
198 in string. */ 198 in string. */
199 char * 199 static char *
200 clean_string (CONST char *s) 200 clean_string (CONST char *s)
201 { 201 {
202 int i = 0; 202 int i = 0;
203 char *p, *res; 203 char *p, *res;
204 204