]>
git.saurik.com Git - apple/network_cmds.git/blob - telnet.tproj/utilities.c
2 * Copyright (c) 1988, 1993
3 * The Regents of the University of California. All rights reserved.
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above copyright
11 * notice, this list of conditions and the following disclaimer in the
12 * documentation and/or other materials provided with the distribution.
13 * 3. All advertising materials mentioning features or use of this software
14 * must display the following acknowledgement:
15 * This product includes software developed by the University of
16 * California, Berkeley and its contributors.
17 * 4. Neither the name of the University nor the names of its contributors
18 * may be used to endorse or promote products derived from this software
19 * without specific prior written permission.
21 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
34 #include <sys/cdefs.h>
37 __FBSDID("$FreeBSD: src/crypto/telnet/telnet/utilities.c,v 1.2.8.2 2002/04/13 10:59:08 markm Exp $");
41 static const char sccsid
[] = "@(#)utilities.c 8.3 (Berkeley) 5/30/95";
47 #include <arpa/telnet.h>
48 #include <sys/types.h>
49 #include <sys/socket.h>
65 #include <libtelnet/auth.h>
68 #include <libtelnet/encrypt.h>
71 FILE *NetTrace
= 0; /* Not in bss, since needs to stay */
77 * Upcase (in place) the argument.
81 upcase(char *argument
)
85 while ((c
= *argument
) != 0) {
87 *argument
= toupper(c
);
96 * Compensate for differences in 4.2 and 4.3 systems.
100 SetSockOpt(int fd
, int level
, int option
, int yesno
)
102 return setsockopt(fd
, level
, option
,
103 (char *)&yesno
, sizeof yesno
);
107 * The following are routines used to print out debugging information.
110 unsigned char NetTraceFile
[256] = "(standard output)";
113 SetNetTrace(char *file
)
115 if (NetTrace
&& NetTrace
!= stdout
)
117 if (file
&& (strcmp(file
, "-") != 0)) {
118 NetTrace
= fopen(file
, "w");
120 strcpy((char *)NetTraceFile
, file
);
123 fprintf(stderr
, "Cannot open %s.\n", file
);
126 strcpy((char *)NetTraceFile
, "(standard output)");
130 Dump(char direction
, unsigned char *buffer
, int length
)
132 # define BYTES_PER_LINE 32
133 # define min(x,y) ((x<y)? x:y)
134 unsigned char *pThis
;
141 fprintf(NetTrace
, "%c 0x%x\t", direction
, offset
);
144 buffer
= buffer
+ min(length
, BYTES_PER_LINE
/2);
145 while (pThis
< buffer
) {
146 fprintf(NetTrace
, "%c%.2x",
147 (((*pThis
)&0xff) == 0xff) ? '*' : ' ',
151 length
-= BYTES_PER_LINE
/2;
152 offset
+= BYTES_PER_LINE
/2;
154 buffer
= buffer
+ min(length
, BYTES_PER_LINE
);
155 while (pThis
< buffer
) {
156 fprintf(NetTrace
, "%.2x", (*pThis
)&0xff);
159 length
-= BYTES_PER_LINE
;
160 offset
+= BYTES_PER_LINE
;
162 if (NetTrace
== stdout
) {
163 fprintf(NetTrace
, "\r\n");
165 fprintf(NetTrace
, "\n");
171 /* find next unique line */
178 printoption(const char *direction
, int cmd
, int option
)
183 if (TELCMD_OK(option
))
184 fprintf(NetTrace
, "%s IAC %s", direction
, TELCMD(option
));
186 fprintf(NetTrace
, "%s IAC %d", direction
, option
);
189 fmt
= (cmd
== WILL
) ? "WILL" : (cmd
== WONT
) ? "WONT" :
190 (cmd
== DO
) ? "DO" : (cmd
== DONT
) ? "DONT" : 0;
192 fprintf(NetTrace
, "%s %s ", direction
, fmt
);
193 if (TELOPT_OK(option
))
194 fprintf(NetTrace
, "%s", TELOPT(option
));
195 else if (option
== TELOPT_EXOPL
)
196 fprintf(NetTrace
, "EXOPL");
198 fprintf(NetTrace
, "%d", option
);
200 fprintf(NetTrace
, "%s %d %d", direction
, cmd
, option
);
202 if (NetTrace
== stdout
) {
203 fprintf(NetTrace
, "\r\n");
206 fprintf(NetTrace
, "\n");
215 extern char will_wont_resp
[], do_dont_resp
[];
217 for (i
= 0; i
< 256; i
++) {
218 if (do_dont_resp
[i
]) {
220 printf("resp DO_DONT %s: %d\n", TELOPT(i
), do_dont_resp
[i
]);
221 else if (TELCMD_OK(i
))
222 printf("resp DO_DONT %s: %d\n", TELCMD(i
), do_dont_resp
[i
]);
224 printf("resp DO_DONT %d: %d\n", i
,
226 if (my_want_state_is_do(i
)) {
228 printf("want DO %s\n", TELOPT(i
));
229 else if (TELCMD_OK(i
))
230 printf("want DO %s\n", TELCMD(i
));
232 printf("want DO %d\n", i
);
235 printf("want DONT %s\n", TELOPT(i
));
236 else if (TELCMD_OK(i
))
237 printf("want DONT %s\n", TELCMD(i
));
239 printf("want DONT %d\n", i
);
242 if (my_state_is_do(i
)) {
244 printf(" DO %s\n", TELOPT(i
));
245 else if (TELCMD_OK(i
))
246 printf(" DO %s\n", TELCMD(i
));
248 printf(" DO %d\n", i
);
251 if (will_wont_resp
[i
]) {
253 printf("resp WILL_WONT %s: %d\n", TELOPT(i
), will_wont_resp
[i
]);
254 else if (TELCMD_OK(i
))
255 printf("resp WILL_WONT %s: %d\n", TELCMD(i
), will_wont_resp
[i
]);
257 printf("resp WILL_WONT %d: %d\n",
258 i
, will_wont_resp
[i
]);
259 if (my_want_state_is_will(i
)) {
261 printf("want WILL %s\n", TELOPT(i
));
262 else if (TELCMD_OK(i
))
263 printf("want WILL %s\n", TELCMD(i
));
265 printf("want WILL %d\n", i
);
268 printf("want WONT %s\n", TELOPT(i
));
269 else if (TELCMD_OK(i
))
270 printf("want WONT %s\n", TELCMD(i
));
272 printf("want WONT %d\n", i
);
275 if (my_state_is_will(i
)) {
277 printf(" WILL %s\n", TELOPT(i
));
278 else if (TELCMD_OK(i
))
279 printf(" WILL %s\n", TELCMD(i
));
281 printf(" WILL %d\n", i
);
289 printsub(char direction
, unsigned char *pointer
, int length
)
292 #ifdef AUTHENTICATION
295 extern int want_status_response
;
297 if (showoptions
|| direction
== 0 ||
298 (want_status_response
&& (pointer
[0] == TELOPT_STATUS
))) {
300 fprintf(NetTrace
, "%s IAC SB ",
301 (direction
== '<')? "RCVD":"SENT");
305 i
= pointer
[length
-2];
306 j
= pointer
[length
-1];
308 if (i
!= IAC
|| j
!= SE
) {
309 fprintf(NetTrace
, "(terminated by ");
311 fprintf(NetTrace
, "%s ", TELOPT(i
));
312 else if (TELCMD_OK(i
))
313 fprintf(NetTrace
, "%s ", TELCMD(i
));
315 fprintf(NetTrace
, "%d ", i
);
317 fprintf(NetTrace
, "%s", TELOPT(j
));
318 else if (TELCMD_OK(j
))
319 fprintf(NetTrace
, "%s", TELCMD(j
));
321 fprintf(NetTrace
, "%d", j
);
322 fprintf(NetTrace
, ", not IAC SE!) ");
328 fprintf(NetTrace
, "(Empty suboption??\?)");
329 if (NetTrace
== stdout
)
333 switch (pointer
[0]) {
335 fprintf(NetTrace
, "TERMINAL-TYPE ");
336 switch (pointer
[1]) {
338 fprintf(NetTrace
, "IS \"%.*s\"", length
-2, (char *)pointer
+2);
341 fprintf(NetTrace
, "SEND");
345 "- unknown qualifier %d (0x%x).",
346 pointer
[1], pointer
[1]);
350 fprintf(NetTrace
, "TERMINAL-SPEED");
352 fprintf(NetTrace
, " (empty suboption??\?)");
355 switch (pointer
[1]) {
357 fprintf(NetTrace
, " IS ");
358 fprintf(NetTrace
, "%.*s", length
-2, (char *)pointer
+2);
362 fprintf(NetTrace
, " SEND");
364 fprintf(NetTrace
, " %d (unknown)", pointer
[1]);
365 for (i
= 2; i
< length
; i
++)
366 fprintf(NetTrace
, " ?%d?", pointer
[i
]);
372 fprintf(NetTrace
, "TOGGLE-FLOW-CONTROL");
374 fprintf(NetTrace
, " (empty suboption??\?)");
377 switch (pointer
[1]) {
379 fprintf(NetTrace
, " OFF"); break;
381 fprintf(NetTrace
, " ON"); break;
382 case LFLOW_RESTART_ANY
:
383 fprintf(NetTrace
, " RESTART-ANY"); break;
384 case LFLOW_RESTART_XON
:
385 fprintf(NetTrace
, " RESTART-XON"); break;
387 fprintf(NetTrace
, " %d (unknown)", pointer
[1]);
389 for (i
= 2; i
< length
; i
++)
390 fprintf(NetTrace
, " ?%d?", pointer
[i
]);
394 fprintf(NetTrace
, "NAWS");
396 fprintf(NetTrace
, " (empty suboption??\?)");
400 fprintf(NetTrace
, " ?%d?", pointer
[1]);
403 fprintf(NetTrace
, " %d %d (%d)",
404 pointer
[1], pointer
[2],
405 (int)((((unsigned int)pointer
[1])<<8)|((unsigned int)pointer
[2])));
407 fprintf(NetTrace
, " ?%d?", pointer
[3]);
410 fprintf(NetTrace
, " %d %d (%d)",
411 pointer
[3], pointer
[4],
412 (int)((((unsigned int)pointer
[3])<<8)|((unsigned int)pointer
[4])));
413 for (i
= 5; i
< length
; i
++)
414 fprintf(NetTrace
, " ?%d?", pointer
[i
]);
417 #ifdef AUTHENTICATION
418 case TELOPT_AUTHENTICATION
:
419 fprintf(NetTrace
, "AUTHENTICATION");
421 fprintf(NetTrace
, " (empty suboption??\?)");
424 switch (pointer
[1]) {
427 fprintf(NetTrace
, " %s ", (pointer
[1] == TELQUAL_IS
) ?
429 if (AUTHTYPE_NAME_OK(pointer
[2]))
430 fprintf(NetTrace
, "%s ", AUTHTYPE_NAME(pointer
[2]));
432 fprintf(NetTrace
, "%d ", pointer
[2]);
434 fprintf(NetTrace
, "(partial suboption??\?)");
437 fprintf(NetTrace
, "%s|%s",
438 ((pointer
[3] & AUTH_WHO_MASK
) == AUTH_WHO_CLIENT
) ?
440 ((pointer
[3] & AUTH_HOW_MASK
) == AUTH_HOW_MUTUAL
) ?
441 "MUTUAL" : "ONE-WAY");
443 auth_printsub(&pointer
[1], length
- 1, buf
, sizeof(buf
));
444 fprintf(NetTrace
, "%s", buf
);
449 fprintf(NetTrace
, " SEND ");
451 if (AUTHTYPE_NAME_OK(pointer
[i
]))
452 fprintf(NetTrace
, "%s ", AUTHTYPE_NAME(pointer
[i
]));
454 fprintf(NetTrace
, "%d ", pointer
[i
]);
456 fprintf(NetTrace
, "(partial suboption??\?)");
459 fprintf(NetTrace
, "%s|%s ",
460 ((pointer
[i
] & AUTH_WHO_MASK
) == AUTH_WHO_CLIENT
) ?
462 ((pointer
[i
] & AUTH_HOW_MASK
) == AUTH_HOW_MUTUAL
) ?
463 "MUTUAL" : "ONE-WAY");
470 fprintf(NetTrace
, " NAME \"");
472 putc(pointer
[i
++], NetTrace
);
477 for (i
= 2; i
< length
; i
++)
478 fprintf(NetTrace
, " ?%d?", pointer
[i
]);
486 fprintf(NetTrace
, "ENCRYPT");
488 fprintf(NetTrace
, " (empty suboption??\?)");
491 switch (pointer
[1]) {
493 fprintf(NetTrace
, " START");
497 fprintf(NetTrace
, " END");
500 case ENCRYPT_REQSTART
:
501 fprintf(NetTrace
, " REQUEST-START");
505 fprintf(NetTrace
, " REQUEST-END");
510 fprintf(NetTrace
, " %s ", (pointer
[1] == ENCRYPT_IS
) ?
513 fprintf(NetTrace
, " (partial suboption??\?)");
516 if (ENCTYPE_NAME_OK(pointer
[2]))
517 fprintf(NetTrace
, "%s ", ENCTYPE_NAME(pointer
[2]));
519 fprintf(NetTrace
, " %d (unknown)", pointer
[2]);
521 encrypt_printsub(&pointer
[1], length
- 1, buf
, sizeof(buf
));
522 fprintf(NetTrace
, "%s", buf
);
525 case ENCRYPT_SUPPORT
:
527 fprintf(NetTrace
, " SUPPORT ");
529 if (ENCTYPE_NAME_OK(pointer
[i
]))
530 fprintf(NetTrace
, "%s ", ENCTYPE_NAME(pointer
[i
]));
532 fprintf(NetTrace
, "%d ", pointer
[i
]);
537 case ENCRYPT_ENC_KEYID
:
538 fprintf(NetTrace
, " ENC_KEYID ");
541 case ENCRYPT_DEC_KEYID
:
542 fprintf(NetTrace
, " DEC_KEYID ");
546 fprintf(NetTrace
, " %d (unknown)", pointer
[1]);
548 for (i
= 2; i
< length
; i
++)
549 fprintf(NetTrace
, " %d", pointer
[i
]);
553 #endif /* ENCRYPTION */
555 case TELOPT_LINEMODE
:
556 fprintf(NetTrace
, "LINEMODE ");
558 fprintf(NetTrace
, " (empty suboption??\?)");
561 switch (pointer
[1]) {
563 fprintf(NetTrace
, "WILL ");
566 fprintf(NetTrace
, "WONT ");
569 fprintf(NetTrace
, "DO ");
572 fprintf(NetTrace
, "DONT ");
575 fprintf(NetTrace
, "(no option??\?)");
578 switch (pointer
[2]) {
580 fprintf(NetTrace
, "Forward Mask");
581 for (i
= 3; i
< length
; i
++)
582 fprintf(NetTrace
, " %x", pointer
[i
]);
585 fprintf(NetTrace
, "%d (unknown)", pointer
[2]);
586 for (i
= 3; i
< length
; i
++)
587 fprintf(NetTrace
, " %d", pointer
[i
]);
593 fprintf(NetTrace
, "SLC");
594 for (i
= 2; i
< length
- 2; i
+= 3) {
595 if (SLC_NAME_OK(pointer
[i
+SLC_FUNC
]))
596 fprintf(NetTrace
, " %s", SLC_NAME(pointer
[i
+SLC_FUNC
]));
598 fprintf(NetTrace
, " %d", pointer
[i
+SLC_FUNC
]);
599 switch (pointer
[i
+SLC_FLAGS
]&SLC_LEVELBITS
) {
601 fprintf(NetTrace
, " NOSUPPORT"); break;
603 fprintf(NetTrace
, " CANTCHANGE"); break;
605 fprintf(NetTrace
, " VARIABLE"); break;
607 fprintf(NetTrace
, " DEFAULT"); break;
609 fprintf(NetTrace
, "%s%s%s",
610 pointer
[i
+SLC_FLAGS
]&SLC_ACK
? "|ACK" : "",
611 pointer
[i
+SLC_FLAGS
]&SLC_FLUSHIN
? "|FLUSHIN" : "",
612 pointer
[i
+SLC_FLAGS
]&SLC_FLUSHOUT
? "|FLUSHOUT" : "");
613 if (pointer
[i
+SLC_FLAGS
]& ~(SLC_ACK
|SLC_FLUSHIN
|
614 SLC_FLUSHOUT
| SLC_LEVELBITS
))
615 fprintf(NetTrace
, "(0x%x)", pointer
[i
+SLC_FLAGS
]);
616 fprintf(NetTrace
, " %d;", pointer
[i
+SLC_VALUE
]);
617 if ((pointer
[i
+SLC_VALUE
] == IAC
) &&
618 (pointer
[i
+SLC_VALUE
+1] == IAC
))
621 for (; i
< length
; i
++)
622 fprintf(NetTrace
, " ?%d?", pointer
[i
]);
626 fprintf(NetTrace
, "MODE ");
628 fprintf(NetTrace
, "(no mode??\?)");
633 sprintf(tbuf
, "%s%s%s%s%s",
634 pointer
[2]&MODE_EDIT
? "|EDIT" : "",
635 pointer
[2]&MODE_TRAPSIG
? "|TRAPSIG" : "",
636 pointer
[2]&MODE_SOFT_TAB
? "|SOFT_TAB" : "",
637 pointer
[2]&MODE_LIT_ECHO
? "|LIT_ECHO" : "",
638 pointer
[2]&MODE_ACK
? "|ACK" : "");
639 fprintf(NetTrace
, "%s", tbuf
[1] ? &tbuf
[1] : "0");
641 if (pointer
[2]&~(MODE_MASK
))
642 fprintf(NetTrace
, " (0x%x)", pointer
[2]);
643 for (i
= 3; i
< length
; i
++)
644 fprintf(NetTrace
, " ?0x%x?", pointer
[i
]);
647 fprintf(NetTrace
, "%d (unknown)", pointer
[1]);
648 for (i
= 2; i
< length
; i
++)
649 fprintf(NetTrace
, " %d", pointer
[i
]);
653 case TELOPT_STATUS
: {
657 fprintf(NetTrace
, "STATUS");
659 switch (pointer
[1]) {
661 if (pointer
[1] == TELQUAL_SEND
)
662 fprintf(NetTrace
, " SEND");
664 fprintf(NetTrace
, " %d (unknown)", pointer
[1]);
665 for (i
= 2; i
< length
; i
++)
666 fprintf(NetTrace
, " ?%d?", pointer
[i
]);
669 if (--want_status_response
< 0)
670 want_status_response
= 0;
671 if (NetTrace
== stdout
)
672 fprintf(NetTrace
, " IS\r\n");
674 fprintf(NetTrace
, " IS\n");
676 for (i
= 2; i
< length
; i
++) {
678 case DO
: cp
= "DO"; goto common2
;
679 case DONT
: cp
= "DONT"; goto common2
;
680 case WILL
: cp
= "WILL"; goto common2
;
681 case WONT
: cp
= "WONT"; goto common2
;
684 if (TELOPT_OK((int)pointer
[i
]))
685 fprintf(NetTrace
, " %s %s", cp
, TELOPT(pointer
[i
]));
687 fprintf(NetTrace
, " %s %d", cp
, pointer
[i
]);
689 if (NetTrace
== stdout
)
690 fprintf(NetTrace
, "\r\n");
692 fprintf(NetTrace
, "\n");
696 fprintf(NetTrace
, " SB ");
700 if (pointer
[j
] == SE
) {
703 if (pointer
[j
+1] == SE
)
708 pointer
[k
++] = pointer
[j
++];
710 printsub(0, &pointer
[i
], k
- i
);
712 fprintf(NetTrace
, " SE");
717 if (NetTrace
== stdout
)
718 fprintf(NetTrace
, "\r\n");
720 fprintf(NetTrace
, "\n");
725 fprintf(NetTrace
, " %d", pointer
[i
]);
734 case TELOPT_XDISPLOC
:
735 fprintf(NetTrace
, "X-DISPLAY-LOCATION ");
736 switch (pointer
[1]) {
738 fprintf(NetTrace
, "IS \"%.*s\"", length
-2, (char *)pointer
+2);
741 fprintf(NetTrace
, "SEND");
744 fprintf(NetTrace
, "- unknown qualifier %d (0x%x).",
745 pointer
[1], pointer
[1]);
749 case TELOPT_NEW_ENVIRON
:
750 fprintf(NetTrace
, "NEW-ENVIRON ");
753 case TELOPT_OLD_ENVIRON
:
754 fprintf(NetTrace
, "OLD-ENVIRON");
757 switch (pointer
[1]) {
759 fprintf(NetTrace
, "IS ");
762 fprintf(NetTrace
, "SEND ");
765 fprintf(NetTrace
, "INFO ");
769 #if defined(ENV_HACK) && defined(OLD_ENVIRON)
770 extern int old_env_var
, old_env_value
;
772 for (i
= 2; i
< length
; i
++ ) {
773 switch (pointer
[i
]) {
776 /* case NEW_ENV_OVAR: */
777 if (pointer
[0] == TELOPT_OLD_ENVIRON
) {
779 if (old_env_var
== OLD_ENV_VALUE
)
780 fprintf(NetTrace
, "\" (VALUE) " + noquote
);
783 fprintf(NetTrace
, "\" VAR " + noquote
);
785 #endif /* OLD_ENVIRON */
786 fprintf(NetTrace
, "\" VALUE " + noquote
);
792 /* case OLD_ENV_VALUE: */
793 if (pointer
[0] == TELOPT_OLD_ENVIRON
) {
795 if (old_env_value
== OLD_ENV_VAR
)
796 fprintf(NetTrace
, "\" (VAR) " + noquote
);
799 fprintf(NetTrace
, "\" VALUE " + noquote
);
801 #endif /* OLD_ENVIRON */
802 fprintf(NetTrace
, "\" VAR " + noquote
);
807 fprintf(NetTrace
, "\" ESC " + noquote
);
812 fprintf(NetTrace
, "\" USERVAR " + noquote
);
817 if (isprint(pointer
[i
]) && pointer
[i
] != '"') {
822 putc(pointer
[i
], NetTrace
);
824 fprintf(NetTrace
, "\" %03o " + noquote
,
839 if (TELOPT_OK(pointer
[0]))
840 fprintf(NetTrace
, "%s (unknown)", TELOPT(pointer
[0]));
842 fprintf(NetTrace
, "%d (unknown)", pointer
[0]);
843 for (i
= 1; i
< length
; i
++)
844 fprintf(NetTrace
, " %d", pointer
[i
]);
848 if (NetTrace
== stdout
)
849 fprintf(NetTrace
, "\r\n");
851 fprintf(NetTrace
, "\n");
853 if (NetTrace
== stdout
)
858 /* EmptyTerminal - called to make sure that the terminal buffer is empty.
859 * Note that we consider the buffer to run all the
860 * way to the kernel (thus the select).
870 if (TTYBYTES() == 0) {
872 (void) select(tout
+1, (fd_set
*) 0, &o
, (fd_set
*) 0,
873 (struct timeval
*) 0); /* wait for TTLOWAT */
878 (void) select(tout
+1, (fd_set
*) 0, &o
, (fd_set
*) 0,
879 (struct timeval
*) 0); /* wait for TTLOWAT */
889 (void)telrcv(); /* Process any incoming data */
891 } while (ring_full_count(&netiring
)); /* While there is any */
896 EmptyTerminal(); /* Flush the path to the tty */
908 ExitString(const char *string
, int returnCode
)
911 fwrite(string
, 1, strlen(string
), stderr
);