- if (strprefix ("-emacs-pid ", string))
- {
- /* -emacs-pid PID: The process id of the Emacs process. */
- emacs_pid = strtol (string + strlen ("-emacs-pid"), NULL, 10);
- }
- else if (strprefix ("-window-system-unsupported ", string))
- {
- /* -window-system-unsupported: Emacs was compiled without X
- support. Try again on the terminal. */
- nowait = 0;
- tty = 1;
- goto retry;
- }
- else if (strprefix ("-print ", string))
- {
- /* -print STRING: Print STRING on the terminal. */
- str = unquote_argument (string + strlen ("-print "));
- if (needlf)
- printf ("\n");
- printf ("%s", str);
- needlf = str[0] == '\0' ? needlf : str[strlen (str) - 1] != '\n';
- }
- else if (strprefix ("-error ", string))
- {
- /* -error DESCRIPTION: Signal an error on the terminal. */
- str = unquote_argument (string + strlen ("-error "));
- if (needlf)
- printf ("\n");
- fprintf (stderr, "*ERROR*: %s", str);
- needlf = str[0] == '\0' ? needlf : str[strlen (str) - 1] != '\n';
- exit_status = EXIT_FAILURE;
- }
+ if (strprefix ("-emacs-pid ", p))
+ {
+ /* -emacs-pid PID: The process id of the Emacs process. */
+ emacs_pid = strtol (p + strlen ("-emacs-pid"), NULL, 10);
+ }
+ else if (strprefix ("-window-system-unsupported ", p))
+ {
+ /* -window-system-unsupported: Emacs was compiled without support
+ for whatever window system we tried. Try the alternate
+ display, or, failing that, try the terminal. */
+ if (alt_display)
+ {
+ display = alt_display;
+ alt_display = NULL;
+ }
+ else
+ {
+ nowait = 0;
+ tty = 1;
+ }
+
+ goto retry;
+ }
+ else if (strprefix ("-print ", p))
+ {
+ /* -print STRING: Print STRING on the terminal. */
+ str = unquote_argument (p + strlen ("-print "));
+ if (needlf)
+ printf ("\n");
+ printf ("%s", str);
+ needlf = str[0] == '\0' ? needlf : str[strlen (str) - 1] != '\n';
+ }
+ else if (strprefix ("-print-nonl ", p))
+ {
+ /* -print-nonl STRING: Print STRING on the terminal.
+ Used to continue a preceding -print command. */
+ str = unquote_argument (p + strlen ("-print-nonl "));
+ printf ("%s", str);
+ needlf = str[0] == '\0' ? needlf : str[strlen (str) - 1] != '\n';
+ }
+ else if (strprefix ("-error ", p))
+ {
+ /* -error DESCRIPTION: Signal an error on the terminal. */
+ str = unquote_argument (p + strlen ("-error "));
+ if (needlf)
+ printf ("\n");
+ fprintf (stderr, "*ERROR*: %s", str);
+ needlf = str[0] == '\0' ? needlf : str[strlen (str) - 1] != '\n';
+ exit_status = EXIT_FAILURE;
+ }