format using gindent with personal options

This commit is contained in:
Bryan Stansell 2019-03-21 01:12:12 -07:00
parent 742da69935
commit 95c958d6b3
9 changed files with 80 additions and 55 deletions

View File

@ -87,6 +87,7 @@ char
" -V",
(char *)0
}, *u_help[] = {
"c cmd command to run",
"e env=value environment variable to set",
"g group initial group",
@ -94,9 +95,9 @@ char
"l login login name",
"t tty attach to this terminal",
"u do no make utmp entry",
"V show version information", (char *)0}, *pcCommand =
(char *)0, *pcGroup = (char *)0, *pcLogin = (char *)0, *pcTty =
(char *)0;
"V show version information", (char *)0
}, *pcCommand = (char *)0, *pcGroup = (char *)0, *pcLogin =
(char *)0, *pcTty = (char *)0;
int
fMakeUtmp = 1, iErrs = 0;

View File

@ -578,9 +578,11 @@ GetMaxFiles(void)
# else
# ifndef OPEN_MAX
# define OPEN_MAX 64
# endif /* !OPEN_MAX */
# endif
/* !OPEN_MAX */
mf = OPEN_MAX;
# endif /* HAVE_GETDTABLESIZE */
# endif
/* HAVE_GETDTABLESIZE */
# endif/* HAVE_GETRLIMIT */
#endif /* HAVE_SYSCONF */
#ifdef FD_SETSIZE
@ -2713,8 +2715,8 @@ ParseFile(char *filename, FILE *fp, int level)
case VALUE:
switch (token) {
case WORD:
(*sections[secIndex].items[keyIndex].
reg) (word->string);
(*sections[secIndex].
items[keyIndex].reg) (word->string);
state = SEMI;
break;
case SEMICOLON:

View File

@ -4154,9 +4154,8 @@ FlushConsole(CONSENT *pCEServing)
unsigned char next =
(unsigned char)pCEServing->wbuf->string[offset + 1];
if ((next >= '0' && next <= '9') ||
(next >= 'a' && next <= 'z') || (next == BREAK &&
pCEServing->type !=
HOST)) {
(next >= 'a' && next <= 'z')
|| (next == BREAK && pCEServing->type != HOST)) {
CONDDEBUG((1, "Kiddie(): heavy IAC for [%s]",
pCEServing->server));
offset += 2;
@ -4866,8 +4865,8 @@ Kiddie(GRPENT *pGE, int sfd)
CONDDEBUG((1, "Kiddie(): flushing fd %d",
FileFDNum(pCLServing->fd)));
if (FileWrite
(pCLServing->fd, FLAGFALSE, (char *)0,
0) < 0) {
(pCLServing->fd, FLAGFALSE, (char *)0, 0)
< 0) {
DisconnectClient(pGE, pCLServing, (char *)0,
FLAGTRUE);
break;
@ -5197,7 +5196,8 @@ Spawn(GRPENT *pGE, int msfd)
}
# if HAVE_SETSOCKOPT
if (setsockopt
(sfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true, sizeof(true)) < 0) {
(sfd, SOL_SOCKET, SO_REUSEADDR, (char *)&true, sizeof(true))
< 0) {
Error("Spawn(): setsockopt(%u,SO_REUSEADDR): %s", sfd,
strerror(errno));
Bye(EX_OSERR);

View File

@ -85,7 +85,8 @@ unsigned long dmallocMarkMain = 0;
#if HAVE_OPENSSL
# if OPENSSL_VERSION_NUMBER < 0x10100000L
int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
int
DH_set0_pqg(DH *dh, BIGNUM * p, BIGNUM * q, BIGNUM * g)
{
/* If the fields p and g in d are NULL, the corresponding input
* parameters MUST be non-NULL. q may remain NULL.
@ -122,7 +123,9 @@ DH *dh2048 = (DH *)0;
DH *dh4096 = (DH *)0;
DH *
DHFromArray(unsigned char *dh_p, size_t dh_p_size, unsigned char *dh_g, size_t dh_g_size) {
DHFromArray(unsigned char *dh_p, size_t dh_p_size, unsigned char *dh_g,
size_t dh_g_size)
{
DH *dh;
BIGNUM *p, *g;
@ -194,7 +197,8 @@ GetDH1024(void)
0x02,
};
return DHFromArray(dh1024_p, sizeof(dh1024_p), dh1024_g, sizeof(dh1024_g));
return DHFromArray(dh1024_p, sizeof(dh1024_p), dh1024_g,
sizeof(dh1024_g));
}
DH *
@ -232,7 +236,8 @@ GetDH2048(void)
0x02,
};
return DHFromArray(dh2048_p, sizeof(dh2048_p), dh2048_g, sizeof(dh2048_g));
return DHFromArray(dh2048_p, sizeof(dh2048_p), dh2048_g,
sizeof(dh2048_g));
}
DH *
@ -296,7 +301,8 @@ GetDH4096(void)
0x02,
};
return DHFromArray(dh4096_p, sizeof(dh4096_p), dh4096_g, sizeof(dh4096_g));
return DHFromArray(dh4096_p, sizeof(dh4096_p), dh4096_g,
sizeof(dh4096_g));
}
DH *

View File

@ -565,8 +565,8 @@ DoNormalRead(CONSCLIENT *pCLServing)
pRC = pRC->pRCuniq) {
s = ":@%s";
s += iSep;
FilePrint(pCLServing->fd, FLAGTRUE,
s, pRC->rhost);
FilePrint(pCLServing->fd, FLAGTRUE, s,
pRC->rhost);
iSep = 0;
}
}
@ -945,8 +945,8 @@ Master(void)
CONDDEBUG((1, "Master(): flushing fd %d",
FileFDNum(pCLServing->fd)));
if (FileWrite
(pCLServing->fd, FLAGFALSE, (char *)0,
0) < 0) {
(pCLServing->fd, FLAGFALSE, (char *)0, 0)
< 0) {
DropMasterClient(pCLServing, FLAGTRUE);
break;
}

16
package/run-gindent Executable file
View File

@ -0,0 +1,16 @@
#!/bin/bash
gindent -npro -i4 -ip4 -cli4 -br -brs -cdw -ce -npcs -ncs -nhnl -l75 -lc75 -nbbo -ppi1 `
echo -T SOCKADDR_STYPE
echo -T INADDR_STYPE
echo -T time_t
echo -T X509_STORE_CTX
echo -T FILE
echo -T SSL
echo -T fd_set
echo -T pam_handle_t
echo -T SSL_CTX
echo -T DH
sed -ne '/typedef/,/}/p' */*.[ch] | grep '^[ ]*}' | sed -e 's/[ ]*}/-T/' -e 's/;//' | sort -u
` */*.[ch]
rm */*.[ch]~