1
0
mirror of https://github.com/moparisthebest/socat synced 2024-12-22 06:58:47 -05:00

replaced // comments with C conforming /* */

This commit is contained in:
Gerhard Rieger 2008-09-19 09:05:08 +02:00
parent 0e1eb7e4b4
commit d70b8963aa
4 changed files with 6 additions and 9 deletions

View File

@ -127,11 +127,11 @@ int main(int argc, const char *argv[]) {
exit(1); exit(1);
} }
if (outfname) { if (outfname) {
// special cases /* special cases */
if (!strcmp(outfname,"stdin")) { fdout=stdin; } if (!strcmp(outfname,"stdin")) { fdout=stdin; }
else if (!strcmp(outfname,"stdout")) { fdout=stdout; } else if (!strcmp(outfname,"stdout")) { fdout=stdout; }
else if (!strcmp(outfname,"stderr")) { fdout=stderr; } else if (!strcmp(outfname,"stderr")) { fdout=stderr; }
// file descriptor /* file descriptor */
else if (*outfname == '+') { else if (*outfname == '+') {
a = outfname+1; a = outfname+1;
fildes = strtoul(a, (char **)&a, 0); fildes = strtoul(a, (char **)&a, 0);
@ -140,7 +140,7 @@ int main(int argc, const char *argv[]) {
exit(1); exit(1);
} }
} else { } else {
// file name /* file name */
if ((fdout = fopen(outfname, "w")) == NULL) { if ((fdout = fopen(outfname, "w")) == NULL) {
Error2("can't fopen '%s': %s\n", Error2("can't fopen '%s': %s\n",
outfname, strerror(errno)); outfname, strerror(errno));

View File

@ -678,7 +678,7 @@ int Chmod(const char *path, mode_t mode) {
int Poll(struct pollfd *ufds, unsigned int nfds, int timeout) { int Poll(struct pollfd *ufds, unsigned int nfds, int timeout) {
int result; int result;
if (nfds == 4) { if (nfds == 4) {
Debug10("poll({%d,0x%02hx,}{%d,0x%02hx,}{%d,0x%02hx,}{%d,0x%02hx,}, , %u, %d)", Debug10("poll({%d,0x%02hx,}{%d,0x%02hx,}{%d,0x%02hx,}{%d,0x%02hx,}, %u, %d)",
ufds[0].fd, ufds[0].events, ufds[1].fd, ufds[1].events, ufds[0].fd, ufds[0].events, ufds[1].fd, ufds[1].events,
ufds[2].fd, ufds[2].events, ufds[3].fd, ufds[3].events, ufds[2].fd, ufds[2].events, ufds[3].fd, ufds[3].events,
nfds, timeout); nfds, timeout);

View File

@ -149,14 +149,10 @@ char *sockaddr_info(const struct sockaddr *sa, socklen_t salen, char *buff, size
if (salen > XIOUNIXSOCKOVERHEAD && if (salen > XIOUNIXSOCKOVERHEAD &&
sa->sa_data[0] == '\0') { sa->sa_data[0] == '\0') {
char *nextc; char *nextc;
// nextc =
// sanitize_string((char *)&sa->sa_data+1, salen-XIOUNIXSOCKOVERHEAD-1,
// ubuff, XIOSAN_DEFAULT_BACKSLASH_OCT_3);
nextc = nextc =
sanitize_string((char *)&sa->sa_data, salen-XIOUNIXSOCKOVERHEAD, sanitize_string((char *)&sa->sa_data, salen-XIOUNIXSOCKOVERHEAD,
ubuff, XIOSAN_DEFAULT_BACKSLASH_OCT_3); ubuff, XIOSAN_DEFAULT_BACKSLASH_OCT_3);
*nextc = '\0'; *nextc = '\0';
// snprintf(cp, blen, "\"\\0%s\"", ubuff);
snprintf(cp, blen, "\"%s\"", ubuff); snprintf(cp, blen, "\"%s\"", ubuff);
} else } else
#endif /* WITH_ABSTRACT_UNIXSOCKET */ #endif /* WITH_ABSTRACT_UNIXSOCKET */

View File

@ -47,13 +47,14 @@ const struct optdesc opt_route = { "route", NULL, O
#endif #endif
const struct addrdesc xioaddr_tun = { "tun", 3, xioopen_tun, GROUP_FD|GROUP_CHR|GROUP_NAMED|GROUP_OPEN|GROUP_TUN, 0, 0, 0 HELP(":<ip-addr>/<bits>") }; const struct addrdesc xioaddr_tun = { "tun", 3, xioopen_tun, GROUP_FD|GROUP_CHR|GROUP_NAMED|GROUP_OPEN|GROUP_TUN, 0, 0, 0 HELP(":<ip-addr>/<bits>") };
// "if-name"=tun3 /* "if-name"=tun3
// "route"=address/netmask // "route"=address/netmask
// "ip6-route"=address/netmask // "ip6-route"=address/netmask
// "iff-broadcast" // "iff-broadcast"
// "iff-debug" // "iff-debug"
// "iff-promisc" // "iff-promisc"
// see .../linux/if.h // see .../linux/if.h
*/
#if LATER #if LATER