files.h.html 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  1. <?xml version='1.0' encoding='iso-8859-1'?>
  2. <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  3. <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
  4. <head>
  5. <title>
  6. files.h
  7. </title>
  8. <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
  9. <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
  10. <meta name='author' content='cmaier@cmassoc.net'/>
  11. <meta name='robots' content='noindex,nofollow'/>
  12. <link href='toolkit.css' rel='stylesheet' type='text/css'/>
  13. </head>
  14. <body>
  15. <div class='headerlink'>
  16. [<a href='ethernet.h.html' title=' ethernet.h '>PREV</a>]
  17. [<a href='toolkit.html' title=' Index '>HOME</a>]
  18. [<a href='flags.h.html' title=' flags.h '>NEXT</a>]
  19. </div>
  20. <pre>
  21. /*====================================================================*
  22. *
  23. * files.h - custom filesystem definitions and declarations;
  24. *
  25. * this file is a subset of the original that includes only those
  26. * definitions and declaration needed for toolkit programs;
  27. *
  28. * Motley Tools by Charles Maier &lt;cmaier@cmassoc.net&gt;;
  29. * Copyright 2001-2006 by Charles Maier Associates;
  30. * Licensed under the Internet Software Consortium License;
  31. *
  32. *--------------------------------------------------------------------*/
  33. #ifndef FILES_HEADER
  34. #define FILES_HEADER
  35. /*====================================================================*
  36. * system header files;
  37. *--------------------------------------------------------------------*/
  38. #include &lt;stdio.h&gt;
  39. #include &lt;fcntl.h&gt;
  40. #include &lt;sys/stat.h&gt;
  41. /*====================================================================*
  42. * system header files;
  43. *--------------------------------------------------------------------*/
  44. #include &quot;../tools/types.h&quot;
  45. /*====================================================================*
  46. * path and file extenders;
  47. *--------------------------------------------------------------------*/
  48. #ifdef WIN32
  49. #define PATH_C_EXTENDER '\\'
  50. #define FILE_C_EXTENDER '.'
  51. #else
  52. #define PATH_C_EXTENDER '/'
  53. #define FILE_C_EXTENDER '.'
  54. #endif
  55. /*====================================================================*
  56. *
  57. *--------------------------------------------------------------------*/
  58. #define FILE_CANTSTAT &quot;%s can't stat %s&quot;, __func__
  59. #define FILE_CANTOPEN &quot;%s can't open %s&quot;, __func__
  60. #define FILE_CANTHOME &quot;%s can't home %s&quot;, __func__
  61. #define FILE_CANTSIZE &quot;%s can't size %s&quot;, __func__
  62. #define FILE_CANTSEEK &quot;%s can't seek %s&quot;, __func__
  63. #define FILE_CANTREAD &quot;%s can't read %s&quot;, __func__
  64. #define FILE_CANTLOAD &quot;%s can't load %s&quot;, __func__
  65. #define FILE_CANTEDIT &quot;%s can't edit %s&quot;, __func__
  66. #define FILE_CANTSAVE &quot;%s can't save %s&quot;, __func__
  67. #define FILE_CANTSPAN &quot;%s won't span %s&quot;, __func__
  68. #define FILE_WONTREAD &quot;%s won't read %s&quot;, __func__
  69. /*====================================================================*
  70. * file create and access modes;
  71. *--------------------------------------------------------------------*/
  72. #ifdef WIN32
  73. #define FILE_FILEMODE S_IREAD|S_IWRITE
  74. #else
  75. #define FILE_FILEMODE S_IRUSR|S_IWUSR|S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH
  76. #define O_BINARY 0
  77. #endif
  78. /*====================================================================*
  79. * functions;
  80. *--------------------------------------------------------------------*/
  81. FILE *efopen (char const *filename, char const *openmode);
  82. FILE *efreopen (char const *filename, char const *openmode, FILE *fp);
  83. bool checkfilename (char const * string);
  84. char const * filepart (char const * string);
  85. /*====================================================================*
  86. *
  87. *--------------------------------------------------------------------*/
  88. #endif
  89. </pre>
  90. <div class='footerlink'>
  91. [<a href='ethernet.h.html' title=' ethernet.h '>PREV</a>]
  92. [<a href='toolkit.html' title=' Index '>HOME</a>]
  93. [<a href='flags.h.html' title=' flags.h '>NEXT</a>]
  94. </div>
  95. </body>
  96. </html>