Hi, Tom pointed out that SORT was limited to sorting at most 15k of data.
I fixed the problem by
- compiling as EXE (do not forget to delete sort.com when installing the exe!!)
- thereby making malloc and qsort use far pointers (there is no explicit far
  veraion of qsort, so I had to use a memory model with far pointers...)
- reducing language file read buffers and language file storage buffers to
  1k and 6k respectively
- adjusting stack size to 6k and max line count to 12k and max line length to
  8k respectively. That allows me to sort the first 10k lines of RBIL in a
  DOSEMU box where I have 626k free (-> I can sort almost 400k of data :-)).

You can still create a com version if you want one, use
make sort.com
for that purpose. This will allow you to sort up to 29k of data, up to 7000
lines of each up to 1023 chars size. SORT will also display the last line
number when it runs out of memory while reading data now.

Summary: SORT 1.4 can sort files and pipes of up to 400k size now, and it is
an EXE file now. You can still compile a COM version, but it will be limited
to file sizes of max 29k (SORT.COM 1.3: 15k). Maximum line length and line
count when sorting with the normal (EXE) version of SORT 1.4 will is 8191 and
12000, respectively.

http://www.coli.uni-sb.de/~eric/stuff/soft/ sort-09jul2004.zip

Thanks to Tom for 1. reporting the bug and 2. being quite unhelpful and
insulting when I asked for possible reasons and solutions. I finally found
out myself in several steps: use farmalloc, use compact-model qsort, malloc
list[] because it became too big (array of far pointers!) for being a stack var...

Eric


-------------------------------------------------------
This SF.Net email sponsored by Black Hat Briefings & Training.
Attend Black Hat Briefings & Training, Las Vegas July 24-29 - 
digital self defense, top technical experts, no vendor pitches, 
unmatched networking opportunities. Visit www.blackhat.com
_______________________________________________
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to