Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!swrinde!elroy.jpl.nasa.gov!ncar!gatech!mailer.cc.fsu.edu!uflorida!SORROW@MAPLE.CIRCA.UFL.EDU From: sorrow@oak.circa.ufl.edu Newsgroups: comp.os.msdos.programmer Subject: Re: Building a better DOS revisisted (getting close to UNIX) Message-ID: <0094A992.0B71BDE0@MAPLE.CIRCA.UFL.EDU> Date: 24 Jun 91 13:55:27 GMT References: <0094A761.C2F6D640@MAPLE.CIRCA.UFL.EDU>, Sender: news@uflorida.cis.ufl.EDU Reply-To: sorrow@oak.circa.ufl.edu Organization: University of Florida CIRCA VAX Cluster Lines: 39 In article , pshuang@athena.mit.edu (Ping-Shun Huang) writes: |>In article <0094A761.C2F6D640@MAPLE.CIRCA.UFL.EDU> sorrow@oak.circa.ufl.edu writes: |> |> > Finally, I need more help (yes, MORE help) on how to make my prompt use |> > forward slashes. Someone told me to intercept the DOS INT that returns |> > the correct working directory....is this safe? |> |>This would probably be a bad thing to do. Not dangerous per se, but it |>would almost certainly break a lot of programs. If you were to |>intercept the DOS service which returns the current working directory (I |>don't know which one it is off the top of my head) and return a modified |>string instead, your program may work the way you want. COMMAND.COM |>interpretation of the metacharacter "$P" in the PATH variable may work |>as you would want it. CD's default response when you don't give it a Disabled CD and wrote my own (support HOME environment variable to take you back to ~). |>any parameters would be consistent. However, any code which calls the |>DOS service not just to print to the screen, but to actually make use of |>the path returned thereafter (e.g. programs which switch the default |>directory while in operation, but are polite enough to save the |>directory you were in when you started it up) will break, because when |>they pass the path with forward slashes back to DOS, DOS will puke. Switchar should solve this. |>applications which do not go through DOS. Also, many programs may try |>to interpret any filenames you provide on the command line as a switch. I use switchar to get by the switch vs. directory path dilemma. /* Brian Hook -- Specialist in X to ANSI.SYS porting software ----------------------------------------------------------------- "Seamus, that's my dog...I saw her today at the reception...sorry, sixTEEN inches....better save the women and children first...but this one goes to 11! ..anymore of that plutonium nyborg?....there can be only ONE!....like a finger pointing to the moon....ease the seat back...one day closer to death */