mirror of
https://github.com/moparisthebest/socat
synced 2024-12-21 14:38:48 -05:00
replaced // comments with C conforming /* */
This commit is contained in:
parent
0e1eb7e4b4
commit
d70b8963aa
@ -127,11 +127,11 @@ int main(int argc, const char *argv[]) {
|
||||
exit(1);
|
||||
}
|
||||
if (outfname) {
|
||||
// special cases
|
||||
/* special cases */
|
||||
if (!strcmp(outfname,"stdin")) { fdout=stdin; }
|
||||
else if (!strcmp(outfname,"stdout")) { fdout=stdout; }
|
||||
else if (!strcmp(outfname,"stderr")) { fdout=stderr; }
|
||||
// file descriptor
|
||||
/* file descriptor */
|
||||
else if (*outfname == '+') {
|
||||
a = outfname+1;
|
||||
fildes = strtoul(a, (char **)&a, 0);
|
||||
@ -140,7 +140,7 @@ int main(int argc, const char *argv[]) {
|
||||
exit(1);
|
||||
}
|
||||
} else {
|
||||
// file name
|
||||
/* file name */
|
||||
if ((fdout = fopen(outfname, "w")) == NULL) {
|
||||
Error2("can't fopen '%s': %s\n",
|
||||
outfname, strerror(errno));
|
||||
|
2
sycls.c
2
sycls.c
@ -678,7 +678,7 @@ int Chmod(const char *path, mode_t mode) {
|
||||
int Poll(struct pollfd *ufds, unsigned int nfds, int timeout) {
|
||||
int result;
|
||||
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[2].fd, ufds[2].events, ufds[3].fd, ufds[3].events,
|
||||
nfds, timeout);
|
||||
|
@ -149,14 +149,10 @@ char *sockaddr_info(const struct sockaddr *sa, socklen_t salen, char *buff, size
|
||||
if (salen > XIOUNIXSOCKOVERHEAD &&
|
||||
sa->sa_data[0] == '\0') {
|
||||
char *nextc;
|
||||
// nextc =
|
||||
// sanitize_string((char *)&sa->sa_data+1, salen-XIOUNIXSOCKOVERHEAD-1,
|
||||
// ubuff, XIOSAN_DEFAULT_BACKSLASH_OCT_3);
|
||||
nextc =
|
||||
sanitize_string((char *)&sa->sa_data, salen-XIOUNIXSOCKOVERHEAD,
|
||||
ubuff, XIOSAN_DEFAULT_BACKSLASH_OCT_3);
|
||||
*nextc = '\0';
|
||||
// snprintf(cp, blen, "\"\\0%s\"", ubuff);
|
||||
snprintf(cp, blen, "\"%s\"", ubuff);
|
||||
} else
|
||||
#endif /* WITH_ABSTRACT_UNIXSOCKET */
|
||||
|
@ -47,13 +47,14 @@ const struct optdesc opt_route = { "route", NULL, O
|
||||
#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>") };
|
||||
// "if-name"=tun3
|
||||
/* "if-name"=tun3
|
||||
// "route"=address/netmask
|
||||
// "ip6-route"=address/netmask
|
||||
// "iff-broadcast"
|
||||
// "iff-debug"
|
||||
// "iff-promisc"
|
||||
// see .../linux/if.h
|
||||
*/
|
||||
|
||||
|
||||
#if LATER
|
||||
|
Loading…
Reference in New Issue
Block a user