Back to home page

DOS ain't dead

Forum index page

Log in | Register

Back to the forum
Board view  Mix view

C's system() & COMMAND.COM (Developers)

posted by alexfru(R), USA, 18.09.2014, 13:33

> > > The problem is there's no
> > > way you can know what that is. The only sane thing you can do is a
> > > "%COMSPEC% /C ..." and figure out some other way to return the
> > ErrorLevel
> > > if that's critical to you.
> >
> > That's the very problem I came with. I don't need it to be restated to
> me.
> > Can you be more specific? Otherwise, those are empty and meaningless
> words.
> If you are so focussed on the exitcode, I think simplest is having both.
> One focusses on errorlevel, and one that really always runs the shell.
> Depending on the codebases that you run, you select the variant that gets
> the system() identifier. Or make it an alias even depending on a define in
> the header. (like #ifdef unicode in windows headers)
> And document it very, very thoroughly.

I may (I probably should) document my implementation of system(), but other than that I don't think I care enough about the specific combination of these:
- an ancient 16-bit OS (all kinds of DOS and its clones)
- ancient non-standard extensions to the ancient OS (TSRs, shells replacing COMMAND.COM and the like, especially those additionally crippled license-wise (e.g. 4DOS and its ties to FreeDOS)) that I don't know, don't have, am not willing to acquire, test and support
- a compiler that is a little more than just a toy, but more not by a lot

Plain DOS, no weird stuff, that's the environment I can and am willing to handle.

I see no point making things more complex than truly necessary, given the expected frequency of use and usage scenarios themselves and that the whole exercise is meant to be for fun in the first place.

You may lament about certain limitations and incompatibilities and so may I, but realistically there aren't that many options:
- contributions by other people (so far there have been nearly zero contributions in almost 2 years of Smaller C's existence online)
- people pay me enough to make it my job and I pay attention to the paying hand instead of weighing the pros and the cons of doing this or that unpaid work in spare time and not doing something else or earning more money instead
- ???
Isn't it how it works with many hobby projects?


Complete thread:

Back to the forum
Board view  Mix view
15317 Postings in 1383 Threads, 254 registered users, 17 users online (0 registered, 17 guests)
DOS ain't dead | Admin contact
RSS Feed
powered by my little forum