home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cbmvax!cbmehq!cbmger!peterk
- From: peterk@cbmger.de.so.commodore.com (Dr Peter Kittel Germany)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Printing the device list -- what am I doing wrong?
- Message-ID: <9455@cbmger.de.so.commodore.com>
- Date: 29 Jul 92 15:08:44 GMT
- References: <51071@dime.cs.umass.edu>
- Reply-To: peterk@cbmger.de.so.commodore.com (Dr Peter Kittel Germany)
- Organization: Commodore Germany
- Lines: 27
-
- In article <51071@dime.cs.umass.edu> barrett@gleep.cs.umass.edu (Daniel Barrett) writes:
- >
- > I'm trying to print the list of volumes under 2.04. The following
- >program gives me a recoverable alert 01000008. What am I doing wrong?
-
- Try to handle the strings as BSTR! Take the first byte as length and then
- only copy so many bytes to output. You can't rely on null terminated
- strings here, as you do implicitly when using standard C routines.
-
- > The device names DO get printed, but they appear with extra
- >spaces in front of them, or backspace characters. Weird.
-
- I guess these are the length bytes :-)
-
- > name = BADDR(dlist->dol_Name);
- >
- > if (name)
- > {
- > FPuts(Output(), name);
-
- This is the bug. First fetch the first byte as length and then fetch these
- n bytes.
-
- --
- Best regards, Dr. Peter Kittel // E-Mail to \\ Only my personal opinions...
- Commodore Frankfurt, Germany \X/ {uunet|pyramid|rutgers}!cbmvax!cbmger!peterk
- or peterk@public.sub.org
-