Subversion Repositories SvarDOS

Rev

Rev 2090 | Rev 2094 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 2090 Rev 2092
Line 538... Line 538...
538
 
538
 
539
int main(int argc, char **argv) {
539
int main(int argc, char **argv) {
540
  FILE *fd;
540
  FILE *fd;
541
  int ecode = 0;
541
  int ecode = 0;
542
  int i, output_format = C_OUTPUT;
542
  int i, output_format = C_OUTPUT;
543
  int mvcomp_enabled = 0;
543
  int mvcomp_enabled = 1;
544
  unsigned short biggest_langsz = 0;
544
  unsigned short biggest_langsz = 0;
545
  struct svl_lang *lang = NULL, *reflang = NULL;
545
  struct svl_lang *lang = NULL, *reflang = NULL;
546
 
546
 
547
  if (argc < 2) {
547
  if (argc < 2) {
548
    puts("tlumacz ver " SVARLANGVER " - this tool is part of the SvarLANG project.");
548
    puts("tlumacz ver " SVARLANGVER " - this tool is part of the SvarLANG project.");
549
    puts("converts a set of CATS-style translations in files EN.TXT, PL.TXT, etc");
549
    puts("converts a set of CATS-style translations in files EN.TXT, PL.TXT, etc");
550
    puts("into a single resource file (OUT.LNG).");
550
    puts("into a single resource file (OUT.LNG).");
551
    puts("");
551
    puts("");
552
    puts("usage: tlumacz [/c | /asm | /nasm] [/comp] en fr pl ...");
552
    puts("usage: tlumacz [/c | /asm | /nasm] [/nocomp] en fr pl ...");
-
 
553
    puts("");
-
 
554
    puts("/c      - generates deflang.c (default)");
-
 
555
    puts("/asm    - deflang ASM output");
-
 
556
    puts("/nasm   - deflang NASM output");
-
 
557
    puts("/nocomp - disables compression of strings in the LNG file");
553
    return(1);
558
    return(1);
554
  }
559
  }
555
 
560
 
556
  fd = fopen("out.lng", "wb");
561
  fd = fopen("out.lng", "wb");
557
  if (fd == NULL) {
562
  if (fd == NULL) {
Line 571... Line 576...
571
      output_format = ASM_OUTPUT;
576
      output_format = ASM_OUTPUT;
572
      continue;
577
      continue;
573
    } else if(!strcmp(argv[i], "/nasm")) {
578
    } else if(!strcmp(argv[i], "/nasm")) {
574
      output_format = NASM_OUTPUT;
579
      output_format = NASM_OUTPUT;
575
      continue;
580
      continue;
576
    } else if(!strcmp(argv[i], "/comp")) {
581
    } else if(!strcmp(argv[i], "/nocomp")) {
577
      mvcomp_enabled = 1;
582
      mvcomp_enabled = 0;
578
      continue;
583
      continue;
579
    }
584
    }
580
 
585
 
581
    if (strlen(argv[i]) != 2) {
586
    if (strlen(argv[i]) != 2) {
582
      fprintf(stderr, "INVALID LANG SPECIFIED: %s\r\n", argv[i]);
587
      fprintf(stderr, "INVALID LANG SPECIFIED: %s\r\n", argv[i]);