Subversion Repositories SvarDOS

Rev

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

Rev 2086 Rev 2089
Line 406... Line 406...
406
  const char *stringsptr = l->strings;
406
  const char *stringsptr = l->strings;
407
 
407
 
408
  /* if compressed then do the magic */
408
  /* if compressed then do the magic */
409
  if (compflag) {
409
  if (compflag) {
410
    static char compstrings[65000];
410
    static char compstrings[65000];
-
 
411
    unsigned short comp_bytes;
-
 
412
    comp_bytes = mvcomp(compstrings, l->strings, strings_bytes);
-
 
413
    if (comp_bytes < strings_bytes) {
-
 
414
      printf("lang %c%c mvcomp-ressed (%u bytes -> %u bytes)\n", l->id[0], l->id[1], strings_bytes, comp_bytes);
411
    langid |= 0x8000; /* LNG langblock flag that means "this lang is compressed" */
415
      langid |= 0x8000; /* LNG langblock flag that means "this lang is compressed" */
412
    strings_bytes = mvcomp(compstrings, l->strings, strings_bytes);
416
      strings_bytes = comp_bytes;
413
    stringsptr = compstrings;
417
      stringsptr = compstrings;
-
 
418
    } else {
-
 
419
      printf("lang %c%c left UNCOMPRESSED (uncomp=%u bytes ; mvcomp=%u bytes)\n", l->id[0], l->id[1], strings_bytes, comp_bytes);
-
 
420
    }
414
  }
421
  }
415
 
422
 
416
  return((fwrite(&langid, 1, 2, fd) == 2) &&
423
  return((fwrite(&langid, 1, 2, fd) == 2) &&
417
         (fwrite(&strings_bytes, 1, 2, fd) == 2) &&
424
         (fwrite(&strings_bytes, 1, 2, fd) == 2) &&
418
         (fwrite(l->dict, 1, svl_dict_bytes(l), fd) == svl_dict_bytes(l)) &&
425
         (fwrite(l->dict, 1, svl_dict_bytes(l), fd) == svl_dict_bytes(l)) &&