/*dir.h
Defines structures, macros, and functions for dealing with
directories and pathnames.
Copyright (c) Borland International 1987,1988
All Rights Reserved.
*/
#if __STDC__
#define _Cdecl
#else
#define _Cdeclcdecl
#endif
#if !defined(__DIR_DEF_)
#define __DIR_DEF_
structffblk{
charff_reserved[21]
charff_attrib
unsignedff_ftime
unsignedff_fdate
longff_fsize
charff_name[13]
}
#define WILDCARDS 0x01
#define EXTENSION 0x02
#define FILENAME 0x04
#define DIRECTORY 0x08
#define DRIVE 0x10
#define MAXPATH 80
#define MAXDRIVE 3
#define MAXDIR 66
#define MAXFILE 9
#define MAXEXT 5
int _Cdecl chdir(const char *path)
int _Cdecl findfirst(const char *path, struct ffblk *ffblk,
int attrib)
int _Cdecl findnext(struct ffblk *ffblk)
void _Cdecl fnmerge(char *path,const char *drive,const char *dir,
const char *name, const char *ext)
int _Cdecl fnsplit(const char *path, char *drive, char *dir,
char *name, char *ext)
int _Cdecl getcurdir(int drive, char *directory)
char*_Cdecl getcwd(char *buf, int buflen)
int _Cdecl getdisk(void)
int _Cdecl mkdir(const char *path)
char*_Cdecl mktemp(char *template)
int _Cdecl rmdir(const char *path)
char*_Cdecl searchpath(const char *file)
int _Cdecl setdisk(int drive)
#endif
BC3.1
/* dir.h
Defines structures, macros, and functions for dealing with
directories and pathnames.
Copyright (c) 1987, 1992 by Borland International
All Rights Reserved.
*/
#if !defined(__DIR_H)
#define __DIR_H
#if !defined(___DEFS_H)
#include <_defs.h>
#endif
#ifndef _FFBLK_DEF
#define _FFBLK_DEF
struct ffblk {
charff_reserved[21]
charff_attrib
unsignedff_ftime
unsignedff_fdate
longff_fsize
charff_name[13]
}
#endif
#define WILDCARDS 0x01
#define EXTENSION 0x02
#define FILENAME 0x04
#define DIRECTORY 0x08
#define DRIVE 0x10
#define MAXPATH 80
#define MAXDRIVE 3
#define MAXDIR66
#define MAXFILE 9
#define MAXEXT5
#ifdef __cplusplus
extern "C" {
#endif
int _CType chdir( const char _FAR *__path )
int _CType _FARFUNC findfirst( const char _FAR *__path,
struct ffblk _FAR *__ffblk,
int __attrib )
int _CType _FARFUNC findnext( struct ffblk _FAR *__ffblk )
void_CType _FARFUNC fnmerge( char _FAR *__path,
const char _FAR *__drive,
const char _FAR *__dir,
const char _FAR *__name,
const char _FAR *__ext )
int _CType _FARFUNC _fnsplit(const char _FAR *__path,
char _FAR *__drive,
char _FAR *__dir,
char _FAR *__name,
char _FAR *__ext )
int _CType _FARFUNC fnsplit( const char _FAR *__path,
char _FAR *__drive,
char _FAR *__dir,
char _FAR *__name,
char _FAR *__ext )
int _Cdecl getcurdir( int __drive, char _FAR *__directory )
char _FAR * _Cdecl _FARFUNC getcwd( char _FAR *__buf, int __buflen )
int _Cdecl getdisk( void )
int _Cdecl mkdir( const char _FAR *__path )
char _FAR * _Cdecl _FARFUNC mktemp( char _FAR *__template )
int _Cdecl rmdir( const char _FAR *__path )
char _FAR * _CType _FARFUNC searchpath( const char _FAR *__file )
int _Cdecl setdisk( int __drive )
#ifdef __cplusplus
}
#endif
#endif /* __DIR_H */
#include<弊让stdio.h>int main()
{
char file[16]
char func[16]
sprintf(file,__FILE__)//文件名
sprintf(func,__FUNCTION__)//函数名枝卜槐猛友
printf("file=%s\n",file)
printf("func=%s\n",func)
return 0
}
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)