comparison lwar/add.c @ 427:45df37e81741

Add option to ignore paths when extracting or adding files with lwar Add option to lwar to strip path names from filenames when objects are added to an archive. Also strip path names from objects when extracting them, if present.
author David Flamand <dlflamand@gmail.com>
date Tue, 15 Nov 2016 21:43:33 -0700
parents 6f4c4d59666f
children
comparison
equal deleted inserted replaced
426:b4825b42c151 427:45df37e81741
173 continue; 173 continue;
174 } 174 }
175 fseek(f2, 0, SEEK_END); 175 fseek(f2, 0, SEEK_END);
176 l = ftell(f2); 176 l = ftell(f2);
177 fseek(f2, 0, SEEK_SET); 177 fseek(f2, 0, SEEK_SET);
178 fputs(files[i], f); 178 fputs(get_file_name(files[i]), f);
179 fputc(0, f); 179 fputc(0, f);
180 fputc(l >> 24, f); 180 fputc(l >> 24, f);
181 fputc((l >> 16) & 0xff, f); 181 fputc((l >> 16) & 0xff, f);
182 fputc((l >> 8) & 0xff, f); 182 fputc((l >> 8) & 0xff, f);
183 fputc(l & 0xff, f); 183 fputc(l & 0xff, f);