Code formatting fixes

This commit is contained in:
Michael Kerrisk 2007-04-05 14:17:54 +00:00
parent 9ee19dd556
commit 41798314b6
7 changed files with 16 additions and 9 deletions

View File

@ -310,7 +310,8 @@ unable to allocate memory for internal tables.
#include <unistd.h>
int
main(void) {
main(void)
{
fd_set rfds;
struct timeval tv;
int retval;

View File

@ -135,7 +135,6 @@ option in a received ancillary buffer:
.PP
.RS
.nf
.ta 8n 16n 32n
struct msghdr msgh;
struct cmsghdr *cmsg;
int *ttlptr;
@ -151,14 +150,13 @@ for (cmsg = CMSG_FIRSTHDR(&msgh);
received_ttl = *ttlptr;
break;
}
}
}
if (cmsg == NULL) {
/*
* Error: IP_TTL not enabled or small buffer
* or I/O error.
*/
}
.ta
.fi
.RE
.PP

View File

@ -313,7 +313,8 @@ with most of its features.
#include <getopt.h>
int
main(int argc, char **argv) {
main(int argc, char **argv)
{
int c;
int digit_optind = 0;

View File

@ -163,7 +163,9 @@ char *data[] = { "alpha", "bravo", "charlie", "delta",
"victor", "whisky", "x-ray", "yankee", "zulu"
};
int main() {
int
main(void)
{
ENTRY e, *ep;
int i;

View File

@ -50,7 +50,8 @@ wide characters.
.SH "EXAMPLE"
.nf
void *
combine (void *o1, size_t s1, void *o2, size_t s2) {
combine(void *o1, size_t s1, void *o2, size_t s2)
{
void *result = malloc(s1 + s2);
if (result != NULL)
mempcpy(mempcpy(result, o1, s1), o2, s2);

View File

@ -62,7 +62,9 @@ Something like
#include <time.h>
#include <stdlib.h>
time_t my_timegm (struct tm *tm) {
time_t
my_timegm(struct tm *tm)
{
time_t ret;
char *tz;

View File

@ -105,7 +105,9 @@ defined by
.sp
.nf
.in +5
char *tmpnam_r(char *s) {
char *
tmpnam_r(char *s)
{
return s ? tmpnam(s) : NULL;
}
.in