modified: pixi.toml
[GalaxyCodeBases.git] / etc / Windows / vlmcsd_old_vancepym / vlmcsdmulti.c
blobaa87c88c4b7881b86d3a309f8fabc54f52d63aba
1 /* Multi-Call Binary for vlmcs and vlmcsd */
3 #ifndef CONFIG
4 #define CONFIG "config.h"
5 #endif // CONFIG
6 #include CONFIG
8 #if MULTI_CALL_BINARY < 1
9 #error "Please define MULTI_CALL_BINARY=1 when compiling this file."
10 #endif
12 #include <libgen.h>
13 #include <stdio.h>
15 #include "vlmcs.h"
16 #include "vlmcsd.h"
17 #include "types.h"
18 #include "shared_globals.h"
19 #include "output.h"
21 #if (defined(_WIN32) || defined(__CYGWIN__))
22 #define compare strcasecmp // Best for case-preserving (but otherwise case-insensitive) filesystems
23 #else // native Unix
24 #define compare strcmp // for case-sensitive filesystems
25 #endif // native Unix
27 int main(int argc, CARGV argv)
29 multi_argv = argv;
30 multi_argc = argc;
32 if (!compare(basename((char*)*argv), "vlmcsd"))
33 return server_main(argc, argv);
35 if (!compare(basename((char*)*argv), "vlmcs"))
36 return client_main(argc, argv);
38 #ifdef _WIN32
39 if (!compare(basename((char*)*argv), "vlmcsd.exe"))
40 return server_main(argc, argv);
42 if (!compare(basename((char*)*argv), "vlmcs.exe"))
43 return client_main(argc, argv);
44 #endif // _WIN32
46 if (argc > 1)
48 if (!strcmp((char*)argv[1],"vlmcsd"))
49 return server_main(argc - 1, argv + 1);
51 if (!strcmp((char*)argv[1],"vlmcs"))
52 return client_main(argc - 1, argv + 1);
55 errorout(
56 "vlmcsdmulti %s\n\n"
57 "Usage:\n"
58 "\t%s vlmcsd [<vlmcsd command line>]\n"
59 "\t%s vlmcs [<vlmcs command line>]\n\n",
60 Version, *argv, *argv
63 return !0;