comp.lang.ada
 help / color / mirror / Atom feed
From: jerry@jvdsys.stuyts.nl
Subject: Re: DOS/Win95 file names
Date: 1999/06/12
Date: 1999-06-12T00:00:00+00:00	[thread overview]
Message-ID: <FD6wMo.AM@stuyts.nl> (raw)
In-Reply-To: 375fd4b4.608956077@news.dsuper.net

fluffy_pop@dsuper.net wrote:

: I'm being asked to validate the name format so that it satisfies the
: (8.3) DOS requirements (actually it's a hybrid because I'm accepting
: characters illegal under DOS but legal under Windows).  It's a Ada
: console program and I'm working on a Win95 machine.

I do not quite follow this:

a) the filename has to be consistent with DOS requirements, in which case
you should not accept filenames that are illegal under DOS, or

b) you will be accepting Win32 filenames, but than there is not much sense
in restricting the name to 8.3. 

: As it is (my program), when the user enters a file name that contains
: an accented character, my handling of the Name_Error Exception occurs
: to produce a message that the file is not in the repertory.

If I understand this correctly, you are saying that if a filename contains
a character, with an ASCII code > 127, you get a Name_Error exception when
you try to create/open it ?

I presume you are not using UniCode or Wide_Character ?

: Also, when the file name contains a '?', my program
: crashes (when what follows is a Create(F,Out_File,"name") ).

Mmmm, would need to look this up, but in DOS terms, a '?' is a wildcard
character, and would cause problems when trying to create a file (or not
give you the file you expected when opening one).

If you follow DOS rules, you should not allow a '?' in a filename. I'm not
sure if it is allowed under Win32 rules.

: characters of the real file names, since I'm working under Windows
: when I write my program code and the files are created also under
: Windows or DOS.

If you want your files to work with both DOS and Windows, you have no
option but to stick to the DOS filename format, and not allow any
Win32 extensions.

-- 
-- Jerry van Dijk | Leiden, Holland
-- Team Ada       | jdijk@acm.org
-- see http://stad.dsl.nl/~jvandyk




  parent reply	other threads:[~1999-06-12  0:00 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-06-10  0:00 DOS/Win95 file names fluffy_pop
1999-06-11  0:00 ` Gautier
1999-06-11  0:00   ` Pascal Obry
1999-06-11  0:00   ` fluffy_pop
1999-06-11  0:00     ` dennison
1999-06-11  0:00       ` fluffy_pop
1999-06-12  0:00         ` Robert Dewar
1999-06-11  0:00       ` Robert Dewar
1999-06-12  0:00 ` jerry [this message]
1999-06-12  0:00   ` fluffy_pop
1999-06-13  0:00     ` jerry
1999-06-13  0:00       ` fluffy_puff
1999-06-13  0:00         ` Matthew Heaney
1999-06-14  0:00           ` fluffy_puff
1999-06-14  0:00           ` fluffy_puff
1999-06-13  0:00     ` fluffy_puff
1999-06-12  0:00   ` Mario Klebsch
1999-06-12  0:00     ` fluffy_pop
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox