X-Git-Url: http://git.cinelerra-gg.org/git/?a=blobdiff_plain;f=cinelerra-5.1%2Fguicast%2Fbootstrap.c;h=a697492be44f9566ba7be05b5a32766dce787725;hb=5e3715ec449272335bab3419bf21ed4cd6d4bcbf;hp=c70dd0b650a7ba9397971ff46a5cac9f3d6479ce;hpb=30bdb85eb33a8ee7ba675038a86c6be59c43d7bd;p=goodguy%2Fhistory.git diff --git a/cinelerra-5.1/guicast/bootstrap.c b/cinelerra-5.1/guicast/bootstrap.c index c70dd0b6..a697492b 100644 --- a/cinelerra-5.1/guicast/bootstrap.c +++ b/cinelerra-5.1/guicast/bootstrap.c @@ -5,7 +5,7 @@ // Bootstrap for themes. -// By default, concatenates all the resources and a table of contents +// By default, concatenates all the resources and a table of contents // into an object file with objcopy. // Run nm to get the symbols created by bootstrap. @@ -38,22 +38,22 @@ void append_contents(char *path, char string[1024]; int i, j = 0; - for(i = strlen(path) - 1; + for(i = strlen(path) - 1; i > 0 && path[i] && path[i] != '/'; - i--) + i--) ; if(path[i] == '/') i++; - + for(j = 0; path[i] != 0; i++, j++) string[j] = path[i]; string[j] = 0; - + strcpy(buffer + *buffer_size, string); *buffer_size += strlen(string) + 1; - + *(int*)(buffer + *buffer_size) = data_offset; *buffer_size += sizeof(int); } @@ -133,7 +133,7 @@ int main(int argc, char *argv[]) // Leave space for offset to data contents_size = sizeof(int); -// Read through all the resources, concatenate to dest file, +// Read through all the resources, concatenate to dest file, // and record the contents. while(current_arg < argc) { @@ -173,9 +173,9 @@ int main(int argc, char *argv[]) if(!binary_mode && !string_mode) { // Create contents - append_contents(path, - data_offset, - contents_buffer, + append_contents(path, + data_offset, + contents_buffer, &contents_size); } } @@ -196,6 +196,7 @@ int main(int argc, char *argv[]) // Run system command on it sprintf(system_command, "%s %s %s", BOOTSTRAP, temp_path, out_path); int temp = system(system_command); + return 0; }