[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help! Filetype $00 problems . . .



On Thu, 29 Apr 1999 03:18:34 GMT, Randy Shackelford
<shack@onyx.southwind.net> wrote:

>Right, it uses four bits for the length and the other four for the storage
>type. Still for all intents and purposes it's a Pascal string.

Well, you still need to be careful.  If you think about it as a Pascal
string then you might put the wrong value in that location sometime.
For example, if you were to be playing with the PRODOS file and you
changed the byte preceding the filename to $06 (length of filename is
6 characters) you'd end up telling ProDOS that you have deleted the
file (storage type of 0) but those blocks would still be marked as
used in the volume bit map.

But you are right in that it is very close to a Pascal string.

>Since there is no distinction in file names on extended files, it has to
>do some check on the storage type. If it blindly renamed files, you could
>rename extended files just like any other file. I wonder, if you took a 
>really old version of ProDOS which predates extended files and tried a 
>rename, whether it would work. They could have designed it that way from
>the get go but maybe not.

I just booted a ProDOS Users Disk with ProDOS v1.0.1 on it and
BASIC.SYSTEM gives me an I/O ERROR and the Filer program gives me an
ERROR CODE = 4A if I try to rename or delete an extended file.  It
appears the code to disallow renaming and deleting of extended files
has been around since day one.

>What you mean to say is that most apps i.e. SYS programs don't make a
>distinction. Recall that ProDOS has no "catalog" built in as does DOS.
>SYS programs are left to their own devices there. True, no common SYS
>programs like BASIC or Appleworks display extended files differently, but
>there's nothing to stop it. The version of ECP8 which I modified after
>the source became public has a rewritten catalog routine that displays
>a plus sign next to the file type on extended files. This is similar to
>the ORCA shell for the IIgs.

True, I should have made the distinction that standard program
including BASIC.SYSTEM don't have any special way of noting an
extended file when listing files in a directory.

However, most users only have access to the standard stuff which
doesn't show extended files in any special way so making the
distinction could be confusing to some readers.  You are right that
they can be updated to show it, though.  I wouldn't mind seeing this
at some point myself for the times I am in ProDOS 8.

>I wrote ECP8 shell programs to do plenty of stuff like that. One useful such
>program was one which reads the data fork of an extended file and writes
>the data to a standard file. I was working on a program to delete extended
>files but never got the kinks out of it. Man I haven't touched any of that
>stuff in many moons.

Cool.  Did any of your ECP8 stuff ever get released or is it like a
lot of my code? (hacked together so that it works but it isn't pretty
:-)

+------------------------------------------------------------------------+
| Jeff Blakeney - Dean of the Apple II University in A2Pro on Delphi     |
|                    Delphi Apple II Forums Web Pages                    |
| A2: http://www.delphi.com/apple2   A2Pro: http://www.delphi.com/a2pro  |
+------------------------------------------------------------------------+
   HyperCard IIgs course now in session in the A2Pro forum on Delphi
        Learn to Program in GSoft BASIC course now in session