www.delorie.com/djgpp/doc/libc/libc_497.html   search  
libc.a reference

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

_is_DOS83

Syntax

 
#include <fcntl.h>

int _is_DOS83 (const char *fname);

Description

This function checks the filename pointed to by fname to determine if it is a standard short (8+3) form file name. The filename should only include the name part of the file. It is expected the filename will contain a valid long or short file name (no validation is done to exclude path characters or characters always illegal in any file name). Note: If the filename contains lower case characters the name is considered to be a long name and not a standard short name (and the function will return 0).

The function will return 0 (failure) if there are more than 8 characters before a period, more than 3 characters after a period, more than one period, starts with a period, any lower case characters, or any of the special characters `+' `,' `;' `=' `[' `]', or a space. The special names `.' and `..' are exceptions and will return success.

This function could be called to determine if a filename is valid on DOS before long file name support. If this function returns 1 the filename probably does not have a long name entry on a FAT file system. The library internally calls this function to determine if a file should have its name lower cased when see section _preserve_fncase is false.

Return value

The function returns an integer 0 (not DOS 8.3) or 1 (DOS 8.3)

Portability

ANSI/ISO C No
POSIX No


  webmaster   donations   bookstore     delorie software   privacy  
  Copyright 2004   by DJ Delorie     Updated Apr 2004