comparison lib-src/gnuclient.c @ 2424:c164e88b1977

[xemacs-hg @ 2004-12-06 23:23:41 by ben] fix gnuclient compile gnuclient.c: Use QXE_PATH_MAX.
author ben
date Mon, 06 Dec 2004 23:23:41 +0000
parents 04bc9d2f42c7
children 2161ac78b41e
comparison
equal deleted inserted replaced
2423:dcb827620051 2424:c164e88b1977
72 "sockets or System V IPC.\n"); 72 "sockets or System V IPC.\n");
73 exit (1); 73 exit (1);
74 } /* main */ 74 } /* main */
75 #else /* SYSV_IPC || UNIX_DOMAIN_SOCKETS || INTERNET_DOMAIN_SOCKETS */ 75 #else /* SYSV_IPC || UNIX_DOMAIN_SOCKETS || INTERNET_DOMAIN_SOCKETS */
76 76
77 static char cwd[PATH_MAX+2]; /* current working directory when calculated */ 77 static char cwd[QXE_PATH_MAX+2];/* current working directory when calculated */
78 static char *cp = NULL; /* ptr into valid bit of cwd above */ 78 static char *cp = NULL; /* ptr into valid bit of cwd above */
79 79
80 static pid_t emacs_pid; /* Process id for emacs process */ 80 static pid_t emacs_pid; /* Process id for emacs process */
81 81
82 void initialize_signals (void); 82 void initialize_signals (void);
83 83
84 static void 84 static void
85 tell_emacs_to_resume (int UNUSED (sig)) 85 tell_emacs_to_resume (int UNUSED (sig))
147 get_current_working_directory (void) 147 get_current_working_directory (void)
148 { 148 {
149 if (cp == NULL) 149 if (cp == NULL)
150 { /* haven't calculated it yet */ 150 { /* haven't calculated it yet */
151 #ifdef HAVE_GETCWD 151 #ifdef HAVE_GETCWD
152 if (getcwd (cwd,PATH_MAX) == NULL) 152 if (getcwd (cwd,QXE_PATH_MAX) == NULL)
153 #else 153 #else
154 if (getwd (cwd) == 0) 154 if (getwd (cwd) == 0)
155 #endif /* HAVE_GETCWD */ 155 #endif /* HAVE_GETCWD */
156 { 156 {
157 perror (progname); 157 perror (progname);
180 filename_expand (char *fullpath, char *filename) 180 filename_expand (char *fullpath, char *filename)
181 /* fullpath - returned full pathname */ 181 /* fullpath - returned full pathname */
182 /* filename - filename to expand */ 182 /* filename - filename to expand */
183 { 183 {
184 #ifdef CYGWIN 184 #ifdef CYGWIN
185 char cygwinFilename[PATH_MAX+1]; 185 char cygwinFilename[QXE_PATH_MAX+1];
186 extern void cygwin_conv_to_posix_path(const char *, char *); 186 extern void cygwin_conv_to_posix_path(const char *, char *);
187 #endif 187 #endif
188 188
189 int len; 189 int len;
190 fullpath[0] = '\0'; 190 fullpath[0] = '\0';
295 295
296 int 296 int
297 main (int argc, char *argv[]) 297 main (int argc, char *argv[])
298 { 298 {
299 int starting_line = 1; /* line to start editing at */ 299 int starting_line = 1; /* line to start editing at */
300 char command[PATH_MAX+50]; /* emacs command buffer */ 300 char command[QXE_PATH_MAX+50];/* emacs command buffer */
301 char fullpath[PATH_MAX+1]; /* full pathname to file */ 301 char fullpath[QXE_PATH_MAX+1];/* full pathname to file */
302 char *eval_form = NULL; /* form to evaluate with `-eval' */ 302 char *eval_form = NULL; /* form to evaluate with `-eval' */
303 char *eval_function = NULL; /* function to evaluate with `-f' */ 303 char *eval_function = NULL; /* function to evaluate with `-f' */
304 char *load_library = NULL; /* library to load */ 304 char *load_library = NULL; /* library to load */
305 int quick = 0; /* quick edit, don't wait for user to 305 int quick = 0; /* quick edit, don't wait for user to
306 finish */ 306 finish */
315 char *display = NULL; 315 char *display = NULL;
316 #ifdef INTERNET_DOMAIN_SOCKETS 316 #ifdef INTERNET_DOMAIN_SOCKETS
317 char *hostarg = NULL; /* remote hostname */ 317 char *hostarg = NULL; /* remote hostname */
318 char *remotearg; 318 char *remotearg;
319 char thishost[HOSTNAMSZ]; /* this hostname */ 319 char thishost[HOSTNAMSZ]; /* this hostname */
320 char remotepath[PATH_MAX+1]; /* remote pathname */ 320 char remotepath[QXE_PATH_MAX+1]; /* remote pathname */
321 char *path; 321 char *path;
322 int rflg = 0; /* pathname given on cmdline */ 322 int rflg = 0; /* pathname given on cmdline */
323 char *portarg; 323 char *portarg;
324 unsigned short port = 0; /* port to server */ 324 unsigned short port = 0; /* port to server */
325 #endif /* INTERNET_DOMAIN_SOCKETS */ 325 #endif /* INTERNET_DOMAIN_SOCKETS */