From: Eric B. <ebo...@us...> - 2002-04-29 18:23:04
|
Update of /cvsroot/alleg/allegro/tools In directory usw-pr-cvs1:/tmp/cvs-serv13022/tools Modified Files: dat.c grabber.txt Log Message: Changed the -sr* option of the dat utility to -r* Index: dat.c =================================================================== RCS file: /cvsroot/alleg/allegro/tools/dat.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- dat.c 12 Apr 2002 12:36:56 -0000 1.9 +++ dat.c 29 Apr 2002 18:22:50 -0000 1.10 @@ -91,11 +91,11 @@ printf("\t'-o output' sets the output file or directory when extracting data\n"); printf("\t'-p prefixstring' sets the prefix for the output header file\n"); printf("\t'-pal objectname' specifies which palette to use\n"); + printf("\t'-r0' no sort\n"); + printf("\t'-r1' sort the objects of the datafile alphabetically by name\n"); printf("\t'-s0' no strip: save everything\n"); printf("\t'-s1' strip grabber specific information from the file\n"); printf("\t'-s2' strip all object properties and names from the file\n"); - printf("\t'-sr0' no sort\n"); - printf("\t'-sr1' sort the objects of the datafile alphabetically by name\n"); printf("\t'-t type' sets the object type when adding files\n"); printf("\t'-transparency' preserves transparency through color conversion\n"); printf("\t'-u' updates the contents of the datafile\n"); @@ -800,23 +800,22 @@ } break; - case 's': - if (argv[c][2] == 'r') { - if ((opt_sort >= 0) || - (argv[c][3] < '0') || (argv[c][3] > '1')) { - usage(); - return 1; - } - opt_sort = argv[c][3] - '0'; + case 'r': + if ((opt_sort >= 0) || + (argv[c][2] < '0') || (argv[c][2] > '1')) { + usage(); + return 1; } - else { - if ((opt_strip >= 0) || - (argv[c][2] < '0') || (argv[c][2] > '2')) { - usage(); - return 1; - } - opt_strip = argv[c][2] - '0'; + opt_sort = argv[c][2] - '0'; + break; + + case 's': + if ((opt_strip >= 0) || + (argv[c][2] < '0') || (argv[c][2] > '2')) { + usage(); + return 1; } + opt_strip = argv[c][2] - '0'; break; case 't': Index: grabber.txt =================================================================== RCS file: /cvsroot/alleg/allegro/tools/grabber.txt,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- grabber.txt 12 Apr 2002 12:36:56 -0000 1.5 +++ grabber.txt 29 Apr 2002 18:22:50 -0000 1.6 @@ -339,6 +339,12 @@ can be used to automatically update the file whenever any of the source data changes. + '-r0' - no sort + '-r1' - sort the objects of the datafile alphabetically by name + Sets the sort mode (see below). These can be used on their own to + sort the objects of the datafile, or in combination with any other + options. + '-s0' - no strip: save everything '-s1' - strip grabber specific information from the file '-s2' - strip all object properties and names from the file @@ -346,12 +352,6 @@ strip properties from the datafile, or in combination with any other options. - '-sr0' - no sort - '-sr1' - sort the objects of the datafile alphabetically by name - Sets the sort mode (see below). These can be used on their own to - sort the objects of the datafile, or in combination with any other - options. - '-transparency' Preserves transparency when converting between color depths. @@ -419,8 +419,8 @@ allows the names to be read back from the index definition header. The objects of the datafile can be sorted alphabetically by name. This is -selected by the Sort checkbox in the grabber, or by using the '-sr0' and -'-sr1' options to dat. With zero sorting, objects are listed in the order +selected by the Sort checkbox in the grabber, or by using the '-r0' and +'-r1' options to dat. With zero sorting, objects are listed in the order they were added to the datafile. With sort level 1, they are listed in alphabetical order according to their NAME property, including inside nested datafiles. |