Source:Hack 1.0/config.h
(Redirected from Hack 1.0/config.h)
Jump to navigation
Jump to search
Below is the full text to config.h from the source code of Hack 1.0. To link to a particular line, write [[Hack 1.0/config.h#line123]], for example.
Warning! This is the source code from an old release. For the latest release, see Source code
Screenshots and source code from Hack are used under the CWI license.
1. /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */ 2. 3. #ifndef CONFIG /* make sure the compiler doesnt see the typedefs twice */ 4. 5. #define CONFIG 6. #define VAX /* to get proper struct initialization */ 7. #define BSD /* delete this line on System V */ 8. /* #define STUPID */ /* avoid some complicated expressions if 9. your C compiler chokes on them */ 10. 11. #define WIZARD "play" /* the person allowed to use the -w option */ 12. #define NEWS "news" /* the file containing the latest hack news */ 13. #define FMASK 0660 /* file creation mask */ 14. 15. #define OPTIONS /* do not delete the 'o' command */ 16. #define SHELL /* do not delete the '!' command */ 17. #define TRACK /* do not delete the tracking properties of monsters */ 18. 19. /* size of terminal screen is (ROWNO+2) by COLNO */ 20. #define COLNO 80 21. #define ROWNO 22 22. 23. /* 24. * small signed integers (8 bits suffice) 25. * typedef char schar; 26. * will do when you have signed characters; otherwise use 27. * typedef short int schar; 28. */ 29. typedef char schar; 30. 31. /* 32. * small unsigned integers (8 bits suffice - but 7 bits do not) 33. * - these are usually object types; be careful with inequalities! - 34. * typedef unsigned char uchar; 35. * will be satisfactory if you have an "unsigned char" type; otherwise use 36. * typedef unsigned short int uchar; 37. */ 38. typedef unsigned char uchar; 39. 40. /* 41. * small integers in the range 0 - 127, usually coordinates 42. * although they are nonnegative they must not be declared unsigned 43. * since otherwise comparisons with signed quantities are done incorrectly 44. * (thus, in fact, you could make xchar equal to schar) 45. */ 46. typedef char xchar; 47. typedef xchar boolean; /* 0 or 1 */ 48. #define TRUE 1 49. #define FALSE 0 50. 51. /* 52. * Declaration of bitfields in various structs; if your C compiler 53. * doesnt handle bitfields well, e.g., if it is unable to initialize 54. * structs containing bitfields, then you might use 55. * #define Bitfield(x,n) xchar x 56. * since the bitfields used never have more than 7 bits. (Most have 1 bit.) 57. */ 58. #define Bitfield(x,n) unsigned x:n 59. 60. #endif CONFIG