Solved - the problem was in totally different place, than I was
looking for it: misdeclaration of variable types in auxiliary function
"holeParameter". It should have been look like this:

void holeParameter(unsigned char *pzeilen, unsigned char *pspalten,
char *argv[]) {
  unsigned char sp_allowed[] = {40, 80, 94, 0};
  unsigned char ze_allowed[] = {25, 30, 34, 43, 50, 60, 0};
  unsigned char *arrptr;
  unsigned int tmp;

  /* Zeilen und Spalten aus der Kommandozeile holen */
  sscanf(argv[2], "%u", &tmp);
  arrptr = sp_allowed;
  while (*arrptr)
    if ((unsigned char)tmp == *arrptr) {
      *pspalten = *arrptr;
      break;
    } else
      ++arrptr;
  if (*pspalten == 0) {
    printf("Niedozwolona liczba kolumn - %s\n", argv[2]);
    exit(0);
  }

  sscanf(argv[1], "%u", &tmp);
  arrptr = ze_allowed;
  while (*arrptr)
    if ((unsigned char)tmp == *arrptr) {
      *pzeilen = *arrptr;
      break;
    } else
      ++arrptr;
  if (*pzeilen == 0) {
    printf("Niedozwolona liczba wierszy - %s\n", argv[1]);
    exit(0);
  }
}

One more thing, that I still don't like, when comparing to Pascal
version, is the executable size. TP5 produced small 4k executable,
while TC2.01 produced executable of 14k size. :/
-- 
Z.

------------------------------------------------------------------------------
Open source business process management suite built on Java and Eclipse
Turn processes into business applications with Bonita BPM Community Edition
Quickly connect people, data, and systems into organized workflows
Winner of BOSSIE, CODIE, OW2 and Gartner awards
http://p.sf.net/sfu/Bonitasoft
_______________________________________________
Freedos-user mailing list
Freedos-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/freedos-user

Reply via email to