aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/mkisofs
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/usr.bin/mkisofs')
-rw-r--r--gnu/usr.bin/mkisofs/Makefile.in4
-rw-r--r--gnu/usr.bin/mkisofs/diag/Makefile4
-rw-r--r--gnu/usr.bin/mkisofs/diag/dump.c4
-rw-r--r--gnu/usr.bin/mkisofs/diag/isodump.c16
-rw-r--r--gnu/usr.bin/mkisofs/diag/isovfy.c16
-rw-r--r--gnu/usr.bin/mkisofs/exclude.c4
-rw-r--r--gnu/usr.bin/mkisofs/exclude.h2
-rw-r--r--gnu/usr.bin/mkisofs/hash.c4
-rw-r--r--gnu/usr.bin/mkisofs/mkisofs.c14
-rw-r--r--gnu/usr.bin/mkisofs/mkisofs.h6
-rw-r--r--gnu/usr.bin/mkisofs/rock.c28
-rw-r--r--gnu/usr.bin/mkisofs/tree.c104
-rw-r--r--gnu/usr.bin/mkisofs/vms.c6
-rw-r--r--gnu/usr.bin/mkisofs/write.c60
14 files changed, 136 insertions, 136 deletions
diff --git a/gnu/usr.bin/mkisofs/Makefile.in b/gnu/usr.bin/mkisofs/Makefile.in
index 85cf95e97f54..dd0d318acc5f 100644
--- a/gnu/usr.bin/mkisofs/Makefile.in
+++ b/gnu/usr.bin/mkisofs/Makefile.in
@@ -15,7 +15,7 @@ Makefile: Makefile.in Configure
./Configure
echo "Type make again to build mkisofs."
-mkisofs: Makefile $(OBJS)
+mkisofs: Makefile $(OBJS)
$(CC) $(LDFLAGS) -o mkisofs $(OBJS)
install: mkisofs mkisofs.8
@@ -29,7 +29,7 @@ tree.o: tree.c mkisofs.h iso9660.h exclude.h
write.o: write.c mkisofs.h iso9660.h
$(CC) $(CFLAGS) write.c
-hash.o: hash.c mkisofs.h
+hash.o: hash.c mkisofs.h
$(CC) $(CFLAGS) hash.c
rock.o: rock.c mkisofs.h iso9660.h
diff --git a/gnu/usr.bin/mkisofs/diag/Makefile b/gnu/usr.bin/mkisofs/diag/Makefile
index 4f2a697fc603..1aefdf68d418 100644
--- a/gnu/usr.bin/mkisofs/diag/Makefile
+++ b/gnu/usr.bin/mkisofs/diag/Makefile
@@ -1,4 +1,4 @@
-all: dump isodump isovfy
+all: dump isodump isovfy
dump:dump.c
gcc -o dump dump.c
isodump:isodump.c
@@ -7,4 +7,4 @@ isovfy:isovfy.c
gcc -o isovfy isovfy.c
clean:
- rm dump isodump isovfy \ No newline at end of file
+ rm dump isodump isovfy
diff --git a/gnu/usr.bin/mkisofs/diag/dump.c b/gnu/usr.bin/mkisofs/diag/dump.c
index 0e9db391235e..3c28481404e9 100644
--- a/gnu/usr.bin/mkisofs/diag/dump.c
+++ b/gnu/usr.bin/mkisofs/diag/dump.c
@@ -183,7 +183,7 @@ main(int argc, char * argv[]){
c = getbyte(&file_addr);
if (c == search[0]) break;
};
- for (j=1;j<strlen(search);j++)
+ for (j=1;j<strlen(search);j++)
if(search[j] != getbyte()) break;
if(j==strlen(search)) break;
};
@@ -195,7 +195,7 @@ main(int argc, char * argv[]){
reset_tty();
fclose(infile);
}
-
+
diff --git a/gnu/usr.bin/mkisofs/diag/isodump.c b/gnu/usr.bin/mkisofs/diag/isodump.c
index bca9a2f4a987..49ef4b91299d 100644
--- a/gnu/usr.bin/mkisofs/diag/isodump.c
+++ b/gnu/usr.bin/mkisofs/diag/isodump.c
@@ -211,7 +211,7 @@ int parse_rr(unsigned char * pnt, int len, int cont_flag)
cont_extent = isonum_733(pnt+4);
cont_offset = isonum_733(pnt+12);
cont_size = isonum_733(pnt+20);
- printf("=[%x,%x,%d]", cont_extent, cont_offset,
+ printf("=[%x,%x,%d]", cont_extent, cont_offset,
cont_size);
};
@@ -259,7 +259,7 @@ int parse_rr(unsigned char * pnt, int len, int cont_flag)
slen -= (pnts[1] + 2);
pnts += (pnts[1] + 2);
-
+
};
if(cflag) printf("+");
printf("=%s", symlink);
@@ -276,12 +276,12 @@ int parse_rr(unsigned char * pnt, int len, int cont_flag)
};
};
if(ncount) printf("]");
- if (!cont_flag && flag1 != flag2)
+ if (!cont_flag && flag1 != flag2)
printf("Flag %x != %x", flag1, flag2, goof++);
return flag2;
}
-int
+int
dump_rr(struct iso_directory_record * idr)
{
int len;
@@ -320,7 +320,7 @@ showblock(int flag){
printf("[%2d] ", idr->volume_sequence_number[0]);
printf("%5x ", *((unsigned int *) idr->extent));
printf("%8d ", *((unsigned int *) idr->size));
- printf ((idr->flags[0] & 2) ? "*" : " ");
+ printf ((idr->flags[0] & 2) ? "*" : " ");
if(idr->name_len[0] == 1 && idr->name[0] == 0)
printf(". ");
else if(idr->name_len[0] == 1 && idr->name[0] == 1)
@@ -372,7 +372,7 @@ main(int argc, char * argv[]){
file_addr = file_addr << 11;
/* Now setup the keyboard for single character input. */
-#ifdef USE_TERMIOS
+#ifdef USE_TERMIOS
if(tcgetattr(0, &savetty) == -1)
#else
if(ioctl(0, TCGETA, &savetty) == -1)
@@ -416,7 +416,7 @@ main(int argc, char * argv[]){
c = getbyte(&file_addr);
if (c == search[0]) break;
};
- for (j=1;j<strlen(search);j++)
+ for (j=1;j<strlen(search);j++)
if(search[j] != getbyte()) break;
if(j==strlen(search)) break;
};
@@ -428,7 +428,7 @@ main(int argc, char * argv[]){
reset_tty();
fclose(infile);
}
-
+
diff --git a/gnu/usr.bin/mkisofs/diag/isovfy.c b/gnu/usr.bin/mkisofs/diag/isovfy.c
index 5da53145c8eb..43e13895ee10 100644
--- a/gnu/usr.bin/mkisofs/diag/isovfy.c
+++ b/gnu/usr.bin/mkisofs/diag/isovfy.c
@@ -122,7 +122,7 @@ int iline;
int rr_goof;
-int
+int
dump_rr(struct iso_directory_record * idr){
int len;
char * pnt;
@@ -166,9 +166,9 @@ int parse_rr(unsigned char * pnt, int len, int cont_flag)
else iline += sprintf(lbuffer+iline,"[");
iline += sprintf(lbuffer+iline,"%c%c", pnt[0], pnt[1]);
- if(pnt[0] < 'A' || pnt[0] > 'Z' || pnt[1] < 'A' ||
+ if(pnt[0] < 'A' || pnt[0] > 'Z' || pnt[1] < 'A' ||
pnt[1] > 'Z') {
- iline += sprintf(lbuffer+iline,"**BAD SUSP %d %d]",
+ iline += sprintf(lbuffer+iline,"**BAD SUSP %d %d]",
pnt[0], pnt[1], rr_goof++);
return flag2;
};
@@ -237,7 +237,7 @@ int parse_rr(unsigned char * pnt, int len, int cont_flag)
strcat(symlink,"/");
slen -= (pnts[1] + 2);
pnts += (pnts[1] + 2);
-
+
};
if(symlink[0] != 0) {
iline += sprintf(lbuffer+iline,"=%s", symlink);
@@ -255,7 +255,7 @@ int parse_rr(unsigned char * pnt, int len, int cont_flag)
};
};
if(ncount) iline += sprintf(lbuffer+iline,"]");
- if (!cont_flag && flag1 && flag1 != flag2)
+ if (!cont_flag && flag1 && flag1 != flag2)
iline += sprintf(lbuffer+iline,"Flag %x != %x", flag1, flag2, rr_goof++);
return flag2;
}
@@ -304,7 +304,7 @@ check_tree(int file_addr, int file_size, int parent_addr){
size = isonum_733(idr->size);
iline += sprintf(&lbuffer[iline],"%5x ", extent);
iline += sprintf(&lbuffer[iline],"%8d ", size);
- iline += sprintf (&lbuffer[iline], "%c", (idr->flags[0] & 2) ? '*' : ' ');
+ iline += sprintf (&lbuffer[iline], "%c", (idr->flags[0] & 2) ? '*' : ' ');
if(idr->name_len[0] > 33 || idr->name_len[0] < 0)
iline += sprintf(&lbuffer[iline],"File name length=(%d)",
@@ -323,7 +323,7 @@ check_tree(int file_addr, int file_size, int parent_addr){
iline += sprintf(&lbuffer[iline],"***** Directory has null extent.", goof++);
if(i1 != 1)
iline += sprintf(&lbuffer[iline],"***** .. not second entry.", rr_goof++);
-
+
} else {
if(i1 < 2) iline += sprintf(&lbuffer[iline]," Improper sorting.", rr_goof++);
for(j=0; j<idr->name_len[0]; j++) iline += sprintf(&lbuffer[iline],"%c", idr->name[j]);
@@ -481,7 +481,7 @@ main(int argc, char * argv[]){
if(!ngoof) printf("No errors found\n");
}
-
+
diff --git a/gnu/usr.bin/mkisofs/exclude.c b/gnu/usr.bin/mkisofs/exclude.c
index 3be700bf67ef..99c66bd4e03b 100644
--- a/gnu/usr.bin/mkisofs/exclude.c
+++ b/gnu/usr.bin/mkisofs/exclude.c
@@ -1,6 +1,6 @@
/*
* 9-Dec-93 R.-D. Marzusch, marzusch@odiehh.hanse.de:
- * added 'exclude' option (-x) to specify pathnames NOT to be included in
+ * added 'exclude' option (-x) to specify pathnames NOT to be included in
* CD image.
*/
@@ -29,7 +29,7 @@ char * fn;
return;
}
-
+
excl[i] = malloc(strlen(fn)+1);
if (! excl[i]) {
fprintf(stderr,"Can't allocate memory for excluded filename\n");
diff --git a/gnu/usr.bin/mkisofs/exclude.h b/gnu/usr.bin/mkisofs/exclude.h
index dc96c094b797..d22fda263fd7 100644
--- a/gnu/usr.bin/mkisofs/exclude.h
+++ b/gnu/usr.bin/mkisofs/exclude.h
@@ -1,6 +1,6 @@
/*
* 9-Dec-93 R.-D. Marzusch, marzusch@odiehh.hanse.de:
- * added 'exclude' option (-x) to specify pathnames NOT to be included in
+ * added 'exclude' option (-x) to specify pathnames NOT to be included in
* CD image.
*/
diff --git a/gnu/usr.bin/mkisofs/hash.c b/gnu/usr.bin/mkisofs/hash.c
index cfa145f27922..d21d84fb0caf 100644
--- a/gnu/usr.bin/mkisofs/hash.c
+++ b/gnu/usr.bin/mkisofs/hash.c
@@ -32,7 +32,7 @@ void FDECL1(add_hash, struct directory_entry *, spnt){
struct file_hash * s_hash;
unsigned int hash_number;
- if(spnt->size == 0 || spnt->starting_block == 0)
+ if(spnt->size == 0 || spnt->starting_block == 0)
if(spnt->size != 0 || spnt->starting_block != 0) {
fprintf(stderr,"Non zero-length file assigned zero extent.\n");
exit(1);
@@ -172,6 +172,6 @@ void flush_file_hash(){
nh = nh1;
};
name_hash_table[i] = NULL;
-
+
};
}
diff --git a/gnu/usr.bin/mkisofs/mkisofs.c b/gnu/usr.bin/mkisofs/mkisofs.c
index 2fd8a3183907..4cfed7861eeb 100644
--- a/gnu/usr.bin/mkisofs/mkisofs.c
+++ b/gnu/usr.bin/mkisofs/mkisofs.c
@@ -228,7 +228,7 @@ int FDECL2(iso9660_date,char *, result, time_t, ctime){
return 0;
}
-int FDECL3(iso9660_file_length,const char*, name, struct directory_entry *, sresult,
+int FDECL3(iso9660_file_length,const char*, name, struct directory_entry *, sresult,
int, dirflag){
int seen_dot = 0;
int seen_semic = 0;
@@ -298,7 +298,7 @@ int FDECL3(iso9660_file_length,const char*, name, struct directory_entry *, sres
current_length++;
pnt++;
};
-
+
if(tildes == 2){
int prio1 = 0;
pnt = name;
@@ -310,10 +310,10 @@ int FDECL3(iso9660_file_length,const char*, name, struct directory_entry *, sres
};
priority = prio1;
};
-
+
if (!dirflag){
if (!seen_dot && !omit_period) {
- if (result) *result++ = '.';
+ if (result) *result++ = '.';
extra++;
};
if(!omit_version_number && !seen_semic) {
@@ -458,7 +458,7 @@ int FDECL2(main, int, argc, char **, argv){
{
int resource;
struct rlimit rlp;
- if (getrlimit(RLIMIT_DATA,&rlp) == -1)
+ if (getrlimit(RLIMIT_DATA,&rlp) == -1)
perror("Warning: getrlimit");
else {
rlp.rlim_cur=33554432;
@@ -513,7 +513,7 @@ int FDECL2(main, int, argc, char **, argv){
if(reloc_dir) sort_n_finish(reloc_dir);
if (goof) exit(1);
-
+
if (outfile){
discimage = fopen(outfile, "w");
if (!discimage){
@@ -564,7 +564,7 @@ int FDECL2(main, int, argc, char **, argv){
iso_write(discimage);
- fprintf(stderr,"Max brk space used %x\n",
+ fprintf(stderr,"Max brk space used %x\n",
((unsigned int)sbrk(0)) - mem_start);
fprintf(stderr,"%d extents written (%d Mb)\n", last_extent, last_extent >> 9);
#ifdef VMS
diff --git a/gnu/usr.bin/mkisofs/mkisofs.h b/gnu/usr.bin/mkisofs/mkisofs.h
index 89e9423623f5..e17bb848a9cd 100644
--- a/gnu/usr.bin/mkisofs/mkisofs.h
+++ b/gnu/usr.bin/mkisofs/mkisofs.h
@@ -117,7 +117,7 @@ struct file_hash{
unsigned int starting_block;
unsigned int size;
};
-
+
struct directory{
struct directory * next; /* Next directory at same level as this one */
struct directory * subdir; /* First subdirectory in this directory */
@@ -169,7 +169,7 @@ extern int DECL(scan_directory_tree,(char * path, struct directory_entry * self)
extern void DECL(dump_tree,(struct directory * node));
extern void DECL(assign_directory_addresses,(struct directory * root));
-extern int DECL(iso9660_file_length,(const char* name,
+extern int DECL(iso9660_file_length,(const char* name,
struct directory_entry * sresult, int flag));
extern int DECL(iso_write,(FILE * outfile));
extern void generate_path_tables();
@@ -192,7 +192,7 @@ extern void DECL(set_723,(char *, unsigned int));
extern void DECL(set_733,(char *, unsigned int));
extern void DECL(sort_directory,(struct directory_entry **));
extern int DECL(generate_rock_ridge_attributes,(char *, char *,
- struct directory_entry *,
+ struct directory_entry *,
struct stat *, struct stat *,
int deep_flag));
extern char * DECL(generate_rr_extension_record,(char * id, char * descriptor,
diff --git a/gnu/usr.bin/mkisofs/rock.c b/gnu/usr.bin/mkisofs/rock.c
index 171434dea6e1..dfa774f02057 100644
--- a/gnu/usr.bin/mkisofs/rock.c
+++ b/gnu/usr.bin/mkisofs/rock.c
@@ -72,7 +72,7 @@
a CE entry for the continuation record */
#define MAYBE_ADD_CE_ENTRY(BYTES) \
- (BYTES + CE_SIZE + currlen + (ipnt - recstart) > reclimit ? 1 : 0)
+ (BYTES + CE_SIZE + currlen + (ipnt - recstart) > reclimit ? 1 : 0)
/*
* Buffer to build RR attributes
@@ -189,13 +189,13 @@ int deep_opt;
};
/*
- * Add the posix modes
+ * Add the posix modes
*/
if(MAYBE_ADD_CE_ENTRY(PX_SIZE)) add_CE_entry();
Rock[ipnt++] ='P';
Rock[ipnt++] ='X';
Rock[ipnt++] = PX_SIZE;
- Rock[ipnt++] = SU_VERSION;
+ Rock[ipnt++] = SU_VERSION;
flagval |= (1<<0);
set_733((char*)Rock + ipnt, lstatbuf->st_mode);
ipnt += 8;
@@ -215,7 +215,7 @@ int deep_opt;
Rock[ipnt++] ='P';
Rock[ipnt++] ='N';
Rock[ipnt++] = PN_SIZE;
- Rock[ipnt++] = SU_VERSION;
+ Rock[ipnt++] = SU_VERSION;
flagval |= (1<<1);
if(sizeof(dev_t) <= 4) {
set_733((char*)Rock + ipnt, 0);
@@ -254,7 +254,7 @@ int deep_opt;
Rock[ipnt++] ='L';
lenpos = ipnt;
Rock[ipnt++] = SL_SIZE;
- Rock[ipnt++] = SU_VERSION;
+ Rock[ipnt++] = SU_VERSION;
Rock[ipnt++] = 0; /* Flags */
lenval = 5;
while(*cpnt){
@@ -263,7 +263,7 @@ int deep_opt;
nchar--;
*cpnt1 = 0;
};
-
+
/* We treat certain components in a special way. */
if(cpnt[0] == '.' && cpnt[1] == '.' && cpnt[2] == 0){
if(MAYBE_ADD_CE_ENTRY(2)) add_CE_entry();
@@ -329,7 +329,7 @@ int deep_opt;
if(nchar) Rock[lenpos + 2] = SL_CONTINUE; /* We need another SL entry */
} /* while nchar */
} /* Is a symbolic link */
- /*
+ /*
* Add in the Rock Ridge TF time field
*/
if(MAYBE_ADD_CE_ENTRY(TF_SIZE)) add_CE_entry();
@@ -354,7 +354,7 @@ int deep_opt;
iso9660_date((char *) &Rock[ipnt], lstatbuf->st_ctime);
ipnt += 7;
- /*
+ /*
* Add in the Rock Ridge RE time field
*/
if(deep_opt & NEED_RE){
@@ -365,7 +365,7 @@ int deep_opt;
Rock[ipnt++] = SU_VERSION;
flagval |= (1<<6);
};
- /*
+ /*
* Add in the Rock Ridge PL record, if required.
*/
if(deep_opt & NEED_PL){
@@ -379,7 +379,7 @@ int deep_opt;
flagval |= (1<<5);
};
- /*
+ /*
* Add in the Rock Ridge CL field, if required.
*/
if(deep_opt & NEED_CL){
@@ -396,7 +396,7 @@ int deep_opt;
#ifndef VMS
/* If transparent compression was requested, fill in the correct
field for this file */
- if(transparent_compression &&
+ if(transparent_compression &&
S_ISREG(lstatbuf->st_mode) &&
strlen(name) > 3 &&
strcmp(name + strlen(name) - 3,".gZ") == 0){
@@ -429,8 +429,8 @@ int deep_opt;
else {
int blocksize;
blocksize = (header[3] << 8) | header[2];
- file_size = ((unsigned int)header[7] << 24) |
- ((unsigned int)header[6] << 16) |
+ file_size = ((unsigned int)header[7] << 24) |
+ ((unsigned int)header[6] << 16) |
((unsigned int)header[5] << 8) | header[4];
#if 0
fprintf(stderr,"Blocksize = %d %d\n", blocksize, file_size);
@@ -465,7 +465,7 @@ int deep_opt;
};
}
#endif
- /*
+ /*
* Add in the Rock Ridge CE field, if required. We use this for the
* extension record that is stored in the root directory.
*/
diff --git a/gnu/usr.bin/mkisofs/tree.c b/gnu/usr.bin/mkisofs/tree.c
index a3b8ebb89f14..c07c52e12eaf 100644
--- a/gnu/usr.bin/mkisofs/tree.c
+++ b/gnu/usr.bin/mkisofs/tree.c
@@ -103,15 +103,15 @@ void FDECL1(sort_n_finish, struct directory *, this_dir)
flush_file_hash();
s_entry = this_dir->contents;
while(s_entry){
-
+
/* First assume no conflict, and handle this case */
-
+
if(!(s_entry1 = find_file_hash(s_entry->isorec.name))){
add_file_hash(s_entry);
s_entry = s_entry->next;
continue;
};
-
+
if(s_entry1 == s_entry){
fprintf(stderr,"Fatal goof\n");
exit(1);
@@ -127,7 +127,7 @@ void FDECL1(sort_n_finish, struct directory *, this_dir)
count = 0;
while(count < 1000){
sprintf(newname,"%s.%3.3d%s", rootname, count,
- (s_entry->isorec.flags[0] == 2 ||
+ (s_entry->isorec.flags[0] == 2 ||
omit_version_number ? "" : ";1"));
#ifdef VMS
@@ -147,10 +147,10 @@ void FDECL1(sort_n_finish, struct directory *, this_dir)
fprintf(stderr,"Unable to generate unique name for file %s\n", s_entry->name);
exit(1);
};
-
+
/* OK, now we have a good replacement name. Now decide which one
of these two beasts should get the name changed */
-
+
if(s_entry->priority < s_entry1->priority) {
fprintf(stderr,"Using %s for %s%s%s (%s)\n", newname, this_dir->whole_name, SPATH_SEPARATOR, s_entry->name, s_entry1->name);
s_entry->isorec.name_len[0] = strlen(newname);
@@ -188,10 +188,10 @@ void FDECL1(sort_n_finish, struct directory *, this_dir)
/* First we need to figure out how big this table is */
for (s_entry = this_dir->contents; s_entry; s_entry = s_entry->next){
if(strcmp(s_entry->name, ".") == 0 ||
- strcmp(s_entry->name, "..") == 0) continue;
+ strcmp(s_entry->name, "..") == 0) continue;
if(s_entry->table) tablesize += 35 + strlen(s_entry->table);
};
- table = (struct directory_entry *)
+ table = (struct directory_entry *)
e_malloc(sizeof (struct directory_entry));
memset(table, 0, sizeof(struct directory_entry));
table->table = NULL;
@@ -213,10 +213,10 @@ void FDECL1(sort_n_finish, struct directory *, this_dir)
memset(table->table, 0, ROUND_UP(tablesize));
#if 1 /* WALNUT CREEK -- 950126 */
iso9660_file_length (trans_tbl, table, 0);
-#else
+#else
iso9660_file_length (trans_tbl, table, 1);
-#endif
-
+#endif
+
if(use_RockRidge){
fstatbuf.st_mode = 0444 | S_IFREG;
fstatbuf.st_nlink = 1;
@@ -228,7 +228,7 @@ void FDECL1(sort_n_finish, struct directory *, this_dir)
for(s_entry = this_dir->contents; s_entry; s_entry = s_entry->next){
new_reclen = strlen(s_entry->isorec.name);
-
+
if(s_entry->isorec.flags[0] == 2){
if (strcmp(s_entry->name,".") && strcmp(s_entry->name,"..")) {
path_table_size += new_reclen + sizeof(struct iso_path_table) - 1;
@@ -242,16 +242,16 @@ void FDECL1(sort_n_finish, struct directory *, this_dir)
if(path_table_size & 1) path_table_size++; /* For odd lengths we pad */
s_entry->isorec.name_len[0] = new_reclen;
- new_reclen +=
+ new_reclen +=
sizeof(struct iso_directory_record) -
sizeof(s_entry->isorec.name);
-
- if (new_reclen & 1)
+
+ if (new_reclen & 1)
new_reclen++;
if(use_RockRidge){
new_reclen += s_entry->rr_attr_size;
- if (new_reclen & 1)
+ if (new_reclen & 1)
new_reclen++;
};
if(new_reclen > 0xff) {
@@ -273,7 +273,7 @@ void FDECL1(sort_n_finish, struct directory *, this_dir)
if(strcmp(s_entry->name, ".") == 0 ||
strcmp(s_entry->name, "..") == 0) continue;
- sprintf(buffer,"%c %-34s%s",s_entry->table[0],
+ sprintf(buffer,"%c %-34s%s",s_entry->table[0],
s_entry->isorec.name, s_entry->table+1);
memcpy(table->table + count, buffer, strlen(buffer));
count += strlen(buffer);
@@ -289,18 +289,18 @@ void FDECL1(sort_n_finish, struct directory *, this_dir)
/* Now go through the directory and figure out how large this one will be.
Do not split a directory entry across a sector boundary */
-
+
s_entry = this_dir->contents;
this_dir->ce_bytes = 0;
while(s_entry){
new_reclen = s_entry->isorec.length[0];
if ((this_dir->size & (SECTOR_SIZE - 1)) + new_reclen >= SECTOR_SIZE)
- this_dir->size = (this_dir->size + (SECTOR_SIZE - 1)) &
+ this_dir->size = (this_dir->size + (SECTOR_SIZE - 1)) &
~(SECTOR_SIZE - 1);
this_dir->size += new_reclen;
/* See if continuation entries were used on disc */
- if(use_RockRidge &&
+ if(use_RockRidge &&
s_entry->rr_attr_size != s_entry->total_rr_attr_size) {
unsigned char * pnt;
int len;
@@ -316,9 +316,9 @@ void FDECL1(sort_n_finish, struct directory *, this_dir)
while(len > 3){
if(pnt[0] == 'C' && pnt[1] == 'E') {
nbytes = get_733(pnt+20);
-
+
if((this_dir->ce_bytes & (SECTOR_SIZE - 1)) + nbytes >=
- SECTOR_SIZE) this_dir->ce_bytes =
+ SECTOR_SIZE) this_dir->ce_bytes =
ROUND_UP(this_dir->ce_bytes);
/* Now store the block in the ce buffer */
this_dir->ce_bytes += nbytes;
@@ -340,7 +340,7 @@ static void generate_reloc_directory()
/* Create an entry for our internal tree */
time (&current_time);
- reloc_dir = (struct directory *)
+ reloc_dir = (struct directory *)
e_malloc(sizeof(struct directory));
memset(reloc_dir, 0, sizeof(struct directory));
reloc_dir->parent = root;
@@ -350,11 +350,11 @@ static void generate_reloc_directory()
reloc_dir->whole_name = strdup("./rr_moved");
reloc_dir->de_name = strdup("rr_moved");
reloc_dir->extent = 0;
-
+
new_reclen = strlen(reloc_dir->de_name);
-
+
/* Now create an actual directory entry */
- s_entry = (struct directory_entry *)
+ s_entry = (struct directory_entry *)
e_malloc(sizeof (struct directory_entry));
memset(s_entry, 0, sizeof(struct directory_entry));
s_entry->next = root->contents;
@@ -378,12 +378,12 @@ static void generate_reloc_directory()
"rr_moved", s_entry,
&fstatbuf, &fstatbuf, 0);
};
-
+
/* Now create the . and .. entries in rr_moved */
/* Now create an actual directory entry */
- s_entry = (struct directory_entry *)
+ s_entry = (struct directory_entry *)
e_malloc(sizeof (struct directory_entry));
- memcpy(s_entry, root->contents,
+ memcpy(s_entry, root->contents,
sizeof(struct directory_entry));
s_entry->name = strdup(".");
iso9660_file_length (".", s_entry, 1);
@@ -398,10 +398,10 @@ static void generate_reloc_directory()
".", s_entry,
&fstatbuf, &fstatbuf, 0);
};
-
- s_entry = (struct directory_entry *)
+
+ s_entry = (struct directory_entry *)
e_malloc(sizeof (struct directory_entry));
- memcpy(s_entry, root->contents,
+ memcpy(s_entry, root->contents,
sizeof(struct directory_entry));
s_entry->name = strdup("..");
iso9660_file_length ("..", s_entry, 1);
@@ -559,7 +559,7 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){
exit(1);
};
- this_dir->parent = parent;
+ this_dir->parent = parent;
this_dir->depth = parent->depth + 1;
if(!parent->subdir)
@@ -651,14 +651,14 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){
continue; /* Non Rock Ridge discs - ignore all symlinks */
};
}
-
+
/* Here we handle a different kind of case. Here we have a symlink,
but we want to follow symlinks. If we run across a directory loop,
then we need to pretend that we are not following symlinks for this file.
If this is the first time we have seen this, then make this seem
as if there was no symlink there in the first place */
-
- else if(strcmp(d_entry->d_name, ".") &&
+
+ else if(strcmp(d_entry->d_name, ".") &&
strcmp(d_entry->d_name, "..")) {
if(find_directory_hash(statbuf.st_dev, STAT_INODE(statbuf))){
fprintf(stderr, "Infinite loop detected (%s)\n", whole_path);
@@ -671,11 +671,11 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){
lstatbuf = statbuf;
add_directory_hash(statbuf.st_dev, STAT_INODE(statbuf));
};
- };
+ };
};
#ifdef VMS
- if(!S_ISDIR(lstatbuf.st_mode) && (statbuf.st_fab_rfm != FAB$C_FIX &&
+ if(!S_ISDIR(lstatbuf.st_mode) && (statbuf.st_fab_rfm != FAB$C_FIX &&
statbuf.st_fab_rfm != FAB$C_STMLF)) {
fprintf(stderr,"Warning - file %s has an unsupported VMS record"
" format (%d)\n",
@@ -684,14 +684,14 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){
#endif
if(S_ISREG(lstatbuf.st_mode) && (status = access(whole_path, R_OK))){
- fprintf(stderr, "File %s is not readable (errno = %d) - ignoring\n",
+ fprintf(stderr, "File %s is not readable (errno = %d) - ignoring\n",
whole_path, errno);
continue;
}
/* Add this so that we can detect directory loops with hard links.
If we are set up to follow symlinks, then we skip this checking. */
- if(!follow_links && S_ISDIR(lstatbuf.st_mode) && strcmp(d_entry->d_name, ".") &&
+ if(!follow_links && S_ISDIR(lstatbuf.st_mode) && strcmp(d_entry->d_name, ".") &&
strcmp(d_entry->d_name, "..")) {
if(find_directory_hash(statbuf.st_dev, STAT_INODE(statbuf))) {
fprintf(stderr,"Directory loop - fatal goof (%s %x %d).\n",
@@ -716,10 +716,10 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){
fprintf(stderr,
"Unable to stat file %s - ignoring and continuing.\n",
whole_path);
- continue;
+ continue;
};
- s_entry = (struct directory_entry *)
+ s_entry = (struct directory_entry *)
e_malloc(sizeof (struct directory_entry));
s_entry->next = this_dir->contents;
this_dir->contents = s_entry;
@@ -750,24 +750,24 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){
/* Directories are assigned sizes later on */
if (!S_ISDIR(statbuf.st_mode)) {
- set_733(s_entry->isorec.size, statbuf.st_size);
+ set_733(s_entry->isorec.size, statbuf.st_size);
- if (S_ISCHR(lstatbuf.st_mode) || S_ISBLK(lstatbuf.st_mode) ||
+ if (S_ISCHR(lstatbuf.st_mode) || S_ISBLK(lstatbuf.st_mode) ||
S_ISFIFO(lstatbuf.st_mode) || S_ISSOCK(lstatbuf.st_mode)
|| S_ISLNK(lstatbuf.st_mode))
- s_entry->size = 0;
+ s_entry->size = 0;
else
- s_entry->size = statbuf.st_size;
+ s_entry->size = statbuf.st_size;
} else
s_entry->isorec.flags[0] = 2;
- if (strcmp(d_entry->d_name,".") && strcmp(d_entry->d_name,"..") &&
+ if (strcmp(d_entry->d_name,".") && strcmp(d_entry->d_name,"..") &&
S_ISDIR(statbuf.st_mode) && this_dir->depth > RR_relocation_depth){
if(!reloc_dir) generate_reloc_directory();
- s_entry1 = (struct directory_entry *)
+ s_entry1 = (struct directory_entry *)
e_malloc(sizeof (struct directory_entry));
- memcpy(s_entry1, this_dir->contents,
+ memcpy(s_entry1, this_dir->contents,
sizeof(struct directory_entry));
s_entry1->table = NULL;
s_entry1->name = strdup(this_dir->contents->name);
@@ -800,7 +800,7 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){
s_entry->inode = UNCACHED_INODE;
deep_flag = NEED_CL;
};
-
+
if(generate_tables && strcmp(s_entry->name, ".") && strcmp(s_entry->name, "..")) {
char buffer[2048];
switch(lstatbuf.st_mode & S_IFMT){
@@ -841,7 +841,7 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){
};
s_entry->table = strdup(buffer);
};
-
+
if(S_ISDIR(statbuf.st_mode)){
int dflag;
if (strcmp(d_entry->d_name,".") && strcmp(d_entry->d_name,"..")) {
@@ -861,7 +861,7 @@ FDECL2(scan_directory_tree,char *, path, struct directory_entry *, de){
generate_rock_ridge_attributes(whole_path,
d_entry->d_name, s_entry,
&statbuf, &lstatbuf, deep_flag);
-
+
}
}
closedir(current_dir);
diff --git a/gnu/usr.bin/mkisofs/vms.c b/gnu/usr.bin/mkisofs/vms.c
index 0c086f0e89b6..19dc5167cade 100644
--- a/gnu/usr.bin/mkisofs/vms.c
+++ b/gnu/usr.bin/mkisofs/vms.c
@@ -172,7 +172,7 @@ struct direct * readdir(int context){
if(dircontext[context] == -3) dircontext[context] = 0;
dpath.dsc$w_length = strlen(searchpath[context]);
- lib$find_file(&dpath, &result, &dircontext[context],
+ lib$find_file(&dpath, &result, &dircontext[context],
0, 0, &status, 0);
if(status == SS$_NOMOREFILES) return 0;
@@ -250,7 +250,7 @@ int vms_write_one_file(char * filename, int size, FILE * outfile){
open_file(filename);
remain = size;
-
+
while(remain > 0){
use = (remain > SECTOR_SIZE * NSECT - 1 ? NSECT*SECTOR_SIZE : remain);
use = ROUND_UP(use); /* Round up to nearest sector boundary */
@@ -263,7 +263,7 @@ int vms_write_one_file(char * filename, int size, FILE * outfile){
if((last_extent_written % 1000) < use/SECTOR_SIZE) fprintf(stderr,"%d..", last_extent_written);
remain -= use;
};
-
+
close_file(rab);
}
#endif
diff --git a/gnu/usr.bin/mkisofs/write.c b/gnu/usr.bin/mkisofs/write.c
index ac8567477cfd..3a98a3907624 100644
--- a/gnu/usr.bin/mkisofs/write.c
+++ b/gnu/usr.bin/mkisofs/write.c
@@ -170,7 +170,7 @@ static void FDECL3(write_one_file, char *, filename, unsigned int, size, FILE *,
use = ROUND_UP(use); /* Round up to nearest sector boundary */
memset(buffer, 0, use);
if (fread(buffer, 1, use, infile) == 0) {
- fprintf(stderr,"cannot read from %s\n",filename);
+ fprintf(stderr,"cannot read from %s\n",filename);
exit(1);
}
xfwrite(buffer, 1, use, outfile);
@@ -251,7 +251,7 @@ void FDECL1(sort_directory, struct directory_entry **, sort_dir){
};
/* OK, now we know how many there are. Build a vector for sorting. */
- sortlist = (struct directory_entry **)
+ sortlist = (struct directory_entry **)
e_malloc(sizeof(struct directory_entry *) * dcount);
dcount = 0;
@@ -263,7 +263,7 @@ void FDECL1(sort_directory, struct directory_entry **, sort_dir){
dcount++;
s_entry = s_entry->next;
};
-
+
qsort(sortlist, dcount, sizeof(struct directory_entry *),
(void *)compare_dirs);
@@ -306,18 +306,18 @@ static void FDECL1(assign_file_addresses, struct directory *, dpnt){
while (dpnt){
s_entry = dpnt->contents;
for(s_entry = dpnt->contents; s_entry; s_entry = s_entry->next){
-
+
/* This saves some space if there are symlinks present */
s_hash = find_hash(s_entry->dev, s_entry->inode);
if(s_hash){
if(verbose)
- fprintf(stderr, "Cache hit for %s%s%s\n",s_entry->filedir->de_name,
+ fprintf(stderr, "Cache hit for %s%s%s\n",s_entry->filedir->de_name,
SPATH_SEPARATOR, s_entry->name);
set_733(s_entry->isorec.extent, s_hash->starting_block);
set_733(s_entry->isorec.size, s_hash->size);
continue;
};
- if (strcmp(s_entry->name,".") && strcmp(s_entry->name,"..") &&
+ if (strcmp(s_entry->name,".") && strcmp(s_entry->name,"..") &&
s_entry->isorec.flags[0] == 2){
finddir = dpnt->subdir;
while(1==1){
@@ -335,22 +335,22 @@ static void FDECL1(assign_file_addresses, struct directory *, dpnt){
if(strcmp(s_entry->name,".") ==0 || strcmp(s_entry->name,"..") == 0) {
if(strcmp(s_entry->name,".") == 0) {
set_733(s_entry->isorec.extent, dpnt->extent);
-
+
/* Set these so that the hash table has the correct information */
s_entry->starting_block = dpnt->extent;
s_entry->size = ROUND_UP(dpnt->size);
-
+
add_hash(s_entry);
s_entry->starting_block = dpnt->extent;
set_733(s_entry->isorec.size, ROUND_UP(dpnt->size));
} else {
if(dpnt == root) total_dir_size += root->size;
set_733(s_entry->isorec.extent, dpnt->parent->extent);
-
+
/* Set these so that the hash table has the correct information */
s_entry->starting_block = dpnt->parent->extent;
s_entry->size = ROUND_UP(dpnt->parent->size);
-
+
add_hash(s_entry);
s_entry->starting_block = dpnt->parent->extent;
set_733(s_entry->isorec.size, ROUND_UP(dpnt->parent->size));
@@ -360,9 +360,9 @@ static void FDECL1(assign_file_addresses, struct directory *, dpnt){
straightforward, just make a list and assign extents as we go.
Once we get through writing all of the directories, we should
be ready write out these files */
-
+
if(s_entry->size) {
- dwpnt = (struct deferred_write *)
+ dwpnt = (struct deferred_write *)
e_malloc(sizeof(struct deferred_write));
if(dw_tail){
dw_tail->next = dwpnt;
@@ -398,7 +398,7 @@ static void FDECL1(assign_file_addresses, struct directory *, dpnt){
fprintf(stderr,"Warning: large file %s\n", whole_path);
fprintf(stderr,"Starting block is %d\n", s_entry->starting_block);
fprintf(stderr,"Reported file size is %d extents\n", s_entry->size);
-
+
};
#endif
if(last_extent > (700000000 >> 11)) { /* More than 700Mb? Punt */
@@ -437,9 +437,9 @@ void FDECL2(generate_one_directory, struct directory *, dpnt, FILE *, outfile){
if(ce_size) {
ce_buffer = (char *) e_malloc(ce_size);
memset(ce_buffer, 0, ce_size);
-
+
ce_index = 0;
-
+
/* Absolute byte address of CE entries for this directory */
ce_address = last_extent_written + (total_size >> 11);
ce_address = ce_address << 11;
@@ -452,13 +452,13 @@ void FDECL2(generate_one_directory, struct directory *, dpnt, FILE *, outfile){
pad, and then start the next entry at the next sector */
new_reclen = s_entry->isorec.length[0];
if ((dir_index & (SECTOR_SIZE - 1)) + new_reclen >= SECTOR_SIZE)
- dir_index = (dir_index + (SECTOR_SIZE - 1)) &
+ dir_index = (dir_index + (SECTOR_SIZE - 1)) &
~(SECTOR_SIZE - 1);
- memcpy(directory_buffer + dir_index, &s_entry->isorec,
+ memcpy(directory_buffer + dir_index, &s_entry->isorec,
sizeof(struct iso_directory_record) -
sizeof(s_entry->isorec.name) + s_entry->isorec.name_len[0]);
- dir_index += sizeof(struct iso_directory_record) -
+ dir_index += sizeof(struct iso_directory_record) -
sizeof (s_entry->isorec.name)+ s_entry->isorec.name_len[0];
/* Add the Rock Ridge attributes, if present */
@@ -486,10 +486,10 @@ void FDECL2(generate_one_directory, struct directory *, dpnt, FILE *, outfile){
set_733(pnt+4, (ce_address + ce_index) >> 11);
set_733(pnt+12, (ce_address + ce_index) & (SECTOR_SIZE - 1));
-
+
/* Now store the block in the ce buffer */
- memcpy(ce_buffer + ce_index,
+ memcpy(ce_buffer + ce_index,
pnt + pnt[2], nbytes);
ce_index += nbytes;
if(ce_index & 1) ce_index++;
@@ -501,7 +501,7 @@ void FDECL2(generate_one_directory, struct directory *, dpnt, FILE *, outfile){
}
rockridge_size += s_entry->total_rr_attr_size;
- memcpy(directory_buffer + dir_index, s_entry->rr_attributes,
+ memcpy(directory_buffer + dir_index, s_entry->rr_attributes,
s_entry->rr_attr_size);
dir_index += s_entry->rr_attr_size;
};
@@ -518,7 +518,7 @@ void FDECL2(generate_one_directory, struct directory *, dpnt, FILE *, outfile){
sort_dir = NULL;
if(dpnt->size != dir_index)
- fprintf(stderr,"Unexpected directory length %d %d %s\n",dpnt->size,
+ fprintf(stderr,"Unexpected directory length %d %d %s\n",dpnt->size,
dir_index, dpnt->de_name);
xfwrite(directory_buffer, 1, total_size, outfile);
last_extent_written += total_size >> 11;
@@ -551,7 +551,7 @@ int FDECL2(compare_paths, const struct directory **, r, const struct directory *
if((*r)->parent->path_index < (*l)->parent->path_index) return -1;
if((*r)->parent->path_index > (*l)->parent->path_index) return 1;
return strcmp((*r)->self->isorec.name, (*l)->self->isorec.name);
-
+
}
void generate_path_tables(){
@@ -597,7 +597,7 @@ void generate_path_tables(){
if(*npnt == 0 || dpnt == root) npnt = "."; /* So the root comes out OK */
npnt1 = strrchr(npnt, PATH_SEPARATOR);
if(npnt1) npnt = npnt1 + 1;
-
+
de = dpnt->self;
if(!de) {fprintf(stderr,"Fatal goof\n"); exit(1);};
@@ -607,11 +607,11 @@ void generate_path_tables(){
path_table_l[path_table_index] = namelen;
path_table_m[path_table_index] = namelen;
path_table_index += 2;
- set_731(path_table_l + path_table_index, dpnt->extent);
- set_732(path_table_m + path_table_index, dpnt->extent);
+ set_731(path_table_l + path_table_index, dpnt->extent);
+ set_732(path_table_m + path_table_index, dpnt->extent);
path_table_index += 4;
- set_721(path_table_l + path_table_index, dpnt->parent->path_index);
- set_722(path_table_m + path_table_index, dpnt->parent->path_index);
+ set_721(path_table_l + path_table_index, dpnt->parent->path_index);
+ set_722(path_table_m + path_table_index, dpnt->parent->path_index);
path_table_index += 2;
for(i =0; i<namelen; i++){
path_table_l[path_table_index] = de->isorec.name[i];
@@ -678,7 +678,7 @@ int FDECL1(iso_write, FILE *, outfile){
/* Now we copy the actual root directory record */
- memcpy(vol_desc.root_directory_record, &root_record,
+ memcpy(vol_desc.root_directory_record, &root_record,
sizeof(struct iso_directory_record) + 1);
/* The rest is just fluff. It looks nice to fill in many of these fields,
@@ -749,7 +749,7 @@ int FDECL1(iso_write, FILE *, outfile){
#ifdef DBG_ISO
fprintf(stderr,"Total directory extents being written = %d\n", last_extent);
#endif
-#if 0
+#if 0
generate_one_directory(root, outfile);
#endif
generate_iso9660_directories(root, outfile);