Changeset 8536
- Timestamp:
- Aug 23, 2006, 3:47:27 PM (20 years ago)
- Location:
- trunk/ippTools/src
- Files:
-
- 4 edited
-
Makefile.am (modified) (3 diffs)
-
pztool.c (modified) (8 diffs)
-
pztool.h (modified) (1 diff)
-
pztoolConfig.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippTools/src/Makefile.am
r8535 r8536 1 1 bin_PROGRAMS = \ 2 2 pxadmin \ 3 pz search\3 pztool \ 4 4 p0tool \ 5 5 p2tool\ … … 16 16 pzgetexp.h \ 17 17 pzgetimfiles.h \ 18 pz search.h \18 pztool.h \ 19 19 p0tool.h \ 20 20 p1search.h \ … … 40 40 AM_CPPFLAGS = -I$(top_srcdir)/src$ 41 41 42 pz search_CFLAGS = $(PSLIB_CFLAGS) $(PSMODULES_CFLAGS) $(IPPDB_CFLAGS) $(pxtools_CFLAGS)43 pz search_LDADD = $(PSLIB_LIBS) $(PSMODULES_LIBS) $(IPPDB_LIBS) libpxtools.la44 pz search_SOURCES = \45 pz search.c \46 pz searchConfig.c42 pztool_CFLAGS = $(PSLIB_CFLAGS) $(PSMODULES_CFLAGS) $(IPPDB_CFLAGS) $(pxtools_CFLAGS) 43 pztool_LDADD = $(PSLIB_LIBS) $(PSMODULES_LIBS) $(IPPDB_LIBS) libpxtools.la 44 pztool_SOURCES = \ 45 pztool.c \ 46 pztoolConfig.c 47 47 48 48 p0tool_CFLAGS = $(PSLIB_CFLAGS) $(PSMODULES_CFLAGS) $(IPPDB_CFLAGS) $(pxtools_CFLAGS) -
trunk/ippTools/src/pztool.c
r8121 r8536 6 6 7 7 #include "pxtools.h" 8 #include "pz search.h"8 #include "pztool.h" 9 9 10 10 static bool seenMode(pxConfig *config); … … 12 12 static bool copydoneMode(pxConfig *config); 13 13 static bool summitExpPrint(FILE *stream, summitExpRow *summitExp); 14 static psArray *pz searchPendingExp(pxConfig *config);15 static psArray *pz searchPendingImfiles(pxConfig *config);16 static bool pz searchFlushPendingExp(pxConfig *config);14 static psArray *pztoolPendingExp(pxConfig *config); 15 static psArray *pztoolPendingImfiles(pxConfig *config); 16 static bool pztoolFlushPendingExp(pxConfig *config); 17 17 18 18 # define MODECASE(caseName, func) \ … … 28 28 psLibInit(NULL); 29 29 30 pxConfig *config = pz searchConfig(NULL, argc, argv);30 pxConfig *config = pztoolConfig(NULL, argc, argv); 31 31 32 32 switch (config->mode) { 33 MODECASE(PZ SEARCH_MODE_SEEN, seenMode);34 MODECASE(PZ SEARCH_MODE_PENDING, pendingMode);35 MODECASE(PZ SEARCH_MODE_COPYDONE, copydoneMode);33 MODECASE(PZTOOL_MODE_SEEN, seenMode); 34 MODECASE(PZTOOL_MODE_PENDING, pendingMode); 35 MODECASE(PZTOOL_MODE_COPYDONE, copydoneMode); 36 36 default: 37 37 psAbort(argv[0], "invalid option (this should not happen)"); … … 120 120 // we don't have to operate on complete frames here as it's ok to start 121 121 // downloading the imfiles before the exp has been registered 122 psArray *pending = pz searchPendingImfiles(config);122 psArray *pending = pztoolPendingImfiles(config); 123 123 if (!pending) { 124 124 psError(PS_ERR_UNKNOWN, false, "no pzPendingImfiles found"); … … 159 159 160 160 // check for completed exps 161 if (!pz searchFlushPendingExp(config)) {162 psError(PS_ERR_UNKNOWN, false, "pz searchFlushPendingExp() failed");161 if (!pztoolFlushPendingExp(config)) { 162 psError(PS_ERR_UNKNOWN, false, "pztoolFlushPendingExp() failed"); 163 163 goto ROLLBACK; 164 164 } … … 198 198 } 199 199 200 static psArray *pz searchPendingExp(pxConfig *config)200 static psArray *pztoolPendingExp(pxConfig *config) 201 201 { 202 202 PS_ASSERT_PTR_NON_NULL(config, NULL); … … 212 212 } 213 213 214 static psArray *pz searchPendingImfiles(pxConfig *config)214 static psArray *pztoolPendingImfiles(pxConfig *config) 215 215 { 216 216 PS_ASSERT_PTR_NON_NULL(config, NULL); … … 226 226 } 227 227 228 static bool pz searchFlushPendingExp(pxConfig *config)229 { 230 PS_ASSERT_PTR_NON_NULL(config, false); 231 232 psArray *pending = pz searchPendingExp(config);228 static bool pztoolFlushPendingExp(pxConfig *config) 229 { 230 PS_ASSERT_PTR_NON_NULL(config, false); 231 232 psArray *pending = pztoolPendingExp(config); 233 233 if (!pending) { 234 234 psError(PS_ERR_UNKNOWN, false, "no pzPendingExps found"); -
trunk/ippTools/src/pztool.h
r7921 r8536 1 #ifndef PZ SEARCH_H2 #define PZ SEARCH_H 11 #ifndef PZTOOL_H 2 #define PZTOOL_H 1 3 3 4 4 #include "pxtools.h" 5 5 6 6 typedef enum { 7 PZ SEARCH_MODE_NONE = 0x0,8 PZ SEARCH_MODE_SEEN,9 PZ SEARCH_MODE_PENDING,10 PZ SEARCH_MODE_COPYDONE11 } pz searchMode;7 PZTOOL_MODE_NONE = 0x0, 8 PZTOOL_MODE_SEEN, 9 PZTOOL_MODE_PENDING, 10 PZTOOL_MODE_COPYDONE 11 } pztoolMode; 12 12 13 pxConfig *pz searchConfig(pxConfig *config, int argc, char **argv);13 pxConfig *pztoolConfig(pxConfig *config, int argc, char **argv); 14 14 15 #endif // PZ SEARCH_H15 #endif // PZTOOL_H -
trunk/ippTools/src/pztoolConfig.c
r8459 r8536 6 6 7 7 #include "pxtools.h" 8 #include "pz search.h"8 #include "pztool.h" 9 9 10 10 // this function can not fail -- exits on error 11 pxConfig *pz searchConfig(pxConfig *config, int argc, char **argv) {11 pxConfig *pztoolConfig(pxConfig *config, int argc, char **argv) { 12 12 if (!config) { 13 13 config = pxConfigAlloc(); … … 67 67 } 68 68 69 PXTOOL_MODE("-seen", PZ SEARCH_MODE_SEEN, seenArgs);70 PXTOOL_MODE("-pending", PZ SEARCH_MODE_PENDING, pendingArgs);71 PXTOOL_MODE("-copydone", PZ SEARCH_MODE_COPYDONE, copydoneArgs);69 PXTOOL_MODE("-seen", PZTOOL_MODE_SEEN, seenArgs); 70 PXTOOL_MODE("-pending", PZTOOL_MODE_PENDING, pendingArgs); 71 PXTOOL_MODE("-copydone", PZTOOL_MODE_COPYDONE, copydoneArgs); 72 72 73 73 bool argErr = false; 74 if (config->mode == PZ SEARCH_MODE_NONE) {74 if (config->mode == PZTOOL_MODE_NONE) { 75 75 argErr = true; 76 76 fprintf (stderr, "mode argument is required\n");
Note:
See TracChangeset
for help on using the changeset viewer.
