資源描述:
《Header頭文件的原型C語言.doc》由會員上傳分享,免費在線閱讀,更多相關內(nèi)容在工程資料-天天文庫。
1、/*alloc.hmemorymanagementfunctionsandvariables.*/#if__STDC__#define_Cdecl#else#define_Cdeclcdecl#endif#ifndef_STDDEF#define_STDDEF#ifndef_PTRDIFF_T#define_PTRDIFF_T#ifdefined(__LARGE__)
2、
3、defined(__HUGE__)
4、
5、defined(__COMPACT__)typedeflongptrdiff_t;#elsetypedefintptrdiff_t;#endif#endif#ifndef_SIZE_
6、T#define_SIZE_Ttypedefunsignedsize_t;#endif#endif#ifndefNULL#ifdefined(__TINY__)
7、
8、defined(__SMALL__)
9、
10、defined(__MEDIUM__)#defineNULL0#else#defineNULL0L#endif#endifint_Cdeclbrk(void*addr);void*_Cdeclcalloc(size_tnitems,size_tsize);#ifdefined(__COMPACT__)
11、
12、defined(__LARGE__)
13、
14、defined(__HUGE__)unsig
15、nedlong_Cdeclcoreleft(void);#elseunsigned_Cdeclcoreleft(void);#endifvoid_Cdeclfree(void*block);void*_Cdeclmalloc(size_tsize);void*_Cdeclrealloc(void*block,size_tsize);void*_Cdeclsbrk(intincr);#if!__STDC__voidfar*_Cdeclfarcalloc(unsignedlongnunits,unsignedlongunitsz);unsignedlong_Cdeclfarcoreleft(
16、void);void_Cdeclfarfree(voidfar*block);voidfar*_Cdeclfarmalloc(unsignedlongnbytes);voidfar*_Cdeclfarrealloc(voidfar*oldblock,unsignedlongnbytes);#endif/*assert.hassertmacro*/#include/*fprintf()prototype&'stderr'definition*/#include/*abort()prototype*/#if!defined(NDEBUG)#define
17、assert(p)if(!(p)){fprintf(stderr,"Assertionfailed:%s,file%s,line%d",#p,__FILE__,__LINE__);abort();}#else#defineassert(p)#endif/*bios.hAccesstobiosservices.*/#if__STDC__#define_Cdecl#else#define_Cdeclcdecl#endifint_Cdeclbioscom(intcmd,charabyte,intport);int_Cdeclbiosdisk(intcmd,intdrive,inthe
18、ad,inttrack,intsector,intnsects,void*buffer);int_Cdeclbiosequip(void);int_Cdeclbioskey(intcmd);int_Cdeclbiosmemory(void);int_Cdeclbiosprint(intcmd,intabyte,intport);long_Cdeclbiostime(intcmd,longnewtime);/*conio.hDirectMSDOSconsoleinput/output.*/#if!defined(__VIDEO)#define__VIDEO#if__STDC__#defi
19、ne_Cdecl#else#define_Cdeclcdecl#endif#ifndef__OLDCONIO__structtext_info{unsignedcharwinleft;unsignedcharwintop;unsignedcharwinright;unsignedcharwinbottom;unsignedcharattribute;unsignedcharnormattr;unsignedcharcurrmode;