fileseltools.c: fix spaces on empty lines

This commit is contained in:
Thomas Bernard 2021-12-16 21:29:56 +01:00
parent 3f291cb32f
commit 8c47fb3fa9
No known key found for this signature in database
GPG Key ID: DB511043A31ACAAF

View File

@ -64,7 +64,7 @@ T_Fileselector_item * Add_element_to_list(T_Fileselector *list, const char * ful
if (list->First!=NULL) if (list->First!=NULL)
list->First->Previous=temp_item; list->First->Previous=temp_item;
// Put new element at the beginning // Put new element at the beginning
list->First=temp_item; list->First=temp_item;
return temp_item; return temp_item;
@ -163,7 +163,7 @@ char * Format_filename(const char * fname, word max_length, int type)
// safety // safety
if (max_length>40) if (max_length>40)
max_length=40; max_length=40;
if (strcmp(fname,PARENT_DIR)==0) if (strcmp(fname,PARENT_DIR)==0)
{ {
strcpy(result,"\x11 PARENT DIRECTORY"); strcpy(result,"\x11 PARENT DIRECTORY");
@ -179,7 +179,7 @@ char * Format_filename(const char * fname, word max_length, int type)
for (c=0; c<max_length-1; c++) for (c=0; c<max_length-1; c++)
result[c]=' '; result[c]=' ';
result[c]='\0'; result[c]='\0';
for (c=0;fname[c]!='\0' && c < max_length-1;c++) for (c=0;fname[c]!='\0' && c < max_length-1;c++)
result[c]=fname[c]; result[c]=fname[c];
// A special character indicates the filename is truncated // A special character indicates the filename is truncated
@ -192,9 +192,9 @@ char * Format_filename(const char * fname, word max_length, int type)
for (c = 0; c<max_length-1; c++) for (c = 0; c<max_length-1; c++)
result[c]=' '; result[c]=' ';
result[c]='\0'; result[c]='\0';
result[max_length-5]='.'; result[max_length-5]='.';
// Look for the last dot in filename // Look for the last dot in filename
pos_last_dot = Position_last_dot(fname); pos_last_dot = Position_last_dot(fname);