1 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
3 * ***** BEGIN LICENSE BLOCK *****
4 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 * The contents of this file are subject to the Mozilla Public License Version
7 * 1.1 (the "License"); you may not use this file except in compliance with
8 * the License. You may obtain a copy of the License at
9 * http://www.mozilla.org/MPL/
11 * Software distributed under the License is distributed on an "AS IS" basis,
12 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
13 * for the specific language governing rights and limitations under the
16 * The Original Code is codesighs.c code, released
19 * The Initial Developer of the Original Code is
20 * Netscape Communications Corporation.
21 * Portions created by the Initial Developer are Copyright (C) 2002
22 * the Initial Developer. All Rights Reserved.
25 * Garrett Arch Blythe, 03-October-2002
27 * Alternatively, the contents of this file may be used under the terms of
28 * either the GNU General Public License Version 2 or later (the "GPL"), or
29 * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
30 * in which case the provisions of the GPL or the LGPL are applicable instead
31 * of those above. If you wish to allow use of your version of this file only
32 * under the terms of either the GPL or the LGPL, and not to allow others to
33 * use your version of this file under the terms of the MPL, indicate your
34 * decision by deleting the provisions above and replace them with the notice
35 * and other provisions required by the GPL or the LGPL. If you do not delete
36 * the provisions above, a recipient may use your version of this file under
37 * the terms of any one of the MPL, the GPL or the LGPL.
39 * ***** END LICENSE BLOCK ***** */
48 #define ERROR_REPORT(num, val, msg) fprintf(stderr, "error(%d):\t\"%s\"\t%s\n", (num), (val), (msg));
49 #define CLEANUP(ptr) do { if(NULL != ptr) { free(ptr); ptr = NULL; } } while(0)
52 typedef struct __struct_Options
54 ** Options to control how we perform.
56 ** mProgramName Used in help text.
57 ** mInput File to read for input.
59 ** mInputName Name of the file.
60 ** mOutput Output file, append.
62 ** mOutputName Name of the file.
63 ** mHelp Whether or not help should be shown.
64 ** mModules Output module by module information.
65 ** mTotalOnly Only output one number, the total.
66 ** mMinSize Ignore lines below this size.
67 ** mMaxSize Ignore lines above this size.
68 ** mMatchScopes For a line to be processed, it should match.
69 ** mMachClasses For a line to be processed, it should match.
70 ** mMatchModules For a line to be processed, it should match.
71 ** mMatchSections For a line to be processed, it should match.
72 ** mMatchObjects For a line to be processed, it should match.
73 ** mMatchSymbols For a line to be processed, it should match.
76 const char* mProgramName
;
84 unsigned long mMinSize
;
85 unsigned long mMaxSize
;
87 unsigned mMatchScopeCount
;
89 unsigned mMatchClassCount
;
91 unsigned mMatchModuleCount
;
92 char** mMatchSections
;
93 unsigned mMatchSectionCount
;
95 unsigned mMatchObjectCount
;
97 unsigned mMatchSymbolCount
;
102 typedef struct __struct_Switch
104 ** Command line options.
107 const char* mLongName
;
108 const char* mShortName
;
111 const char* mDescription
;
115 #define DESC_NEWLINE "\n\t\t"
117 static Switch gInputSwitch
= {"--input", "-i", 1, NULL
, "Specify input file." DESC_NEWLINE
"stdin is default."};
118 static Switch gOutputSwitch
= {"--output", "-o", 1, NULL
, "Specify output file." DESC_NEWLINE
"Appends if file exists." DESC_NEWLINE
"stdout is default."};
119 static Switch gHelpSwitch
= {"--help", "-h", 0, NULL
, "Information on usage."};
120 static Switch gModuleSwitch
= {"--modules", "-m", 0, NULL
, "Output individual module numbers as well."};
121 static Switch gTotalSwitch
= {"--totalonly", "-t", 0, NULL
, "Output only one number." DESC_NEWLINE
"The total overall size." DESC_NEWLINE
"Overrides other output options."};
122 static Switch gMinSize
= {"--min-size", "-min", 1, NULL
, "Only consider symbols equal to or greater than this size." DESC_NEWLINE
"The default is 0x00000000."};
123 static Switch gMaxSize
= {"--max-size", "-max", 1, NULL
, "Only consider symbols equal to or smaller than this size." DESC_NEWLINE
"The default is 0xFFFFFFFF."};
124 static Switch gMatchScope
= {"--match-scope", "-msco", 1, NULL
, "Only consider scopes that have a substring match." DESC_NEWLINE
"Multiple uses allowed to specify a range of scopes," DESC_NEWLINE
"though PUBLIC, STATIC, and UNDEF are your only choices."};
125 static Switch gMatchClass
= {"--match-class", "-mcla", 1, NULL
, "Only consider classes that have a substring match." DESC_NEWLINE
"Multiple uses allowed to specify a range of classes," DESC_NEWLINE
"though CODE and DATA are your only choices."};
126 static Switch gMatchModule
= {"--match-module", "-mmod", 1, NULL
, "Only consider modules that have a substring match." DESC_NEWLINE
"Multiple uses allowed to specify an array of modules."};
127 static Switch gMatchSection
= {"--match-section", "-msec", 1, NULL
, "Only consider sections that have a substring match." DESC_NEWLINE
"Multiple uses allowed to specify an array of sections." DESC_NEWLINE
"Section is considered symbol type."};
128 static Switch gMatchObject
= {"--match-object", "-mobj", 1, NULL
, "Only consider objects that have a substring match." DESC_NEWLINE
"Multiple uses allowed to specify an array of objects."};
129 static Switch gMatchSymbol
= {"--match-symbol", "-msym", 1, NULL
, "Only consider symbols that have a substring match." DESC_NEWLINE
"Multiple uses allowed to specify an array of symbols."};
131 static Switch
* gSwitches
[] = {
148 typedef struct __struct_SizeStats
152 ** mData Size of data.
153 ** mCode Size of code.
162 typedef struct __struct_ModuleStats
164 ** Track module level information.
166 ** mModule Module name.
167 ** mSize Size of module.
175 typedef enum __enum_SegmentClass
183 static int moduleCompare(const void* in1
, const void* in2
)
185 ** qsort helper function.
190 const ModuleStats
* one
= (const ModuleStats
*)in1
;
191 const ModuleStats
* two
= (const ModuleStats
*)in2
;
192 unsigned long oneSize
= one
->mSize
.mCode
+ one
->mSize
.mData
;
193 unsigned long twoSize
= two
->mSize
.mCode
+ two
->mSize
.mData
;
195 if(oneSize
< twoSize
)
199 else if(oneSize
> twoSize
)
208 void trimWhite(char* inString
)
210 ** Remove any whitespace from the end of the string.
213 int len
= strlen(inString
);
219 if(isspace(*(inString
+ len
)))
221 *(inString
+ len
) = '\0';
231 int codesighs(Options
* inOptions
)
233 ** Output a simplistic report based on our options.
237 char lineBuffer
[0x1000];
247 ModuleStats
* modules
= NULL
;
248 unsigned moduleCount
= 0;
250 memset(&overall
, 0, sizeof(overall
));
253 ** Read the file line by line, regardless of number of fields.
254 ** We assume tab separated value formatting, at least 7 lead values:
255 ** size class scope module segment object symbol ....
257 while(0 == retval
&& NULL
!= fgets(lineBuffer
, sizeof(lineBuffer
), inOptions
->mInput
))
259 trimWhite(lineBuffer
);
261 scanRes
= sscanf(lineBuffer
,
262 "%x\t%s\t%s\t%s\t%s\t%s\t",
272 SegmentClass segmentClass
= CODE
;
274 symbol
= strchr(lineBuffer
, '\t') + 1;
277 ** Qualify the segment class.
279 if(0 == strcmp(segClass
, "DATA"))
283 else if(0 == strcmp(segClass
, "CODE"))
290 ERROR_REPORT(retval
, segClass
, "Unable to determine segment class.");
296 ** Match any options required before continuing.
297 ** This is where you would want to add more restrictive totalling.
303 if(size
< inOptions
->mMinSize
)
307 if(size
> inOptions
->mMaxSize
)
315 if(0 != inOptions
->mMatchClassCount
)
319 for(loop
= 0; loop
< inOptions
->mMatchClassCount
; loop
++)
321 if(NULL
!= strstr(segClass
, inOptions
->mMatchClasses
[loop
]))
328 ** If there was no match, we skip the line.
330 if(loop
== inOptions
->mMatchClassCount
)
339 if(0 != inOptions
->mMatchScopeCount
)
343 for(loop
= 0; loop
< inOptions
->mMatchScopeCount
; loop
++)
345 if(NULL
!= strstr(scope
, inOptions
->mMatchScopes
[loop
]))
352 ** If there was no match, we skip the line.
354 if(loop
== inOptions
->mMatchScopeCount
)
363 if(0 != inOptions
->mMatchModuleCount
)
367 for(loop
= 0; loop
< inOptions
->mMatchModuleCount
; loop
++)
369 if(NULL
!= strstr(module
, inOptions
->mMatchModules
[loop
]))
376 ** If there was no match, we skip the line.
378 if(loop
== inOptions
->mMatchModuleCount
)
387 if(0 != inOptions
->mMatchSectionCount
)
391 for(loop
= 0; loop
< inOptions
->mMatchSectionCount
; loop
++)
393 if(NULL
!= strstr(segment
, inOptions
->mMatchSections
[loop
]))
400 ** If there was no match, we skip the line.
402 if(loop
== inOptions
->mMatchSectionCount
)
411 if(0 != inOptions
->mMatchObjectCount
)
415 for(loop
= 0; loop
< inOptions
->mMatchObjectCount
; loop
++)
417 if(NULL
!= strstr(object
, inOptions
->mMatchObjects
[loop
]))
424 ** If there was no match, we skip the line.
426 if(loop
== inOptions
->mMatchObjectCount
)
435 if(0 != inOptions
->mMatchSymbolCount
)
439 for(loop
= 0; loop
< inOptions
->mMatchSymbolCount
; loop
++)
441 if(NULL
!= strstr(symbol
, inOptions
->mMatchSymbols
[loop
]))
448 ** If there was no match, we skip the line.
450 if(loop
== inOptions
->mMatchSymbolCount
)
457 ** Update overall totals.
459 if(CODE
== segmentClass
)
461 overall
.mCode
+= size
;
463 else if(DATA
== segmentClass
)
465 overall
.mData
+= size
;
469 ** See what else we should be tracking.
471 if(0 == inOptions
->mTotalOnly
)
473 if(inOptions
->mModules
)
478 ** Find the module to modify.
480 for(index
= 0; index
< moduleCount
; index
++)
482 if(0 == strcmp(modules
[index
].mModule
, module
))
489 ** If the index is the same as the count, we need to
492 if(index
== moduleCount
)
496 moved
= realloc(modules
, sizeof(ModuleStats
) * (moduleCount
+ 1));
499 modules
= (ModuleStats
*)moved
;
502 memset(modules
+ index
, 0, sizeof(ModuleStats
));
503 modules
[index
].mModule
= strdup(module
);
504 if(NULL
== modules
[index
].mModule
)
507 ERROR_REPORT(retval
, module
, "Unable to duplicate string.");
513 ERROR_REPORT(retval
, inOptions
->mProgramName
, "Unable to allocate module memory.");
519 if(CODE
== segmentClass
)
521 modules
[index
].mSize
.mCode
+= size
;
523 else if(DATA
== segmentClass
)
525 modules
[index
].mSize
.mData
+= size
;
535 ERROR_REPORT(retval
, inOptions
->mInputName
, "Problem extracting values from file.");
539 if(0 == retval
&& 0 != ferror(inOptions
->mInput
))
542 ERROR_REPORT(retval
, inOptions
->mInputName
, "Unable to read file.");
546 ** If all went well, time to report.
550 if(inOptions
->mTotalOnly
)
552 fprintf(inOptions
->mOutput
, "%u\n", (unsigned)(overall
.mCode
+ overall
.mData
));
556 fprintf(inOptions
->mOutput
, "Overall Size\n");
557 fprintf(inOptions
->mOutput
, "\tTotal:\t%10u\n", (unsigned)(overall
.mCode
+ overall
.mData
));
558 fprintf(inOptions
->mOutput
, "\tCode:\t%10u\n", (unsigned)overall
.mCode
);
559 fprintf(inOptions
->mOutput
, "\tData:\t%10u\n", (unsigned)overall
.mData
);
563 ** Check options to see what else we should output.
565 if(inOptions
->mModules
&& moduleCount
)
570 ** Sort the modules by their size.
572 qsort(modules
, (size_t)moduleCount
, sizeof(ModuleStats
), moduleCompare
);
576 ** Might as well clean up while we go too.
578 for(loop
= 0; loop
< moduleCount
; loop
++)
580 fprintf(inOptions
->mOutput
, "\n");
581 fprintf(inOptions
->mOutput
, "%s\n", modules
[loop
].mModule
);
582 fprintf(inOptions
->mOutput
, "\tTotal:\t%10u\n", (unsigned)(modules
[loop
].mSize
.mCode
+ modules
[loop
].mSize
.mData
));
583 fprintf(inOptions
->mOutput
, "\tCode:\t%10u\n", (unsigned)modules
[loop
].mSize
.mCode
);
584 fprintf(inOptions
->mOutput
, "\tData:\t%10u\n", (unsigned)modules
[loop
].mSize
.mData
);
586 CLEANUP(modules
[loop
].mModule
);
590 ** Done with modules.
601 int initOptions(Options
* outOptions
, int inArgc
, char** inArgv
)
603 ** returns int 0 if successful.
610 const int switchCount
= sizeof(gSwitches
) / sizeof(gSwitches
[0]);
611 Switch
* current
= NULL
;
616 memset(outOptions
, 0, sizeof(Options
));
617 outOptions
->mProgramName
= inArgv
[0];
618 outOptions
->mInput
= stdin
;
619 outOptions
->mInputName
= strdup("stdin");
620 outOptions
->mOutput
= stdout
;
621 outOptions
->mOutputName
= strdup("stdout");
622 outOptions
->mMaxSize
= 0xFFFFFFFFU
;
624 if(NULL
== outOptions
->mOutputName
|| NULL
== outOptions
->mInputName
)
627 ERROR_REPORT(retval
, "stdin/stdout", "Unable to strdup.");
631 ** Go through and attempt to do the right thing.
633 for(loop
= 1; loop
< inArgc
&& 0 == retval
; loop
++)
638 for(switchLoop
= 0; switchLoop
< switchCount
&& 0 == retval
; switchLoop
++)
640 if(0 == strcmp(gSwitches
[switchLoop
]->mLongName
, inArgv
[loop
]))
644 else if(0 == strcmp(gSwitches
[switchLoop
]->mShortName
, inArgv
[loop
]))
651 if(gSwitches
[switchLoop
]->mHasValue
)
654 ** Attempt to absorb next option to fullfill value.
656 if(loop
+ 1 < inArgc
)
660 current
= gSwitches
[switchLoop
];
661 current
->mValue
= inArgv
[loop
];
666 current
= gSwitches
[switchLoop
];
675 outOptions
->mHelp
= __LINE__
;
677 ERROR_REPORT(retval
, inArgv
[loop
], "Unknown command line switch.");
679 else if(NULL
== current
)
681 outOptions
->mHelp
= __LINE__
;
683 ERROR_REPORT(retval
, inArgv
[loop
], "Command line switch requires a value.");
688 ** Do something based on address/swtich.
690 if(current
== &gInputSwitch
)
692 CLEANUP(outOptions
->mInputName
);
693 if(NULL
!= outOptions
->mInput
&& stdin
!= outOptions
->mInput
)
695 fclose(outOptions
->mInput
);
696 outOptions
->mInput
= NULL
;
699 outOptions
->mInput
= fopen(current
->mValue
, "r");
700 if(NULL
== outOptions
->mInput
)
703 ERROR_REPORT(retval
, current
->mValue
, "Unable to open input file.");
707 outOptions
->mInputName
= strdup(current
->mValue
);
708 if(NULL
== outOptions
->mInputName
)
711 ERROR_REPORT(retval
, current
->mValue
, "Unable to strdup.");
715 else if(current
== &gOutputSwitch
)
717 CLEANUP(outOptions
->mOutputName
);
718 if(NULL
!= outOptions
->mOutput
&& stdout
!= outOptions
->mOutput
)
720 fclose(outOptions
->mOutput
);
721 outOptions
->mOutput
= NULL
;
724 outOptions
->mOutput
= fopen(current
->mValue
, "a");
725 if(NULL
== outOptions
->mOutput
)
728 ERROR_REPORT(retval
, current
->mValue
, "Unable to open output file.");
732 outOptions
->mOutputName
= strdup(current
->mValue
);
733 if(NULL
== outOptions
->mOutputName
)
736 ERROR_REPORT(retval
, current
->mValue
, "Unable to strdup.");
740 else if(current
== &gHelpSwitch
)
742 outOptions
->mHelp
= __LINE__
;
744 else if(current
== &gModuleSwitch
)
746 outOptions
->mModules
= __LINE__
;
748 else if(current
== &gTotalSwitch
)
750 outOptions
->mTotalOnly
= __LINE__
;
752 else if(current
== &gMinSize
)
754 unsigned long arg
= 0;
755 char* endScan
= NULL
;
758 arg
= strtoul(current
->mValue
, &endScan
, 0);
759 if(0 == errno
&& endScan
!= current
->mValue
)
761 outOptions
->mMinSize
= arg
;
766 ERROR_REPORT(retval
, current
->mValue
, "Unable to convert to a number.");
769 else if(current
== &gMaxSize
)
771 unsigned long arg
= 0;
772 char* endScan
= NULL
;
775 arg
= strtoul(current
->mValue
, &endScan
, 0);
776 if(0 == errno
&& endScan
!= current
->mValue
)
778 outOptions
->mMaxSize
= arg
;
783 ERROR_REPORT(retval
, current
->mValue
, "Unable to convert to a number.");
786 else if(current
== &gMatchClass
)
788 char* dupMatch
= NULL
;
790 dupMatch
= strdup(current
->mValue
);
795 moved
= realloc(outOptions
->mMatchClasses
, sizeof(char*) * (outOptions
->mMatchClassCount
+ 1));
798 outOptions
->mMatchClasses
= (char**)moved
;
799 outOptions
->mMatchClasses
[outOptions
->mMatchClassCount
] = dupMatch
;
800 outOptions
->mMatchClassCount
++;
805 ERROR_REPORT(retval
, current
->mLongName
, "Unable to expand array.");
811 ERROR_REPORT(retval
, current
->mValue
, "Unable to duplicate string.");
814 else if(current
== &gMatchScope
)
816 char* dupMatch
= NULL
;
818 dupMatch
= strdup(current
->mValue
);
823 moved
= realloc(outOptions
->mMatchScopes
, sizeof(char*) * (outOptions
->mMatchScopeCount
+ 1));
826 outOptions
->mMatchScopes
= (char**)moved
;
827 outOptions
->mMatchScopes
[outOptions
->mMatchScopeCount
] = dupMatch
;
828 outOptions
->mMatchScopeCount
++;
833 ERROR_REPORT(retval
, current
->mLongName
, "Unable to expand array.");
839 ERROR_REPORT(retval
, current
->mValue
, "Unable to duplicate string.");
842 else if(current
== &gMatchModule
)
844 char* dupMatch
= NULL
;
846 dupMatch
= strdup(current
->mValue
);
851 moved
= realloc(outOptions
->mMatchModules
, sizeof(char*) * (outOptions
->mMatchModuleCount
+ 1));
854 outOptions
->mMatchModules
= (char**)moved
;
855 outOptions
->mMatchModules
[outOptions
->mMatchModuleCount
] = dupMatch
;
856 outOptions
->mMatchModuleCount
++;
861 ERROR_REPORT(retval
, current
->mLongName
, "Unable to expand array.");
867 ERROR_REPORT(retval
, current
->mValue
, "Unable to duplicate string.");
870 else if(current
== &gMatchSection
)
872 char* dupMatch
= NULL
;
874 dupMatch
= strdup(current
->mValue
);
879 moved
= realloc(outOptions
->mMatchSections
, sizeof(char*) * (outOptions
->mMatchSectionCount
+ 1));
882 outOptions
->mMatchSections
= (char**)moved
;
883 outOptions
->mMatchSections
[outOptions
->mMatchSectionCount
] = dupMatch
;
884 outOptions
->mMatchSectionCount
++;
889 ERROR_REPORT(retval
, current
->mLongName
, "Unable to expand array.");
895 ERROR_REPORT(retval
, current
->mValue
, "Unable to duplicate string.");
898 else if(current
== &gMatchObject
)
900 char* dupMatch
= NULL
;
902 dupMatch
= strdup(current
->mValue
);
907 moved
= realloc(outOptions
->mMatchObjects
, sizeof(char*) * (outOptions
->mMatchObjectCount
+ 1));
910 outOptions
->mMatchObjects
= (char**)moved
;
911 outOptions
->mMatchObjects
[outOptions
->mMatchObjectCount
] = dupMatch
;
912 outOptions
->mMatchObjectCount
++;
917 ERROR_REPORT(retval
, current
->mLongName
, "Unable to expand array.");
923 ERROR_REPORT(retval
, current
->mValue
, "Unable to duplicate string.");
926 else if(current
== &gMatchSymbol
)
928 char* dupMatch
= NULL
;
930 dupMatch
= strdup(current
->mValue
);
935 moved
= realloc(outOptions
->mMatchSymbols
, sizeof(char*) * (outOptions
->mMatchSymbolCount
+ 1));
938 outOptions
->mMatchSymbols
= (char**)moved
;
939 outOptions
->mMatchSymbols
[outOptions
->mMatchSymbolCount
] = dupMatch
;
940 outOptions
->mMatchSymbolCount
++;
945 ERROR_REPORT(retval
, current
->mLongName
, "Unable to expand array.");
951 ERROR_REPORT(retval
, current
->mValue
, "Unable to duplicate string.");
957 ERROR_REPORT(retval
, current
->mLongName
, "No handler for command line switch.");
966 void cleanOptions(Options
* inOptions
)
968 ** Clean up any open handles.
973 CLEANUP(inOptions
->mInputName
);
974 if(NULL
!= inOptions
->mInput
&& stdin
!= inOptions
->mInput
)
976 fclose(inOptions
->mInput
);
978 CLEANUP(inOptions
->mOutputName
);
979 if(NULL
!= inOptions
->mOutput
&& stdout
!= inOptions
->mOutput
)
981 fclose(inOptions
->mOutput
);
984 for(loop
= 0; loop
< inOptions
->mMatchClassCount
; loop
++)
986 CLEANUP(inOptions
->mMatchClasses
[loop
]);
988 CLEANUP(inOptions
->mMatchClasses
);
990 for(loop
= 0; loop
< inOptions
->mMatchScopeCount
; loop
++)
992 CLEANUP(inOptions
->mMatchScopes
[loop
]);
994 CLEANUP(inOptions
->mMatchScopes
);
996 for(loop
= 0; loop
< inOptions
->mMatchModuleCount
; loop
++)
998 CLEANUP(inOptions
->mMatchModules
[loop
]);
1000 CLEANUP(inOptions
->mMatchModules
);
1002 for(loop
= 0; loop
< inOptions
->mMatchSectionCount
; loop
++)
1004 CLEANUP(inOptions
->mMatchSections
[loop
]);
1006 CLEANUP(inOptions
->mMatchSections
);
1008 for(loop
= 0; loop
< inOptions
->mMatchObjectCount
; loop
++)
1010 CLEANUP(inOptions
->mMatchObjects
[loop
]);
1012 CLEANUP(inOptions
->mMatchObjects
);
1014 for(loop
= 0; loop
< inOptions
->mMatchSymbolCount
; loop
++)
1016 CLEANUP(inOptions
->mMatchSymbols
[loop
]);
1018 CLEANUP(inOptions
->mMatchSymbols
);
1020 memset(inOptions
, 0, sizeof(Options
));
1024 void showHelp(Options
* inOptions
)
1026 ** Show some simple help text on usage.
1030 const int switchCount
= sizeof(gSwitches
) / sizeof(gSwitches
[0]);
1031 const char* valueText
= NULL
;
1033 printf("usage:\t%s [arguments]\n", inOptions
->mProgramName
);
1035 printf("arguments:\n");
1037 for(loop
= 0; loop
< switchCount
; loop
++)
1039 if(gSwitches
[loop
]->mHasValue
)
1041 valueText
= " <value>";
1048 printf("\t%s%s\n", gSwitches
[loop
]->mLongName
, valueText
);
1049 printf("\t %s%s", gSwitches
[loop
]->mShortName
, valueText
);
1050 printf(DESC_NEWLINE
"%s\n\n", gSwitches
[loop
]->mDescription
);
1053 printf("This tool takes a tsv file and reports composite code and data sizes.\n");
1057 int main(int inArgc
, char** inArgv
)
1062 retval
= initOptions(&options
, inArgc
, inArgv
);
1067 else if(0 == retval
)
1069 retval
= codesighs(&options
);
1072 cleanOptions(&options
);