[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lib-src/emacsclient.c
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lib-src/emacsclient.c |
Date: |
Tue, 17 Sep 2002 21:44:05 -0400 |
Index: emacs/lib-src/emacsclient.c
diff -c emacs/lib-src/emacsclient.c:1.50 emacs/lib-src/emacsclient.c:1.51
*** emacs/lib-src/emacsclient.c:1.50 Sat Dec 29 17:20:06 2001
--- emacs/lib-src/emacsclient.c Tue Sep 17 21:44:05 2002
***************
*** 64,70 ****
{ "no-wait", no_argument, NULL, 'n' },
{ "help", no_argument, NULL, 'H' },
{ "version", no_argument, NULL, 'V' },
! { "alternate-editor",required_argument, NULL, 'a' },
{ 0 }
};
--- 64,70 ----
{ "no-wait", no_argument, NULL, 'n' },
{ "help", no_argument, NULL, 'H' },
{ "version", no_argument, NULL, 'V' },
! { "alternate-editor", required_argument, NULL, 'a' },
{ 0 }
};
***************
*** 131,137 ****
}
/* Return a copy of NAME, inserting a &
! before each &, each space, and any initial -.
Change spaces to underscores, too, so that the
return value never contains a space. */
--- 131,137 ----
}
/* Return a copy of NAME, inserting a &
! before each &, each space, each newline, and any initial -.
Change spaces to underscores, too, so that the
return value never contains a space. */
***************
*** 152,157 ****
--- 152,163 ----
*q++ = '_';
p++;
}
+ else if (*p == '\n')
+ {
+ *q++ = '&';
+ *q++ = 'n';
+ p++;
+ }
else
{
if (*p == '&' || (*p == '-' && p == name))
***************
*** 190,196 ****
{
if (alternate_editor)
{
! int i = optind -1 ;
execvp (alternate_editor, argv + i);
return;
}
--- 196,202 ----
{
if (alternate_editor)
{
! int i = optind - 1;
execvp (alternate_editor, argv + i);
return;
}
***************
*** 257,263 ****
{
char *system_name;
int system_name_length;
! int s, i;
FILE *out, *in;
struct sockaddr_un server;
#ifdef SERVER_HOME_DIR
--- 263,269 ----
{
char *system_name;
int system_name_length;
! int s, i, needlf = 0;
FILE *out, *in;
struct sockaddr_un server;
#ifdef SERVER_HOME_DIR
***************
*** 444,458 ****
return 0;
printf ("Waiting for Emacs...");
fflush (stdout);
! /* Now, wait for an answer and print any messages. On some systems,
! the first line we read will actually be the output we just sent.
! We can't predict whether that will happen, so if it does, we
! detect it by recognizing `Client: ' at the beginning. */
!
while ((str = fgets (string, BUFSIZ, in)))
! printf ("%s", str);
return 0;
}
--- 450,470 ----
return 0;
printf ("Waiting for Emacs...");
+ needlf = 2;
fflush (stdout);
! /* Now, wait for an answer and print any messages. */
while ((str = fgets (string, BUFSIZ, in)))
! {
! if (needlf == 2)
! printf ("\n");
! printf ("%s", str);
! needlf = str[0] == '\0' ? needlf : str[strlen (str) - 1] != '\n';
! }
!
! if (needlf)
! printf ("\n");
! fflush (stdout);
return 0;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lib-src/emacsclient.c,
Stefan Monnier <=