Source:NetHack 5.0.0/include/fnamesiz.h
Jump to navigation
Jump to search
Below is the full text to fnamesiz.h from the source code of NetHack 5.0.0. To link to a particular line, write [[Source:NetHack 5.0.0/include/fnamesiz.h#line12]], for example.
The NetHack General Public License applies to screenshots, source code and other content from NetHack.
This content was modified from the original NetHack source code distribution (by splitting up NetHack content between wiki pages, and possibly further editing). See the page history for a list of who changed it, and on what dates.
1. /* NetHack 5.0 fnamesiz.h $NHDT-Date: 1580310580 2020/01/29 15:09:40 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.1 $ */ 2. /*-Copyright (c) Michael Allison, 2020. */ 3. /* NetHack may be freely redistributed. See license for details. */ 4. 5. #ifndef FNAMESIZ_H 6. #define FNAMESIZ_H 7. 8. /* 9. * Declarations for some file name sizes, some of which need to be shared 10. * between NetHack and recover. By placing them in here, there is less 11. * chance of deviation between the two. 12. */ 13. 14. #if !defined(MICRO) && !defined(VMS) && !defined(WIN32) 15. #define LOCKNAMESIZE (PL_NSIZ + 14) /* long enough for uid+name+.99 */ 16. #define LOCKNAMEINIT "1lock" 17. #define BONESINIT "bonesnn.xxx.le" 18. #define BONESSIZE sizeof(BONESINIT) 19. #else 20. #if defined(MICRO) 21. #define LOCKNAMESIZE FILENAME 22. #define LOCKNAMEINIT "" 23. #define BONESINIT "" 24. #define BONESSIZE FILENAME 25. #endif 26. #if defined(VMS) 27. #define LOCKNAMESIZE (PL_NSIZ + 17) /* long enough for _uid+name+.99;1 */ 28. #define LOCKNAMEINIT "1lock" 29. #define BONESINIT "bonesnn.xxx_le;1" 30. #define BONESSIZE sizeof(BONESINIT) 31. #endif 32. #if defined(WIN32) 33. #define LOCKNAMESIZE (PL_NSIZ + 25) /* long enough for username+-+name+.99 */ 34. #define LOCKNAMEINIT "" 35. #define BONESINIT "bonesnn.xxx.le" 36. #define BONESSIZE sizeof(BONESINIT) 37. #endif 38. #endif 39. 40. #define INDEXT ".xxxxxx" /* largest indicator suffix */ 41. #define INDSIZE sizeof(INDEXT) 42. 43. #if defined(UNIX) || defined(__BEOS__) 44. #define SAVEX "save/99999.e" 45. #ifndef SAVE_EXTENSION 46. #define SAVE_EXTENSION "" 47. #endif 48. #else /* UNIX || __BEOS__ */ 49. #ifdef VMS 50. #define SAVEX "[.save]nnnnn.e;1" 51. #ifndef SAVE_EXTENSION 52. #define SAVE_EXTENSION "" 53. #endif 54. #else /* VMS */ 55. #if defined(WIN32) || defined(MICRO) 56. #define SAVEX "" 57. #if !defined(SAVE_EXTENSION) 58. #ifdef MICRO 59. #define SAVE_EXTENSION ".svh" 60. #endif 61. #ifdef WIN32 62. #define SAVE_EXTENSION ".NetHack-saved-game" 63. #endif 64. #endif /* !SAVE_EXTENSION */ 65. #endif /* WIN32 || MICRO */ 66. #endif /* else !VMS */ 67. #endif /* else !(UNIX || __BEOS__) */ 68. 69. #ifndef SAVE_EXTENSION 70. #define SAVE_EXTENSION "" 71. #endif 72. 73. #ifndef MICRO 74. #define SAVESIZE (PL_NSIZ + sizeof(SAVEX) + sizeof(SAVE_EXTENSION) + INDSIZE) 75. #else 76. #define SAVESIZE FILENAME 77. #endif 78. 79. #endif /* FNAMESIZ_H */