diff options
author | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-17 20:16:25 +0000 |
---|---|---|
committer | cyberbotx <cyberbotx@5417fbe8-f217-4b02-8779-1006273d7864> | 2008-12-17 20:16:25 +0000 |
commit | 1cd73b4dadb8e618a0ec56289408922be42aac8a (patch) | |
tree | b437cb421d0ed2da6eca57ec4925a8b740aa00d1 /lang/langcomp.c | |
parent | 1fca479d8eb793bf6473226ff248cfe7b814a3e8 (diff) |
Implemented CMake build system to replace the old autoconf-based build system.
(Note: Although each Makefile was changed, they will be removed later as CMake reconstructs them.)
Also fixed generation of language files and version.h to not rely on the current directory they are in.
Edited Config to send parameters to cmake, but it is no longer a requirement.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@1835 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'lang/langcomp.c')
-rw-r--r-- | lang/langcomp.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lang/langcomp.c b/lang/langcomp.c index 5c5988394..773702ba7 100644 --- a/lang/langcomp.c +++ b/lang/langcomp.c @@ -7,7 +7,7 @@ * * Based on the original code of Epona by Lara. * Based on the original code of Services by Andy Church. - * + * * $Id$ * */ @@ -165,8 +165,8 @@ char *anopeStrDup(const char *src) { /*************************************************************************/ int main(int ac, char **av) { - char *filename = NULL, *s; - char langname[254], outfile[256]; + char *filename = NULL, *s, *outfile; + //char langname[254], outfile[256]; FILE *in, *out; int warn = 0; int retval = 0; @@ -175,24 +175,25 @@ int main(int ac, char **av) int pos; int maxerr = 50; /* Max errors before we bail out */ - if (ac >= 2 && strcmp(av[1], "-w") == 0) { + if (ac >= 3 && strcmp(av[2], "-w") == 0) { warn = 1; - av[1] = av[2]; + av[2] = av[3]; ac--; } - if (ac != 2) { - fprintf(stderr, "Usage: %s [-w] <lang-file>\n", av[0]); + if (ac != 3) { + fprintf(stderr, "Usage: %s [-w] <lang-file> <out-file>\n", av[0]); return 1; } filename = av[1]; - s = strrchr(filename, '.'); + /*s = strrchr(filename, '.'); if (!s) s = filename + strlen(filename); if (s-filename > (int)sizeof(langname)-3) s = filename + sizeof(langname)-1; strncpy(langname, filename, s-filename); langname[s-filename] = '\0'; - snprintf(outfile, sizeof(outfile), "%s", langname); + snprintf(outfile, sizeof(outfile), "%s", langname);*/ + outfile = av[2]; if (read_index_file() < 0) return 1; @@ -243,7 +244,7 @@ int main(int ac, char **av) if (maxerr == 0) fprintf(stderr, "%s:%d: Too many errors!\n", filename, linenum); - + } } |