Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/fs/cd9660 whitespace cleanup
details: https://anonhg.NetBSD.org/src/rev/b9049c62b2c7
branches: trunk
changeset: 571371:b9049c62b2c7
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Sat Nov 20 19:56:44 2004 +0000
description:
whitespace cleanup
diffstat:
sys/fs/cd9660/cd9660_rrip.c | 110 ++++++++++++++++++++++----------------------
1 files changed, 55 insertions(+), 55 deletions(-)
diffs (truncated from 403 to 300 lines):
diff -r 2e040ac72d60 -r b9049c62b2c7 sys/fs/cd9660/cd9660_rrip.c
--- a/sys/fs/cd9660/cd9660_rrip.c Sat Nov 20 06:40:01 2004 +0000
+++ b/sys/fs/cd9660/cd9660_rrip.c Sat Nov 20 19:56:44 2004 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: cd9660_rrip.c,v 1.3 2003/08/07 16:31:35 agc Exp $ */
+/* $NetBSD: cd9660_rrip.c,v 1.4 2004/11/20 19:56:44 jdolecek Exp $ */
/*-
* Copyright (c) 1993, 1994
@@ -37,7 +37,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: cd9660_rrip.c,v 1.3 2003/08/07 16:31:35 agc Exp $");
+__KERNEL_RCSID(0, "$NetBSD: cd9660_rrip.c,v 1.4 2004/11/20 19:56:44 jdolecek Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -123,14 +123,14 @@
ISO_RRIP_SLINK_COMPONENT *pcompe;
int len, wlen, cont;
char *outbuf, *inbuf;
-
+
pcomp = (ISO_RRIP_SLINK_COMPONENT *)p->component;
pcompe = (ISO_RRIP_SLINK_COMPONENT *)
((char *)p + isonum_711(p->h.length));
len = *ana->outlen;
outbuf = ana->outbuf;
cont = ana->cont;
-
+
/*
* Gathering a Symbolic name from each component with path
*/
@@ -138,7 +138,7 @@
pcomp < pcompe;
pcomp = (ISO_RRIP_SLINK_COMPONENT *)((char *)pcomp + ISO_RRIP_SLSIZ
+ isonum_711(pcomp->clen))) {
-
+
if (!cont) {
if (len < ana->maxlen) {
len++;
@@ -146,29 +146,29 @@
}
}
cont = 0;
-
+
inbuf = "..";
wlen = 0;
-
+
switch (*pcomp->cflag) {
-
+
case ISO_SUSP_CFLAG_CURRENT:
/* Inserting Current */
wlen = 1;
break;
-
+
case ISO_SUSP_CFLAG_PARENT:
/* Inserting Parent */
wlen = 2;
break;
-
+
case ISO_SUSP_CFLAG_ROOT:
/* Inserting slash for ROOT */
/* start over from beginning(?) */
outbuf -= len;
len = 0;
break;
-
+
case ISO_SUSP_CFLAG_VOLROOT:
/* Inserting a mount point i.e. "/cdrom" */
/* same as above */
@@ -177,13 +177,13 @@
inbuf = ana->imp->im_mountp->mnt_stat.f_mntonname;
wlen = strlen(inbuf);
break;
-
+
case ISO_SUSP_CFLAG_HOST:
/* Inserting hostname i.e. "kurt.tools.de" */
inbuf = hostname;
wlen = hostnamelen;
break;
-
+
case ISO_SUSP_CFLAG_CONTINUE:
cont = 1;
/* fall thru */
@@ -197,7 +197,7 @@
wlen = ana->maxlen + 1;
break;
}
-
+
if (len + wlen > ana->maxlen) {
/* indicate error to caller */
ana->cont = 1;
@@ -206,7 +206,7 @@
*ana->outlen = 0;
return 0;
}
-
+
memcpy(outbuf, inbuf, wlen);
outbuf += wlen;
len += wlen;
@@ -214,7 +214,7 @@
ana->outbuf = outbuf;
*ana->outlen = len;
ana->cont = cont;
-
+
if (!isonum_711(p->flags)) {
ana->fields &= ~ISO_SUSP_SLINK;
return ISO_SUSP_SLINK;
@@ -234,28 +234,28 @@
char *inbuf;
int wlen;
int cont;
-
+
inbuf = "..";
wlen = 0;
cont = 0;
-
+
switch (*p->flags) {
case ISO_SUSP_CFLAG_CURRENT:
/* Inserting Current */
wlen = 1;
break;
-
+
case ISO_SUSP_CFLAG_PARENT:
/* Inserting Parent */
wlen = 2;
break;
-
+
case ISO_SUSP_CFLAG_HOST:
/* Inserting hostname i.e. "kurt.tools.de" */
inbuf = hostname;
wlen = hostnamelen;
break;
-
+
case ISO_SUSP_CFLAG_CONTINUE:
cont = 1;
/* fall thru */
@@ -264,13 +264,13 @@
wlen = isonum_711(p->h.length) - 5;
inbuf = (char *)p + 5;
break;
-
+
default:
printf("RRIP with incorrect NM flags?\n");
wlen = ana->maxlen + 1;
break;
}
-
+
if ((*ana->outlen += wlen) > ana->maxlen) {
/* treat as no name field */
ana->fields &= ~ISO_SUSP_ALTNAME;
@@ -278,10 +278,10 @@
*ana->outlen = 0;
return 0;
}
-
+
memcpy(ana->outbuf, inbuf, wlen);
ana->outbuf += wlen;
-
+
if (!cont) {
ana->fields &= ~ISO_SUSP_ALTNAME;
return ISO_SUSP_ALTNAME;
@@ -352,52 +352,52 @@
{
ISO_RRIP_TSTAMP *p = v;
u_char *ptime;
-
+
ptime = p->time;
-
+
/* Check a format of time stamp (7bytes/17bytes) */
if (!(*p->flags & ISO_SUSP_TSTAMP_FORM17)) {
if (*p->flags & ISO_SUSP_TSTAMP_CREAT)
ptime += 7;
-
+
if (*p->flags & ISO_SUSP_TSTAMP_MODIFY) {
cd9660_tstamp_conv7(ptime, &ana->inop->inode.iso_mtime);
ptime += 7;
} else
memset(&ana->inop->inode.iso_mtime, 0, sizeof(struct timespec));
-
+
if (*p->flags & ISO_SUSP_TSTAMP_ACCESS) {
cd9660_tstamp_conv7(ptime, &ana->inop->inode.iso_atime);
ptime += 7;
} else
ana->inop->inode.iso_atime = ana->inop->inode.iso_mtime;
-
+
if (*p->flags & ISO_SUSP_TSTAMP_ATTR)
cd9660_tstamp_conv7(ptime, &ana->inop->inode.iso_ctime);
else
ana->inop->inode.iso_ctime = ana->inop->inode.iso_mtime;
-
+
} else {
if (*p->flags & ISO_SUSP_TSTAMP_CREAT)
ptime += 17;
-
+
if (*p->flags & ISO_SUSP_TSTAMP_MODIFY) {
cd9660_tstamp_conv17(ptime, &ana->inop->inode.iso_mtime);
ptime += 17;
} else
memset(&ana->inop->inode.iso_mtime, 0, sizeof(struct timespec));
-
+
if (*p->flags & ISO_SUSP_TSTAMP_ACCESS) {
cd9660_tstamp_conv17(ptime, &ana->inop->inode.iso_atime);
ptime += 17;
} else
ana->inop->inode.iso_atime = ana->inop->inode.iso_mtime;
-
+
if (*p->flags & ISO_SUSP_TSTAMP_ATTR)
cd9660_tstamp_conv17(ptime, &ana->inop->inode.iso_ctime);
else
ana->inop->inode.iso_ctime = ana->inop->inode.iso_mtime;
-
+
}
ana->fields &= ~ISO_SUSP_TSTAMP;
return ISO_SUSP_TSTAMP;
@@ -423,10 +423,10 @@
{
ISO_RRIP_DEVICE *p = v;
u_int high, low;
-
+
high = isonum_733(p->dev_t_high);
low = isonum_733(p->dev_t_low);
-
+
if (high == 0)
ana->inop->inode.iso_rdev = makedev(major(low), minor(low));
else
@@ -449,7 +449,7 @@
/* special handling of RE field */
if (ana->fields & ISO_SUSP_RELDIR)
return cd9660_rrip_reldir(p, ana);
-
+
return ISO_SUSP_IDFLAG;
}
@@ -520,7 +520,7 @@
char *pwhead;
u_char c;
int result;
-
+
/*
* Note: If name length is odd,
* it will be padded by 1 byte after the name
@@ -529,16 +529,16 @@
if (!(isonum_711(isodir->name_len) & 1))
pwhead++;
isochar(isodir->name, pwhead, ana->imp->im_joliet_level, &c);
-
+
/* If it's not the '.' entry of the root dir obey SP field */
if (c != 0 || isonum_733(isodir->extent) != ana->imp->root_extent)
pwhead += ana->imp->rr_skip;
else
pwhead += ana->imp->rr_skip0;
-
+
phead = (ISO_SUSP_HEADER *)pwhead;
pend = (ISO_SUSP_HEADER *)((char *)isodir + isonum_711(isodir->length));
-
+
result = 0;
while (1) {
ana->iso_ce_len = 0;
Home |
Main Index |
Thread Index |
Old Index