Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

357 lines
15 KiB

  1. /***************************************************************************
  2. Name : DEFS.H
  3. Comment :
  4. Copyright (c) Microsoft Corp. 1991, 1992, 1993
  5. Revision Log
  6. Date Name Description
  7. -------- ----- ---------------------------------------------------------
  8. ***************************************************************************/
  9. #pragma warning(disable:4001) /** nonstd extensions **/
  10. #pragma warning(error:4002) // too many actual params for macro
  11. #pragma warning(error:4003) // too few actual params for macro
  12. #pragma warning(error:4005) // macro redefined
  13. #pragma warning(error:4020) // too many actual params for function
  14. #pragma warning(error:4021) // too few actual params for function
  15. #pragma warning(disable:4050) // different code attributes on fn ptr
  16. #pragma warning(disable:4057) // indirection to slightly different types
  17. #pragma warning(disable:4101) // unreferenced local variable
  18. //// ignoring this warning resulted in bug when 'case' keyword was omitted!!//
  19. // #pragma warning(disable:4102) // unreferenced label
  20. #pragma warning(disable:4135) // conv between integral types
  21. #pragma warning(disable:4200) // nonstd ext: zero sized array in struct
  22. #pragma warning(disable:4201) // nonstd ext: nameless struct/union
  23. #pragma warning(disable:4206) // nonstd ext: trans unit is empty (whole file ifdefd out)
  24. #pragma warning(disable:4209) // nonstd ext: benign typedef redefinition
  25. #pragma warning(disable:4214) // nonstd ext: non-int bitfield
  26. #pragma warning(disable:4704) // inline asm precludes global optimization
  27. #pragma warning(disable:4705) // statement has no effect
  28. #pragma warning(disable:4706) // Assignment within conditional expression
  29. #pragma warning(disable:4791) // Loss of debugging info
  30. #define UECM // REQD!! DON'T DELETE EVER!! (This is incorrect-->use ECM for NON-EFAX G3 machines. (Ortho))
  31. // This directly controls the ECM bit in the DIS
  32. #define SMM // Static mem (for temp) (Reqd for WFW. Currently reqd for all)
  33. // uses 2k in fcom\filter.c 350 in class1\framing.c 500 in t30\t30.c--use it always
  34. #define PDUMP // Protocol dump. Uses 500bytes extra. Ortho to all else
  35. #if defined(WFW) || defined(WFWBG)
  36. # pragma message ("Compiling for WFW")
  37. #ifdef DEBUG
  38. # define MON // monitor bytes (Ortho)
  39. #endif //DEBUG
  40. # define FASTLOG // recv file list/log is FASTER (REQD--old one doesn't work)
  41. # define VS // Vertical Scaling in Send. (Ortho)
  42. # define NOPRE // no pre-emption. Reqd for WFW. Useless for IF (Ortho)
  43. # define DYNL // Dynamic loading of DLLs. (WFW and !MDRV)
  44. # define VC // uses VCOMM Comm driver thru DLLSCHED (WFW)
  45. # define LPZ // CBSZ ptrs are far ptrs. Reqd for split driver/WFW
  46. # define CAS // CAS support (Ortho)
  47. # define CL2 // Class2 support (Ortho)
  48. # define CL2_0 // Class2.0 support (Ortho)
  49. # define PCR // Page Critical. Reqd for safe recv. (!MDDI)
  50. # define CHK // check recvd data using old or new FAXCODEC (req !REC)
  51. # define FILET30 // all file io & filet30 api
  52. # define FAXWATCH // write out a FAXWATCH.LOG
  53. # define STATUS // send out STATUS messages
  54. # define INIFILE // read INI file settings
  55. # define PCMODEMS // AT-cmd, serial modems
  56. # define NEGOT // do negotiation
  57. # define DOSIO // use DOSIO calls thru DLLSCHED
  58. # define DISCARDFIX // Declare discardable & fix in LibMain
  59. //# define SEC // recode send data to MR/MMR with new FAXCODEC. Doesn't work yet
  60. //# define REC // recode recv data with new FAXCODEC (!CHK and RECODE_TO). Doesn't work yet
  61. //# define RECODE_TO MH_DATA // for old Pumps
  62. //# define RECODE_TO MMR_DATA // for compactness
  63. #endif //WFW || WFWBG
  64. #if defined(IFAX) && !defined(WINPAD)
  65. # pragma message ("Compiling for IFAX")
  66. #ifdef DEBUG
  67. //# define MON // monitor bytes (Ortho) // can't use it without KFIL or DOSIO
  68. #endif //DEBUG
  69. // # define IFP
  70. // Receive spool options to control anti-RNR
  71. #define RXSPOOLFIFO // initiate receive spool FIFO if printer cannot keep up
  72. #define END_PSIFAX_WHENFLUSHING // early cleanup of PSIFAX when receive is
  73. // complete and FIFO is being flushed
  74. # define CHKDATA // check recvd data in MSGSVR
  75. # define RECOVER // save recvd data in MSGSVR for later recovery
  76. # define RECOVER2 // continue recving after jobproc has croaked
  77. # define LPZ // CBSZ ptrs are far ptrs. Reqd for split driver/WFW
  78. # define OEMNSF // support fro OEMNSF DLLs
  79. # define RICOHAI // support fro Ricoh AI protocol (requires OEMNSF also)
  80. # define PSI // PSI version--reqd to compile anything in PSIFAX dir
  81. # define TSK // BGT30 is a Process. No DLLSCHED. REQD for some vague stuff in FCOM
  82. # define IFK // Use IFKERNEL services (Alloc/Free etc)
  83. # define BOSS // Make WEP FIXED etc...
  84. //#define COMMCRIT // put CritSection() around access to COMM.DRV
  85. //#define CL2 // Use CL2 or 2.0 driver, not T30+ET30PROT+Class1/OEM driver
  86. //# define PCR // PageCrit. Reqd for safe recv with Class1. (need !MDDI). BREAKS! with OEM modem drivers
  87. // The Cactus is a MDDI based on our Class1 driver. So we need PCR!
  88. #if defined(CACTUS)
  89. # define PCR
  90. # pragma message("Enabling PCR for CACTUS")
  91. #endif // CACTUS
  92. # define MDDI // exact ModemDDI (rev 0.90) (need MDRV && !DYNL). REQD if using OEM driver. REQD to diable if using Class1 driver.
  93. # define MDRV // monolith drv. REQD for OEM driver (need !WFW & !DYNL). Incompatible with CL2. Optional for Class1.
  94. # define STATUS // support for sending STATUS msgs. Optional.
  95. # define NVLOG // log errors to NVRAM
  96. // these two must be OFF for IFAX, ON for Winpad
  97. // (if left on in IFAX UI & Transport use different option struct sizes)
  98. //# define INIFILE // read INI file settings. Optional. (advisable for Cl1 & Cl2)
  99. //# define PCMODEMS// read AT cmd INI file settings. Reqd for Class1 & CL2. (i.e. if not OEM driver or !MDDI) (need INIFILE also).
  100. #endif //IFAX && !WINPAD
  101. #if defined(WINPAD)
  102. # pragma message ("Compiling for WINPAD")
  103. #ifdef DEBUG
  104. # define MON // monitor bytes (Ortho) // can't use it without KFIL or DOSIO
  105. #endif //DEBUG
  106. # define TSK // BGT30 is a Process. No DLLSCHED. REQD for some vague stuff in FCOM
  107. //# define MDDI // exact ModemDDI (rev 0.90) (need MDRV && !DYNL). REQD if using OEM driver. REQD to diable if using Class1 driver.
  108. //# define MDRV // monolith drv. REQD for OEM driver (need !WFW & !DYNL). Incompatible with CL2. Optional for Class1.
  109. # define LPZ // CBSZ ptrs are far ptrs. Reqd for split driver/WFW
  110. # define CL2 // Class2 support (Ortho)
  111. //# define CL2_0 // Class2.0 support (Ortho)
  112. # define PCR // Page Critical. Reqd for safe recv. (!MDDI)
  113. //# define STATUS // send out STATUS messages
  114. # define INIFILE // read INI file settings
  115. # define PCMODEMS // AT-cmd, serial modems
  116. # define PSI // PSI version--reqd to compile anything in PSIFAX dir
  117. # define IFK // Use IFKERNEL services (Alloc/Free etc)
  118. # define KFIL // use kernel file APIs
  119. # define COMMCRIT // put CritSection() around access to COMM.DRV
  120. #endif //WINPAD
  121. #if defined(WIN32)
  122. # pragma message ("Compiling for WIN32")
  123. #define AWG3 // Use AWG3 instead of MG3
  124. #ifdef DEBUG
  125. # define MON // monitor bytes (Ortho)
  126. // Can't monitor bytes in WIN 32 -- why not?
  127. #endif //DEBUG
  128. # define POLLREQ // send poll req. (ortho)
  129. # define FASTLOG // recv file list/log is FASTER (REQD--old one doesn't work)
  130. # define VS // Vertical Scaling in Send. (Ortho)
  131. //# define NOPRE // no pre-emption. Reqd for WFW. Useless for all others?
  132. //# define TSK // BGT30 is a Process. No DLLSCHED. doesn't work in WIN32
  133. # define THREAD // BGT30 becomes a WIN32 thread inside EFAXRUN
  134. # define DYNL // Dynamic loading of DLLs. (WFW and !MDRV)
  135. //# define VC // uses VCOMM Comm driver thru DLLSCHED (WFW)
  136. # define LPZ // CBSZ ptrs are far ptrs. Reqd for split driver/WFW
  137. # define CAS // CAS support (Ortho)
  138. # define CL2 // Class2 support (Ortho)
  139. # define CL2_0 // Class2.0 support (Ortho)
  140. # define PCR // Page Critical. Reqd for safe recv. (!MDDI)
  141. # define CHK // check recvd data using old or new FAXCODEC (req !REC)
  142. # define FILET30 // all file io & filet30 api
  143. # define FAXWATCH // write out a FAXWATCH.LOG
  144. # define STATUS // send out STATUS messages
  145. # define INIFILE // read INI file settings
  146. # define PCMODEMS // AT-cmd, serial modems
  147. # define NEGOT // do negotiation
  148. # define KFIL // use Kernel File Calls
  149. # define SEC // recode send MMR data to MR/MH with AWCODC32. Works now.
  150. //# define REC // recode recv data with new FAXCODEC (req NFC and !CHK and RECODE_TO). Doesn't work yet
  151. //# define RECODE_TO MH_DATA // for old Pumps
  152. //# define RECODE_TO MMR_DATA // for compactness
  153. # define IFDbgPrintf MyIFDbgPrintf // +++ Redirect dbg msgs to efaxrun for now..
  154. # define METAPORT // FCom can deal with port handles as well as port number.
  155. # define UNIMEXT // Unimodem MCX aware
  156. # define TAPI // TAPI aware
  157. # define COMPRESS // Linearized messages are RejeevD-compressed.
  158. # define ADAPTIVE_ANSWER // Ataptive-answer handoff to another TAPI app..
  159. # define USECAPI // Capabilities saved via registry, not via
  160. // Post-message, textcaps, etc.
  161. # define MON3 // Extended COMM monitoring features (retail AND debug)
  162. # ifndef DEBUG
  163. # define SHIP_BUILD
  164. # endif // !DEBUG
  165. # ifdef DEBUG
  166. # define NSF_TEST_HOOKS // hooks for testing NSF compatibility.
  167. # endif // DEBUG
  168. # define PORTABLE_CODE
  169. #endif // WIN32
  170. //////// JUNE Demo IFAX /////////////////////////////////////////
  171. // #if defined(IFFGPROC) || defined(IFBGPROC)
  172. // # pragma message ("Compiling for IFAX")
  173. // # define MDRV // monolithic driver. reqd for IF (!WFW & !DYNL)
  174. // # define TSK // it's a Process--Can use win msging. No DLLSCHED
  175. // # define IFK // Use IFKERNEL services (Alloc/Free etc)
  176. // # define KFIL // Use Win Kernel FILEIO services
  177. // //# define PCR // Page Critical. Reqd for safe recv. (!MDDI)
  178. // # define MDDI // exact ModemDDI (rev 0.90) (MDRV && T3TO && !DYNL)
  179. // # define T3TO // use local timeouts (not from fcom) in T30 (MDDI)
  180. // # define JUNE // june 6th demo
  181. // # define FASTLOG // take this out along with JUNE
  182. // // # ifdef DEBUG
  183. // // # define MON // monitor bytes (Ortho)
  184. // // # endif //DEBUG
  185. // #endif //IFFGPROC
  186. /////////////////////////////////////////////////////////////////////
  187. // +++ josephj Ifaxos was changed so that DEBUGCHK calls DBGCHK,
  188. // which is not so harmful
  189. //#ifdef DEBUG
  190. // // not safe to call in BG (snowball==>GPF, IFAX==>timing problems)
  191. //# define DEBUGCHK_UNSAFE_IN_WFWBG
  192. //# define DEBUGCHK UNSAFE_IN_WFWBG
  193. //#endif //DEBUG
  194. #if (defined(CHK) && defined(REC))
  195. # error REC and CHK combination invalid
  196. #endif
  197. #if defined(MDDI) && !defined(MDRV)
  198. # error MDDI requires MDRV
  199. #endif
  200. #if defined(DYNL) && defined(MDRV)
  201. # error DYNL requires !MDRV
  202. #endif
  203. #if !defined(MDRV) && !defined(LPZ)
  204. # error !MDRV requires LPZ
  205. #endif
  206. #if !defined(LPZ)
  207. # error New modem-init scheme requires LPZ in _all_ builds
  208. #endif
  209. #if !defined(FILET30) && (defined(FASTLOG) || defined(FAXWATCH))
  210. # error NOFILE--cant have FASTLOG or FAXWATCH
  211. #endif
  212. #ifdef WIN32
  213. # ifdef IFK
  214. # error "IFK option illegal under WIN32"
  215. # endif
  216. //# ifndef TSK
  217. //# error "must use TSK in WIN32. Dllsched option NYI"
  218. //# endif
  219. # ifdef NOPRE
  220. # error NOPRE not supported in WIN32 (cant lockup machine)
  221. # endif
  222. # ifdef MDDI
  223. # error MDDI not supported in WIN32 (need FComCritical())
  224. # endif
  225. #endif
  226. #ifdef TMR
  227. # error "TMR option no longer supported"
  228. #endif
  229. #ifdef DISCARDFIX
  230. # define CODEFIXED DISCARDABLE
  231. # define DATAFIXED FIXED
  232. #else //DISCARDFIX
  233. # define CODEFIXED FIXED
  234. # define DATAFIXED FIXED
  235. #endif // DISCARDFIX
  236. #ifdef COMMENTS_NEED_TO_BE_REMOVED
  237. /////////////////////////////////////// Tasking/Sleep/Timing options ///////
  238. //
  239. // There are 4 options available
  240. // (1) Tasking/Sleeping thru DLLSCHED: #defs reqd are !TSK !TMR and !IFK
  241. // (2) Tasking/Sleeping thru an IFKERNEL BGproc: #defs reqd TSK IFK and !TMR
  242. // (3) Tasking thru WIN32: #defs reqd WIN32 TSK !IFK !TMR
  243. // (4) Use WM_TIMERs to sleep: #defs reqd TSK TMR -- NOT SUPPORTED anymore
  244. //
  245. /////////////////////////////////////// Tasking/Sleep/Timing options ///////
  246. //######## GENERAL ##############################
  247. //
  248. // anything labelled (Ortho) is orthogonal to everything else and can be
  249. // added or removed independently. All others have conditions marked
  250. // or described below.
  251. //
  252. //
  253. // WFW--requires VC and SMM and !IFK and !KFIL. Can use DYNL or not.
  254. // If DYNL used then LPZ is reqd & MDRV excluded
  255. // IFF--requires MDRV and TSK and IFK and !DYNL. Can use TMR and/or NTF
  256. // but currently thats broken. Requires KFIL if any file calls are
  257. // made.
  258. //
  259. //
  260. // TMR--use Timers & messaging (requires TSK)
  261. // NTF--use WM_NOTIFY msgs also (requires TSK and TMR)
  262. // DYNL & split drivers don't work with IF.
  263. // DYNL and MDRV are mutually exclusive (though both can be absent)
  264. //
  265. //
  266. // Modem Strings. Can use -D LPZ(far) CBZ(code-based) or nothing (near)
  267. // for CBSZ ptrs, but the latter 2 work only with FCOM & CLASS1
  268. // as one piece (i.e. with MDRV defined).
  269. // For WFW--MUST be LPZ. For IF--can be nothing or LPZ. near is better
  270. // CBZ doesn't work yet
  271. //
  272. //######## Debug ##############################
  273. //
  274. // MON-- monitor bytes to port, can be set orthogonal to DEBUG
  275. // DEFS= $(DEFS) -DNOVCOM ## don't use VCOMM (use with dummy DDRV)
  276. //
  277. //######## WFW specific ##############################
  278. //
  279. // WFW--assumes disk available for r/w during ECM
  280. // only reasonable combos are (T30PROC and not WFW) and (not T30PROC and WFW)
  281. // STATICM--never dynamically allocs. Must be set for WFW
  282. // UCOM--call comm driver thru USER (not directly). Must *not* be set
  283. // for WFW. Probably don't use for IFF or IFB
  284. //
  285. //######## OBSOLETE BUT USABLE ##############################
  286. //
  287. // SLOW--double all timeouts,
  288. // TO_REALLY_VERBOSE--trace every TO check
  289. //
  290. //######## TOTALLY OBSOLETE -- DO NOT USE ###############
  291. //
  292. // T3TO -- T30 timeouts are local (NPTOs) instead of from FCOM (now foled into MDDI)
  293. //
  294. //######## NOT TESTED IN A WHILE -- DO NOT USE ###############
  295. //
  296. // NCR--don't preempt during negotiation
  297. // DYNMON -- monitor bufs are dynamically alloced. Must be off for WFW
  298. // OLDECM -- old (non-seeking/non-buffered) ver of ECM
  299. //
  300. //######## BROKEN -- DO NOT USE ##############################
  301. //
  302. // Hack for RC224ATF
  303. // DEFS= $(DEFS) -DS7H ## don't turn this ON. It's broken & not reqd
  304. //
  305. //######## NOT YET IMPLEM ##########################
  306. //
  307. // RECVOEMNSF--not yet implem. Only for IFAX
  308. // PRI--not yet implem, may never be
  309. // USECRP--not tested, may never be
  310. // MMR_AVAIL -- runtime rendering not yet implem. will be soon
  311. //
  312. //##################################################
  313. #endif