Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!rutgers!cbmvax!daveh From: daveh@cbmvax.UUCP (Dave Haynie) Newsgroups: comp.sys.amiga Subject: Re: Putting devices in the filename space Message-ID: <2407@cbmvax.UUCP> Date: Mon, 28-Sep-87 17:11:55 EDT Article-I.D.: cbmvax.2407 Posted: Mon Sep 28 17:11:55 1987 Date-Received: Tue, 29-Sep-87 07:23:38 EDT References: <537@rover.UUCP> Organization: Commodore Technology, West Chester, PA Lines: 38 in article <537@rover.UUCP>, mph@rover.UUCP (Mark Huth) says: > Summary: Bug?? in copy command > > Has anyone else run into the following bug?(limitation) > The copy command only accepts pathnames upto some length (I think it is > 47 characters, but don't remeber offhand) > > Mark Huth I haven't seen that one yet, but there are certainly some other limitations in pathname length lurking in there somewhere. Many of these may be based on who's handling that name. For instance, if I were to take an ARP Copy command replacement, the arguments would have no inherent string length limitations, as these are C-style, NUL terminated strings. The current AmigaDOS command was written in BCPL, and as such you'd expect a string limitation of 255 somewhere, either as an argument limit or a command line length limit. BCPL strings consist of a BYTE length followed by the characters of that string. Obviously if you're going to allow the empty string, then BCPL strings can't ever get longer than 255 characters a piece. I'm not sure what kind of limitations this has on the rest of the system, perhaps not many (assuming most things are in C). There's no inherent limits on the filesystem pathname, even though BCPL strings are used. This is because, when you are at the Packet levels of DOS and you want to obtain a lock, you make a packet that has a lock on the parent directory and a BCPL string to the file/directory you're after. This implies a maximum file/directory name length of 255, but these are limited much more by other things. Since you never really have to have more that one BCPL file name in a string at a time, there should be no absolute limit on path names. If you bump up a level and use dos.library, I'm not sure what to expect. Most dos.library calls (e.g. Open(), Lock(), ChangeDir()) accept full path names, but at least from C these look like C strings. Since most programs in are written in Assembler or C, I'd expect the most common DOS path limits to take after the limits inherent in dos.library calls, if any. -- Dave Haynie Commodore-Amiga Usenet: {ihnp4|caip|rutgers}!cbmvax!daveh "The A2000 Guy" PLINK : D-DAVE H BIX : hazy "God, I wish I was sailing again" -Jimmy Buffett