Mercurial > gftp.yaz
comparison lib/pty.c @ 179:8d933999bba6
2003-6-14 Brian Masney <masneyb@gftp.org>
* lib/cache.c (gftp_delete_cache_entry) - fix for restoring newlines
* lib/gftp.h lib/protocols.c - added EOF flag for gftp_get_line()
* lib/gftp.h lib/pty.c - added get_pty_impl() function for each PTY
type
* src/text/gftp-text.c - after removing files, clear the cache for
that directory
author | masneyb |
---|---|
date | Sat, 14 Jun 2003 14:14:01 +0000 |
parents | 8beb7bfca92b |
children | 82ebd1b05345 |
comparison
equal
deleted
inserted
replaced
178:8beb7bfca92b | 179:8d933999bba6 |
---|---|
19 | 19 |
20 static const char cvsid[] = "$Id$"; | 20 static const char cvsid[] = "$Id$"; |
21 | 21 |
22 #include "gftp.h" | 22 #include "gftp.h" |
23 | 23 |
24 #ifdef __sgi | |
24 | 25 |
25 #ifdef __sgi | 26 char * |
27 get_pty_impl (void) | |
28 { | |
29 return ("sgi"); | |
30 } | |
31 | |
26 | 32 |
27 int | 33 int |
28 open_ptys (gftp_request * request, int *fdm, int *fds) | 34 open_ptys (gftp_request * request, int *fdm, int *fds) |
29 { | 35 { |
30 char *pts_name; | 36 char *pts_name; |
40 | 46 |
41 return (0); | 47 return (0); |
42 } | 48 } |
43 | 49 |
44 #elif HAVE_GRANTPT | 50 #elif HAVE_GRANTPT |
51 | |
52 char * | |
53 get_pty_impl (void) | |
54 { | |
55 return ("unix98"); | |
56 } | |
57 | |
45 | 58 |
46 int | 59 int |
47 open_ptys (gftp_request * request, int *fdm, int *fds) | 60 open_ptys (gftp_request * request, int *fdm, int *fds) |
48 { | 61 { |
49 char *pts_name; | 62 char *pts_name; |
73 { | 86 { |
74 close (*fdm); | 87 close (*fdm); |
75 return (GFTP_ERETRYABLE); | 88 return (GFTP_ERETRYABLE); |
76 } | 89 } |
77 | 90 |
91 #ifdef SYSV | |
78 /* I intentionally ignore these errors */ | 92 /* I intentionally ignore these errors */ |
79 ioctl (*fds, I_PUSH, "ptem"); | 93 ioctl (*fds, I_PUSH, "ptem"); |
80 ioctl (*fds, I_PUSH, "ldterm"); | 94 ioctl (*fds, I_PUSH, "ldterm"); |
81 ioctl (*fds, I_PUSH, "ttcompat"); | 95 ioctl (*fds, I_PUSH, "ttcompat"); |
96 #endif | |
82 | 97 |
83 return (0); | 98 return (0); |
84 } | 99 } |
85 | 100 |
86 #elif HAVE_OPENPTY | 101 #elif HAVE_OPENPTY |
102 | |
103 char * | |
104 get_pty_impl (void) | |
105 { | |
106 return ("openpty"); | |
107 } | |
108 | |
87 | 109 |
88 int | 110 int |
89 open_ptys (gftp_request * request, int *fdm, int *fds) | 111 open_ptys (gftp_request * request, int *fdm, int *fds) |
90 { | 112 { |
91 char *pts_name; | 113 char *pts_name; |
99 } | 121 } |
100 | 122 |
101 #else /* !HAVE_OPENPTY */ | 123 #else /* !HAVE_OPENPTY */ |
102 | 124 |
103 /* Fall back to *BSD... */ | 125 /* Fall back to *BSD... */ |
126 | |
127 char * | |
128 get_pty_impl (void) | |
129 { | |
130 return ("bsd"); | |
131 } | |
132 | |
104 | 133 |
105 int | 134 int |
106 open_ptys (gftp_request * request, int *fdm, int *fds) | 135 open_ptys (gftp_request * request, int *fdm, int *fds) |
107 { | 136 { |
108 char pts_name[20], *pos1, *pos2; | 137 char pts_name[20], *pos1, *pos2; |