tabs to spaces
This commit is contained in:
parent
67e65f7664
commit
ca1abea3ea
|
|
@ -23,7 +23,7 @@ static void string_free (void * entry)
|
|||
{
|
||||
char **s=entry;
|
||||
if(*s!=NULL)
|
||||
free(*s);
|
||||
free(*s);
|
||||
}
|
||||
|
||||
static int string_compare (const void *e1,const void *e2)
|
||||
|
|
@ -37,7 +37,7 @@ static int string_compare (const void *e1,const void *e2)
|
|||
{
|
||||
return strcmp(*s1,*s2);
|
||||
}else
|
||||
return 1;
|
||||
return 1;
|
||||
}
|
||||
|
||||
int main(int argv,char **argc)
|
||||
|
|
|
|||
|
|
@ -23,40 +23,40 @@ int main(int argc,char *argv[])
|
|||
|
||||
if(argc<3)
|
||||
{
|
||||
printf("Makes a large file with hole using fseeko\n");
|
||||
printf("%s <filename> <floating point size in GB>\n",argv[0]);
|
||||
return 3;
|
||||
printf("Makes a large file with hole using fseeko\n");
|
||||
printf("%s <filename> <floating point size in GB>\n",argv[0]);
|
||||
return 3;
|
||||
}
|
||||
|
||||
fd = fopen(argv[1],"w");
|
||||
if(fd == NULL)
|
||||
{
|
||||
perror("fopen");
|
||||
return 1;
|
||||
perror("fopen");
|
||||
return 1;
|
||||
}
|
||||
size=atof(argv[2]);
|
||||
#if SIZEOF_OFF_T <= 4
|
||||
if(size>2)
|
||||
{
|
||||
printf("You do not have LFS your system.\nMaximum supported filesize is 2 GB.\n");
|
||||
return 2;
|
||||
printf("You do not have LFS your system.\nMaximum supported filesize is 2 GB.\n");
|
||||
return 2;
|
||||
}
|
||||
#endif
|
||||
pos=size*GB;
|
||||
if(fseeko(fd,pos,SEEK_SET))
|
||||
{
|
||||
perror("fseeko");
|
||||
return 1;
|
||||
perror("fseeko");
|
||||
return 1;
|
||||
}
|
||||
if(fwrite("!",1,1,fd)<1)
|
||||
{
|
||||
perror("write");
|
||||
return 1;
|
||||
perror("write");
|
||||
return 1;
|
||||
}
|
||||
if(fclose(fd))
|
||||
{
|
||||
perror("fclose");
|
||||
return 1;
|
||||
perror("fclose");
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user