Mercurial > hg > xemacs-beta
comparison lib-src/gnuclient.c @ 278:90d73dddcdc4 r21-0b37
Import from CVS: tag r21-0b37
author | cvs |
---|---|
date | Mon, 13 Aug 2007 10:31:29 +0200 |
parents | c5d627a313b1 |
children | 57709be46d1b |
comparison
equal
deleted
inserted
replaced
277:cfdf3ff11843 | 278:90d73dddcdc4 |
---|---|
473 exit (1); | 473 exit (1); |
474 } | 474 } |
475 } /* eval_function || eval_form || load_library */ | 475 } /* eval_function || eval_form || load_library */ |
476 else if (batch) | 476 else if (batch) |
477 { | 477 { |
478 fprintf (stderr, "%s: `-batch' requires an evaluation\n", | 478 /* no sexp on the command line, so read it from stdin */ |
479 progname); | 479 int nb; |
480 exit (1); | 480 |
481 #if defined(INTERNET_DOMAIN_SOCKETS) | |
482 connect_type = make_connection (hostarg, port, &s); | |
483 #else | |
484 connect_type = make_connection (NULL, (u_short) 0, &s); | |
485 #endif | |
486 sprintf (command, "(gnuserv-eval%s '(progn ", quick ? "-quickly" : ""); | |
487 send_string (s, command); | |
488 | |
489 while ((nb = read(fileno(stdin), buffer, GSERV_BUFSZ-1)) > 0) | |
490 { | |
491 buffer[nb] = '\0'; | |
492 send_string(s, buffer); | |
493 } | |
494 send_string(s,"))"); | |
495 send_string (s, EOT_STR); | |
496 if (read_line (s, result) == 0) | |
497 { | |
498 fprintf (stderr, "%s: Could not read\n", progname); | |
499 exit (1); | |
500 } | |
481 } | 501 } |
482 | 502 |
483 if (!batch) | 503 if (!batch) |
484 { | 504 { |
485 if (suppress_windows_system) | 505 if (suppress_windows_system) |