123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- #include "FetchBannedIPs.h"
- #include "Debug.h"
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc,char *argv[])
- {
- DEBUG;
- Debug::AddErrorHandler();
-
- try
- {
- switch (argc)
- {
- case 2:
- {
- FetchBannedIPs::ProcessOneParameter(argv[1],false);
- break;
- }
- case 3:
- {
- FetchBannedIPs::ProcessTwoParameters(argv[1],argv[2],false);
- break;
- }
- case 4:
- {
- FetchBannedIPs::ProcessThreeParameters(argv[1],argv[2],argv[3]);
- break;
- }
- default:
- {
- FetchBannedIPs::ShowHelpMessage();
- break;
- }
- }
- } catch(const char *error) {
- printf("%s in %s line %d\n",error,Debug::GetFileName(),Debug::GetLineNumber());
- } catch (...) {
- printf("Unknown error in %s line %d\n",Debug::GetFileName(),Debug::GetLineNumber());
- }
-
- Debug::RemoveErrorHandler();
-
- return 0;
- }
|