2009-12-23 Felix Zielcke <fzielcke@z-51.de>
* commands/i386/pc/drivemap.c: Remove all trailing whitespace. * commands/lspci.c: Likewise. * commands/probe.c: Likewise. * commands/xnu_uuid.c: Likewise. * conf/i386-coreboot.rmk: Likewise. * conf/i386-efi.rmk: Likewise. * conf/i386-ieee1275.rmk: Likewise. * conf/i386-pc.rmk: Likewise. * conf/powerpc-ieee1275.rmk: Likewise. * conf/sparc64-ieee1275.rmk: Likewise. * conf/x86_64-efi.rmk: Likewise. * fs/i386/pc/pxe.c: Likewise. * gettext/gettext.c: Likewise. * include/grub/efi/graphics_output.h: Likewise. * include/grub/i386/pc/memory.h: Likewise. * kern/env.c: Likewise. * kern/i386/qemu/startup.S: Likewise. * lib/i386/pc/biosnum.c: Likewise. * lib/i386/relocator.c: Likewise. * lib/i386/relocator_asm.S: Likewise. * lib/relocator.c: Likewise. * loader/i386/bsd.c: Likewise. * loader/i386/multiboot.c: Likewise. * loader/i386/pc/chainloader.c: Likewise. * loader/i386/xnu.c: Likewise. * loader/xnu.c: Likewise. * normal/main.c: Likewise. * normal/menu_text.c: Likewise. * util/getroot.c: Likewise. * util/grub-mkconfig_lib.in: Likewise. * util/grub.d/00_header.in: Likewise. * util/i386/pc/grub-mkimage.c: Likewise. * util/mkisofs/eltorito.c: Likewise. * util/mkisofs/exclude.h: Likewise. * util/mkisofs/hash.c: Likewise. * util/mkisofs/iso9660.h: Likewise. * util/mkisofs/joliet.c: Likewise. * util/mkisofs/mkisofs.c: Likewise. * util/mkisofs/mkisofs.h: Likewise. * util/mkisofs/multi.c: Likewise. * util/mkisofs/name.c: Likewise. * util/mkisofs/rock.c: Likewise. * util/mkisofs/tree.c: Likewise. * util/mkisofs/write.c: Likewise. * video/efi_gop.c: Likewise.
This commit is contained in:
parent
009ec74317
commit
a2c1332b70
46 changed files with 803 additions and 755 deletions
|
@ -27,7 +27,7 @@
|
|||
#include <ctype.h>
|
||||
|
||||
extern int allow_leading_dots;
|
||||
|
||||
|
||||
/*
|
||||
* Function: iso9660_file_length
|
||||
*
|
||||
|
@ -43,8 +43,8 @@ extern int allow_leading_dots;
|
|||
* would also be nice to have.
|
||||
*/
|
||||
int FDECL3(iso9660_file_length,
|
||||
const char*, name,
|
||||
struct directory_entry *, sresult,
|
||||
const char*, name,
|
||||
struct directory_entry *, sresult,
|
||||
int, dirflag)
|
||||
{
|
||||
char * c;
|
||||
|
@ -69,7 +69,7 @@ int FDECL3(iso9660_file_length,
|
|||
*/
|
||||
if(strcmp(name,".") == 0)
|
||||
{
|
||||
if(result)
|
||||
if(result)
|
||||
{
|
||||
*result = 0;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ int FDECL3(iso9660_file_length,
|
|||
*/
|
||||
if(strcmp(name,"..") == 0)
|
||||
{
|
||||
if(result)
|
||||
if(result)
|
||||
{
|
||||
*result++ = 1;
|
||||
*result++ = 0;
|
||||
|
@ -115,7 +115,7 @@ int FDECL3(iso9660_file_length,
|
|||
while(*pnt)
|
||||
{
|
||||
#ifdef VMS
|
||||
if( strcmp(pnt,".DIR;1") == 0 )
|
||||
if( strcmp(pnt,".DIR;1") == 0 )
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
@ -126,11 +126,11 @@ int FDECL3(iso9660_file_length,
|
|||
* generated by some editors. Lower the priority of
|
||||
* the file.
|
||||
*/
|
||||
if(*pnt == '#')
|
||||
if(*pnt == '#')
|
||||
{
|
||||
priority = 1;
|
||||
pnt++;
|
||||
continue;
|
||||
priority = 1;
|
||||
pnt++;
|
||||
continue;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -138,11 +138,11 @@ int FDECL3(iso9660_file_length,
|
|||
* generated by some editors. Lower the priority of
|
||||
* the file.
|
||||
*/
|
||||
if(*pnt == '~')
|
||||
if(*pnt == '~')
|
||||
{
|
||||
priority = 1;
|
||||
tildes++;
|
||||
pnt++;
|
||||
priority = 1;
|
||||
tildes++;
|
||||
pnt++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -170,9 +170,9 @@ int FDECL3(iso9660_file_length,
|
|||
* If we have a name with multiple '.' characters, we ignore everything
|
||||
* after we have gotten the extension.
|
||||
*/
|
||||
if(ignore)
|
||||
if(ignore)
|
||||
{
|
||||
pnt++;
|
||||
pnt++;
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -181,7 +181,7 @@ int FDECL3(iso9660_file_length,
|
|||
*/
|
||||
if(seen_semic)
|
||||
{
|
||||
if(*pnt >= '0' && *pnt <= '9')
|
||||
if(*pnt >= '0' && *pnt <= '9')
|
||||
{
|
||||
*result++ = *pnt;
|
||||
}
|
||||
|
@ -197,19 +197,19 @@ int FDECL3(iso9660_file_length,
|
|||
* option. We still only allow one '.' character in the
|
||||
* name, however.
|
||||
*/
|
||||
if(full_iso9660_filenames)
|
||||
if(full_iso9660_filenames)
|
||||
{
|
||||
/* Here we allow a more relaxed syntax. */
|
||||
if(*pnt == '.')
|
||||
if(*pnt == '.')
|
||||
{
|
||||
if (seen_dot)
|
||||
if (seen_dot)
|
||||
{
|
||||
ignore++;
|
||||
ignore++;
|
||||
continue;
|
||||
}
|
||||
seen_dot++;
|
||||
}
|
||||
if(current_length < 30)
|
||||
if(current_length < 30)
|
||||
{
|
||||
if( !isascii (*pnt))
|
||||
{
|
||||
|
@ -222,21 +222,21 @@ int FDECL3(iso9660_file_length,
|
|||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/*
|
||||
{
|
||||
/*
|
||||
* Dos style filenames. We really restrict the
|
||||
* names here.
|
||||
*/
|
||||
/* It would be nice to have .tar.gz transform to .tgz,
|
||||
* .ps.gz to .psz, ...
|
||||
*/
|
||||
if(*pnt == '.')
|
||||
if(*pnt == '.')
|
||||
{
|
||||
if (!chars_before_dot && !allow_leading_dots)
|
||||
if (!chars_before_dot && !allow_leading_dots)
|
||||
{
|
||||
/* DOS can't read files with dot first */
|
||||
chars_before_dot++;
|
||||
if (result)
|
||||
if (result)
|
||||
{
|
||||
*result++ = '_'; /* Substitute underscore */
|
||||
}
|
||||
|
@ -247,36 +247,36 @@ int FDECL3(iso9660_file_length,
|
|||
* If this isn't the dot that we use for the extension,
|
||||
* then change the character into a '_' instead.
|
||||
*/
|
||||
if(chars_before_dot < 8)
|
||||
if(chars_before_dot < 8)
|
||||
{
|
||||
chars_before_dot++;
|
||||
if(result)
|
||||
if(result)
|
||||
{
|
||||
*result++ = '_';
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if (seen_dot)
|
||||
if (seen_dot)
|
||||
{
|
||||
ignore++; continue;
|
||||
}
|
||||
if(result)
|
||||
if(result)
|
||||
{
|
||||
*result++ = '.';
|
||||
}
|
||||
seen_dot++;
|
||||
}
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
if( (seen_dot && (chars_after_dot < 3) && ++chars_after_dot)
|
||||
|| (!seen_dot && (chars_before_dot < 8) && ++chars_before_dot) )
|
||||
{
|
||||
if(result)
|
||||
if(result)
|
||||
{
|
||||
switch (*pnt)
|
||||
switch (*pnt)
|
||||
{
|
||||
default:
|
||||
if( !isascii (*pnt) )
|
||||
|
@ -289,7 +289,7 @@ int FDECL3(iso9660_file_length,
|
|||
}
|
||||
break;
|
||||
|
||||
/*
|
||||
/*
|
||||
* Descriptions of DOS's 'Parse Filename'
|
||||
* (function 29H) describes V1 and V2.0+
|
||||
* separator and terminator characters.
|
||||
|
@ -329,7 +329,7 @@ int FDECL3(iso9660_file_length,
|
|||
current_length++;
|
||||
pnt++;
|
||||
} /* while (*pnt) */
|
||||
|
||||
|
||||
/*
|
||||
* OK, that wraps up the scan of the name. Now tidy up a few other
|
||||
* things.
|
||||
|
@ -345,11 +345,11 @@ int FDECL3(iso9660_file_length,
|
|||
{
|
||||
int prio1 = 0;
|
||||
pnt = name;
|
||||
while (*pnt && *pnt != '~')
|
||||
while (*pnt && *pnt != '~')
|
||||
{
|
||||
pnt++;
|
||||
}
|
||||
if (*pnt)
|
||||
if (*pnt)
|
||||
{
|
||||
pnt++;
|
||||
}
|
||||
|
@ -360,7 +360,7 @@ int FDECL3(iso9660_file_length,
|
|||
}
|
||||
priority = prio1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* If this is not a directory, force a '.' in case we haven't
|
||||
* seen one, and add a version number if we haven't seen one
|
||||
|
@ -368,12 +368,12 @@ int FDECL3(iso9660_file_length,
|
|||
*/
|
||||
if (!dirflag)
|
||||
{
|
||||
if (!seen_dot && !omit_period)
|
||||
if (!seen_dot && !omit_period)
|
||||
{
|
||||
if (result) *result++ = '.';
|
||||
if (result) *result++ = '.';
|
||||
extra++;
|
||||
}
|
||||
if(!omit_version_number && !seen_semic)
|
||||
if(!omit_version_number && !seen_semic)
|
||||
{
|
||||
if(result)
|
||||
{
|
||||
|
@ -383,8 +383,8 @@ int FDECL3(iso9660_file_length,
|
|||
extra += 2;
|
||||
}
|
||||
}
|
||||
|
||||
if(result)
|
||||
|
||||
if(result)
|
||||
{
|
||||
*result++ = 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue