This is in regard to referring to "leaked" M$-DOS v6 source code.

Richard Stallman wrote in the GNU Coding Standards:
<begin quote>
Don't in any circumstances refer to Unix source code for or during your work on GNU! (Or to any other proprietary programs.)


If you have a vague recollection of the internals of a Unix program, this does not absolutely mean you can't write an imitation of it, but do try to organize the imitation internally along different lines, because this is likely to make the details of the Unix version irrelevant and dissimilar to your results.

For example, Unix utilities were generally optimized to minimize memory use; if you go for speed instead, your program will be very different. You could keep the entire input file in core and scan it there instead of using stdio. Use a smarter algorithm discovered more recently than the Unix program. Eliminate use of temporary files. Do it in one pass instead of two (we did this in the assembler).

Or, on the contrary, emphasize simplicity instead of speed. For some applications, the speed of today's computers makes simpler algorithms adequate.

Or go for generality. For example, Unix programs often have static tables or fixed-size strings, which make for arbitrary limits; use dynamic allocation instead. Make sure your program handles NULs and other funny characters in the input files. Add a programming language for extensibility and write part of the program in that language.

Or turn some parts of the program into independently usable libraries. Or use a simple garbage collector instead of tracking precisely when to free memory, or use a new GNU facility such as obstacks.
<end quote>


Much of this can be used with regard to the M$-DOS programs we seek to imitate. For example, MS edlin had a limit of 253 characters on a line; FreeDOS edlin uses dynamically allocated strings, which smashes that arbitrary barrier. I only referred to the documentation for MS edlin when I wrote FreeDOS edlin and not its source code, however it was leaked, and it was probably in 8086 Assembler anyway. The only thing I didn't try replicating were the automatic backup files, but I added an option to specify the filename on write so that it is easy to write the filename to a different file if you really wanted to. I thought that this ability was a Good Thing, so I added it.

Gregory Pietsch



-------------------------------------------------------
SF.Net is sponsored by: Speed Start Your Linux Apps Now.
Build and deploy apps & Web services for Linux with
a free DVD software kit from IBM. Click Now!
http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click
_______________________________________________
Freedos-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to