mbgtools-lx  4.2.8
words.h
Go to the documentation of this file.
1 
2 /**************************************************************************
3  *
4  * $Id: words.h 1.46 2019/02/07 14:38:56 martin REL_M $
5  *
6  * Copyright (c) Meinberg Funkuhren, Bad Pyrmont, Germany
7  *
8  * Description:
9  * Definitions of commonly used data types.
10  *
11  * -----------------------------------------------------------------------
12  * $Log: words.h $
13  * Revision 1.46 2019/02/07 14:38:56 martin
14  * Removed a duplicate definition.
15  * Revision 1.45 2018/11/22 16:38:15 martin
16  * Removed inclusion of mbg_no_tgt.h which is obsolete here.
17  * Revision 1.44 2018/06/25 09:21:02 martin
18  * Support MBG_TGT_NO_TGT.
19  * Improved STRINGIFY() macro.
20  * Revision 1.43 2018/01/29 10:30:23 martin
21  * Modified some comments.
22  * Revision 1.42 2017/07/26 14:28:50Z martin
23  * Fixed build for NetBSD.
24  * Revision 1.41 2017/07/05 12:06:35 martin
25  * Moved macro _int_from_size_t() here.
26  * Revision 1.40 2017/06/12 11:14:25 martin
27  * Empty _DEPRECATED_BY definition for firmware targets.
28  * Revision 1.39 2017/03/15 10:01:09 martin
29  * Added comments how to represent negative numbers in NANO_TIME
30  * and NANO_TIME_64 structures.
31  * Added macros _nano_time_zero() and _nano_time_64_zero().
32  * Revision 1.38 2017/02/22 11:56:33 martin
33  * Made MBG_CODE_NAME_TABLE_ENTRY::code signed to
34  * avoid signed/unsigned warnings with some code tables.
35  * Revision 1.37 2017/01/27 12:24:35Z martin
36  * Moved STRINGIFY() macro here.
37  * Revision 1.36 2017/01/27 08:59:43 martin
38  * Fixed macro syntax.
39  * Revision 1.35 2016/08/05 12:17:21 martin
40  * Moved definitions for NANO_TIME and NANO_TIME_64 here.
41  * New macro _nano_time_64_negative().
42  * Conditionally define _abs64() macro.
43  * Include <inttypes.h> for Keil ARMCC target.
44  * Added some conditional debugging code.
45  * Fixed some spelling.
46  * Revision 1.34 2014/10/20 12:31:20 martin
47  * Moved macro _isdigit() here.
48  * Revision 1.33 2014/05/27 10:18:35Z martin
49  * Finer control of which types are required for or already
50  * available on particular target systems.
51  * Added macros helpful to simplify declarations of code/name tables.
52  * Revision 1.32 2014/01/07 15:43:52 martin
53  * Define __mbg_inline for ARM firmware targets.
54  * Revision 1.31 2012/11/29 11:54:39Z martin
55  * Removed #if sizeof() definitions which may cause build errors
56  * with some older compilers.
57  * Include stdbool.h for __ARMCC_VERSION targets.
58  * Moved _nop_macro_fnc() definition here.
59  * Revision 1.30 2012/11/02 09:12:29Z martin
60  * Moved most feature detection code to mbg_tgt.h.
61  * Tried to define missing features most flexibly and portably.
62  * Revision 1.29 2012/07/11 16:45:45Z martin
63  * New macros to access individual bytes of long constants.
64  * Revision 1.28 2012/04/05 14:36:18Z martin
65  * Support CVI 2010 compiler which provides C99 types.
66  * Revision 1.27 2011/07/18 10:21:38Z martin
67  * Added definition for MBG_CODE_NAME_TABLE_ENTRY which can
68  * be used to define tables assigning strings to numeric codes.
69  * Revision 1.26 2011/04/06 10:23:03 martin
70  * Added FBYTE_OF() and FWORD_OF() macros.
71  * Modifications required for *BSD.
72  * Revision 1.25 2010/11/17 10:23:09 martin
73  * Define _BIT_REDEFINED if bit type is redefined.
74  * Revision 1.24 2010/11/17 08:44:56Z martin
75  * If supported, use type "bool" to implement "bit".
76  * Revision 1.23 2010/05/27 08:54:30Z martin
77  * Support fixed size data types with Keil RealView compiler for ARM.
78  * Keil RealView ARM targets are always considered as firmware.
79  * Revision 1.22 2009/10/21 07:53:55 martin
80  * Undid changes introduced in 1.21 since they were not consistent
81  * across glibc and/or Linux kernel header versions.
82  * Revision 1.21 2009/10/01 14:00:17 martin
83  * Conditionally define ulong and friends also for Linux/glibc.
84  * Revision 1.20 2009/07/02 15:38:12 martin
85  * Added new macro _wswap32().
86  * Revision 1.19 2009/04/14 14:45:45Z martin
87  * Added BYTE_OF_P() and WORD_OF_P() macros.
88  * Revision 1.18 2009/03/27 14:05:18 martin
89  * Cleanup for CVI.
90  * Revision 1.17 2009/03/13 09:06:03Z martin
91  * Declared bit type for non-firmware environments.
92  * Revision 1.16 2008/12/05 12:05:41Z martin
93  * Define dummy int64_t/uint64_t types for targets
94  * which don't support 64 bit data types.
95  * Revision 1.15 2008/07/14 14:44:00Z martin
96  * Use fixed size C99 types which come with GCC and newer Borland compilers.
97  * Revision 1.14 2008/01/30 10:27:50Z martin
98  * Moved some macro definitions here.
99  * Revision 1.13 2007/03/08 15:00:30Z martin
100  * Fixed incompatibility of macro _IS_MBG_FIRMWARE.
101  * Added a workaround for _IS_MBG_FIRMWARE under CVI.
102  * Support for BSD.
103  * Revision 1.12 2006/12/15 10:45:46 martin
104  * Added macro _IS_MBG_FIRMWARE.
105  * Cleanup for Linux, QNX, and Watcom C.
106  * Include mbg_tgt.h for non-firmware targets.
107  * Revision 1.11 2004/11/10 10:45:34 martin
108  * Added C99 fixed-type handling for QNX.
109  * Revision 1.10 2004/11/09 13:12:56 martin
110  * Redefined C99 integer types with fixed sizes as standard types
111  * if required, depending on the environment.
112  * Revision 1.9 2003/02/07 11:36:54 MARTIN
113  * New macros _hilo_16() and _hilo_32() for endian conversion.
114  * Revision 1.8 2002/05/28 10:09:54 MARTIN
115  * Added new macros _var_bswap16() and _var_bswap32().
116  * Revision 1.7 2001/03/14 11:30:48 MARTIN
117  * Removed definitions for UINT8, UINT16, UINT32.
118  * Redefined preprocessor control for Win32.
119  * Revision 1.6 2001/02/28 15:43:20 MARTIN
120  * Modified preprocessor syntax.
121  * Revision 1.5 2001/02/05 10:20:53 MARTIN
122  * Include different Linux types for user space and kernel space programs.
123  * Source code cleanup.
124  * Revision 1.4 2000/09/15 08:34:11 MARTIN
125  * Exclude some definitions if compiling under Win NT.
126  * Revision 1.3 2000/08/22 15:04:28 MARTIN
127  * Added new file header.
128  * Added macros to revert endianess of 16 and 32 bit values.
129  *
130  **************************************************************************/
131 
132 #ifndef _WORDS_H
133 #define _WORDS_H
134 
135 
136 /* Other headers to be included */
137 
138 
139 #if !defined( _IS_MBG_FIRMWARE )
140 
141  #if defined( _C166 ) || \
142  defined( _CC51 ) || \
143  defined( __ARM ) || \
144  defined( __ARMCC_VERSION )
145  #define _IS_MBG_FIRMWARE 1
146  #else
147  #define _IS_MBG_FIRMWARE 0
148  #endif
149 
150 #endif
151 
152 
153 #if !_IS_MBG_FIRMWARE
154  #include <mbg_tgt.h>
155 #else
156  #if defined( __ARMCC_VERSION ) // Keil RealView Compiler for ARM
157  #define __mbg_inline __inline
158  #include <stdint.h>
159  #include <inttypes.h>
160  #include <stdbool.h>
161  #define MBG_TGT_HAS_EXACT_SIZE_TYPES 1
162  #else
163  #define MBG_TGT_MISSING_64_BIT_TYPES 1
164  #endif
165 
166  #if !defined( _DEPRECATED_BY )
167  #define _DEPRECATED_BY( _s ) // empty definition
168  #endif
169 #endif
170 
171 
172 
173 #ifdef _WORDS
174  #define _ext
175 #else
176  #define _ext extern
177 #endif
178 
179 
180 /* Start of header body */
181 
182 #if defined( _C166 ) \
183  || defined( _CC51 )
184  #define _BIT_DEFINED 1 // these compilers natively support the "bit" type
185  #define USE_LONG_FOR_INT32 1
186 #endif
187 
188 
189 
190 #if !defined( MBG_TGT_HAS_EXACT_SIZE_TYPES )
191 
192  #if defined( MBG_TGT_HAS_INT_8_16_32 )
193 
194  // Define C99 exact size types using non-standard exact-size types
195  typedef __int8 int8_t;
196  typedef unsigned __int8 uint8_t;
197 
198  typedef __int16 int16_t;
199  typedef unsigned __int16 uint16_t;
200 
201  typedef __int32 int32_t;
202  typedef unsigned __int32 uint32_t;
203 
204  #else
205 
206  // Assume a 16 or 32 bit compiler which doesn't
207  // support exact-size types.
208 
209  typedef char int8_t;
210  typedef unsigned char uint8_t;
211 
212  typedef short int16_t;
213  typedef unsigned short uint16_t;
214 
215  // Using #if sizeof() to determine the size of a type may not
216  // be supported by all preprocessors, and may even result in
217  // build errors if used in a conditional preprocessor section,
218  // so we can't use this here without compatibility problems.
219 
220  #if defined( USE_LONG_FOR_INT32 )
221  typedef long int32_t;
222  typedef unsigned long uint32_t;
223  #elif defined( USE_INT_FOR_INT32 )
224  typedef int int32_t;
225  typedef unsigned int uint32_t;
226  #else
227  #error Need to define int32_t and uint32_t
228  #endif
229 
230  #endif
231 
232  #if defined( MBG_TGT_MISSING_64_BIT_TYPES )
233 
234  // The build environment does not support 64 bit types. However,
235  // 64 bit types need to be defined to avoid build errors e.g.
236  // if these types are formally used in function prototypes.
237  // We explicitly use abnormal data types to hopefully
238  // cause compiler errors in case these types are
239  // unexpectedly used to generate real code for a target
240  // platform which does not support 64 bit types.
241  typedef void *int64_t;
242  typedef void *uint64_t;
243 
244  #else
245 
246  // Define C99 types using non-standard exact-size types
247  // which are usually supported by build environments that
248  // support 64 bit types but don't support C99 types.
249  typedef __int64 int64_t;
250  typedef unsigned __int64 uint64_t;
251 
252  #endif
253 
254 #endif
255 
256 
257 
258 #if defined( MBG_TGT_MISSING_64_BIT_TYPES )
259 
260  #define MBG_TGT_HAS_64BIT_TYPES 0
261 
262 #else
263 
264  #define MBG_TGT_HAS_64BIT_TYPES 1
265 
266  #if !defined( MBG_TGT_HAS_ABS64 )
267  #define _abs64( _i ) ( (int64_t) ( ( (_i) < 0 ) ? -(_i) : (_i) ) )
268  #endif
269 
270 #endif
271 
272 
273 
274 // Some commonly used types
275 
276 #if !defined( _UCHAR_DEFINED )
277  typedef unsigned char uchar;
278  #define uchar uchar
279 #endif
280 
281 #if !defined( _USHORT_DEFINED )
282  typedef unsigned short ushort;
283  #define ushort ushort
284 #endif
285 
286 #if !defined( _UINT_DEFINED )
287  typedef unsigned int uint;
288  #define uint uint
289 #endif
290 
291 #if !defined( _ULONG_DEFINED )
292  typedef unsigned long ulong;
293  #define ulong ulong
294 #endif
295 
296 #if !defined( _UDOUBLE_DEFINED )
297  typedef double udouble;
298  #define udouble udouble
299 #endif
300 
301 #if !defined( _BYTE_DEFINED )
302  typedef unsigned char byte;
303  #define byte byte
304 #endif
305 
306 #if !defined( _WORD_DEFINED )
307  typedef unsigned short word;
308  #define word word
309 #endif
310 
311 #if !defined( _LONGWORD_DEFINED )
312  typedef unsigned long longword;
313  #define longword longword
314 #endif
315 
316 #if !defined( _DWORD_DEFINED )
317 // typedef unsigned long dword;
318 // #define dword dword
319 #endif
320 
321 
322 #if defined( MBG_TGT_MISSING_BOOL_TYPE )
323  //#error MBG_TGT_MISSING_BOOL_TYPE is defined
324  // BDS/Borland C++ Builder 2006 (non-C++ mode)
325  // Borland C++ Builder 5 (non-C++ mode)
326  // BC 3.1
327  // VC6
328  // DDKbuild
329  // VS2008
330 #endif
331 
332 #if defined( __cplusplus )
333  //#error __cplusplus is defined
334 #endif
335 
336 #if defined( __bool_true_false_are_defined )
337  //#error __bool_true_false_are_defined is defined
338  // Keil armcc
339  // gcc / Linux user space
340  // clang / FreeBSD user space and kernel
341 #endif
342 
343 
344 #if defined( MBG_TGT_MISSING_BOOL_TYPE ) /* from mbg_tgt.h */ \
345  || ( !defined( __cplusplus ) /* C++ */ \
346  && !defined( __bool_true_false_are_defined ) /* C99 */ \
347  && !defined( _LINUX_TYPES_H ) ) /* Linux kernel */ \
348  && !( defined( MBG_TGT_NETBSD ) && defined( _SYS_TYPES_H_ ) ) /* NetBSD kernel */
349 
350  // There's no native support for a "bool" type, so we
351  // need a substitute.
352 
353  #if defined( _BIT_DEFINED )
354  // A native "bit" type is supported, so we use it for bool.
355  //#error substituting bit for bool
356  // C166
357  typedef bit bool;
358  #else
359  // Fall back to "int". This is just a hack which
360  // may yield unexpected results with code like:
361  // return (bool) ( val & 0x10 );
362  // A safe way of coding would be:
363  // return (bool) ( ( val & 0x10 ) != 0 );
364  //#error substituting int for bool
365  // Borland C++ Builder 5
366  // BC 3.1
367  // VC6
368  // DDKbuild
369  // VS2008
370  typedef int bool;
371  #endif
372 
373  // Eventually provoke a build error if the build
374  // environment unexpectedly supports "bool" natively.
375  #define bool bool
376  #define true 1
377  #define false 0
378 #else
379  //#error native bool type supported
380  // Borland C++ Builder 5 and newer (C++ mode only)
381  // Keil armcc
382  // gcc / Linux user space
383  // gcc / Linux kernel
384  // clang / FreeBSD user space and kernel
385 #endif
386 
387 
388 #if !defined( _BIT_DEFINED )
389 
390  // There's no native support for a "bit" type, so we
391  // need a substitute. The "bool" type would fit best
392  // and should be fine if it's supported natively.
393  //
394  // However, if "bool" has been substituted above
395  // by "int"then this is just a hack which may yield
396  // unexpected results with code like:
397  // return (bit) ( val & 0x10 );
398  // A safe way of coding would be:
399  // return (bit) ( ( val & 0x10 ) != 0 );
400 
401  //#error substituting bool for bit
402  // Keil armcc
403  // Borland C++ Builder 5
404  // BC 3.1
405  // VC6
406  // DDKbuild
407  // VS2008
408  // gcc / Linux user space
409  // gcc / Linux kernel
410  // clang / FreeBSD user space and kernel
411  typedef bool bit;
412 
413  // Eventually provoke a build error if the build
414  // environment unexpectedly supports "bit" natively.
415  #define bit bit
416 
417  #define _BIT_REDEFINED 1
418 
419 #else
420  //#error native bit type supported
421  // C166
422 #endif
423 
424 
425 
426 #define BYTE_0( _x ) ( (uint8_t ) ( (_x) & 0xFF ) )
427 #define BYTE_1( _x ) ( (uint8_t ) ( ( ( (uint16_t) (_x) ) >> 8 ) & 0xFF ) )
428 #define BYTE_2( _x ) ( (uint8_t ) ( ( ( (uint32_t) (_x) ) >> 16 ) & 0xFF ) )
429 #define BYTE_3( _x ) ( (uint8_t ) ( ( ( (uint32_t) (_x) ) >> 24 ) & 0xFF ) )
430 
431 
432 #define HI_BYTE( _x ) ( (uint8_t ) ( (_x) >> 8 ) )
433 #define LO_BYTE( _x ) ( (uint8_t ) ( (_x) & 0xFF ) )
434 
435 #define HI_WORD( _x ) ( (uint16_t ) ( (_x) >> 16 ) )
436 #define LO_WORD( _x ) ( (uint16_t ) ( (_x) & 0xFFFF ) )
437 
438 // the macros below assume little endianess
439 // these macros expect the name of a variable
440 #define BYTE_OF( _v, _n ) *( ( (uint8_t *) &(_v) ) + (_n) )
441 #define WORD_OF( _v, _n ) *( ( (uint16_t *) &(_v) ) + (_n) )
442 
443 #define FBYTE_OF( _v, _n ) *( ( (uint8_t far *) &(_v) ) + (_n) )
444 #define FWORD_OF( _v, _n ) *( ( (uint16_t far *) &(_v) ) + (_n) )
445 
446 // same as above, but taking pointers
447 #define BYTE_OF_P( _p, _n ) *( ( (uint8_t *) (_p) ) + (_n) )
448 #define WORD_OF_P( _p, _n ) *( ( (uint16_t *) (_p) ) + (_n) )
449 
450 
451 // a macro to swap the byte order of a 16 bit value
452 #define _bswap16( _x ) \
453 ( \
454  ( ( ( (uint16_t) (_x) ) & 0x00FF ) << 8 ) | \
455  ( ( ( (uint16_t) (_x) ) & 0xFF00 ) >> 8 ) \
456 )
457 
458 // a macro to swap the byte order of a 32 bit value
459 #define _bswap32( _x ) \
460 ( \
461  ( ( ( (uint32_t) (_x) ) & 0x000000FFUL ) << 24 ) | \
462  ( ( ( (uint32_t) (_x) ) & 0x0000FF00UL ) << 8 ) | \
463  ( ( ( (uint32_t) (_x) ) & 0x00FF0000UL ) >> 8 ) | \
464  ( ( ( (uint32_t) (_x) ) & 0xFF000000UL ) >> 24 ) \
465 )
466 
467 // a macro to swap the word order of a 32 bit value
468 #define _wswap32( _x ) \
469 ( \
470  ( ( ( (uint32_t) (_x) ) & 0x0000FFFFUL ) << 16 ) | \
471  ( ( ( (uint32_t) (_x) ) >> 16 ) & 0x0000FFFFUL ) \
472 )
473 
474 #define _var_bswap16( _v ) (_v) = _bswap16( _v )
475 #define _var_bswap32( _v ) (_v) = _bswap32( _v )
476 
477 
478 // The C51 compiler is big-endian, that means the most
479 // significant byte of a 16 or 32 bit value is stored in
480 // the lowest memory location. Most other systems are
481 // little-endian, so we must use macros to adjust the
482 // byte order if the C51 is used.
483 
484 #if defined( _CC51 )
485  #define _hilo_16( _x ) _bswap16( _x )
486  #define _hilo_32( _x ) _bswap32( _x )
487 #else
488  #define _hilo_16( _x ) (_x)
489  #define _hilo_32( _x ) (_x)
490 #endif
491 
492 
493 
494 #define _set_array_bit( _n, _byte_array, _max_bytes ) \
495 do \
496 { \
497  int byte_idx = (_n) >> 3; \
498  \
499  if ( byte_idx < _max_bytes ) \
500  _byte_array[byte_idx] |= ( 1 << ( (_n) & 0x07 ) ); \
501  \
502 } while ( 0 )
503 
504 
505 #define _clear_array_bit( _n, _byte_array, _max_bytes ) \
506 do \
507 { \
508  int byte_idx = (_n) >> 3; \
509  \
510  if ( byte_idx < _max_bytes ) \
511  _byte_array[byte_idx] &= ~( 1 << ( (_n) & 0x07 ) ); \
512  \
513 } while ( 0 )
514 
515 
516 
517 #define _isdigit( _c ) ( (_c) >= '0' && (_c) <= '9' )
518 
519 
520 // A macro function which can safely be used without
521 // side effects as a macro doing nothing.
522 // This is useful to define debug macros away in
523 // release builds, etc.
524 #if !defined( _nop_macro_fnc )
525  #define _nop_macro_fnc() do {} while (0)
526 #endif
527 
528 
532 typedef struct
533 {
534  long code;
535  const char *name;
536 
538 
546 #define _mbg_cn_table_entry( _n ) { _n, #_n }
547 
553 #define _mbg_cn_table_end() { 0, NULL }
554 
555 
556 
575 typedef struct
576 {
577  // ATTENTION:
578  // This structure is and has has been used in public API calls for a long time,
579  // so even though the order of member fields is different than in NANO_TIME_64
580  // this must *NOT* be changed, or API compatibility will get lost!
581  int32_t nano_secs;
582  int32_t secs;
583 
584 } NANO_TIME;
585 
586 #define _mbg_swab_nano_time( _p ) \
587 do \
588 { \
589  _mbg_swab32( &(_p)->nano_secs ); \
590  _mbg_swab32( &(_p)->secs ); \
591 } while ( 0 )
592 
596 #define _nano_time_negative( _nt ) \
597  ( ( (_nt)->secs < 0 ) || ( (_nt)->nano_secs < 0 ) )
598 
602 #define _nano_time_zero( _nt ) \
603  ( ( (_nt)->secs == 0 ) && ( (_nt)->nano_secs == 0 ) )
604 
605 
606 
621 typedef struct
622 {
623  // ATTENTION:
624  // This structure is and has been used in public API calls for a long time,
625  // so even though the order of member fields is different than in NANO_TIME
626  // this must *NOT* be changed, or API compatibility will get lost!
629 
630 } NANO_TIME_64;
631 
632 #define _mbg_swab_nano_time_64( _p ) \
633 do \
634 { \
635  _mbg_swab64( &(_p)->secs ); \
636  _mbg_swab64( &(_p)->nano_secs ); \
637 } while ( 0 )
638 
642 #define _nano_time_64_negative( _nt ) \
643  ( ( (_nt)->secs < 0 ) || ( (_nt)->nano_secs < 0 ) )
644 
648 #define _nano_time_64_zero( _nt ) \
649  ( ( (_nt)->secs == 0 ) && ( (_nt)->nano_secs == 0 ) )
650 
651 
652 
653 // The size_t type can eventually be larger than an int type.
654 // However, some snprintf-like functions expect a size_t value
655 // to specify the buffer size, but just return an int value.
656 // So we take care that at least the return value is limited
657 // to MAXINT.
658 #if defined( MBG_TGT_WIN32 )
659  #define _int_from_size_t( _n ) \
660  ( ( (_n) > INT_MAX ) ? INT_MAX : (int) (_n) )
661 #else
662  #define _int_from_size_t( _n ) (_n)
663 #endif
664 
665 
666 
675 #define XSTRINGIFY(x) #x
676 
677 
695 #define STRINGIFY(x) XSTRINGIFY(x)
696 
697 
698 /* End of header body */
699 
700 #undef _ext
701 
702 #endif /* _WORDS_H */
#define ulong
Definition: words.h:293
#define word
Definition: words.h:308
short int16_t
Definition: words.h:212
A timestamp with nanosecond resolution, but 64 bit size.
Definition: words.h:621
#define ushort
Definition: words.h:283
unsigned short uint16_t
Definition: words.h:213
bool bit
Definition: words.h:411
A table entry which can be used to map codes to names.
Definition: words.h:532
#define bool
Definition: words.h:375
char int8_t
Definition: words.h:209
#define udouble
Definition: words.h:298
#define uchar
Definition: words.h:278
A timestamp with nanosecond resolution.
Definition: words.h:575
unsigned char uint8_t
Definition: words.h:210
__int64 int64_t
Definition: words.h:249
int32_t secs
[seconds], usually since 1970-01-01 00:00:00
Definition: words.h:582
long code
Definition: words.h:534
int32_t nano_secs
[nanoseconds]
Definition: words.h:581
#define bit
Definition: words.h:415
#define longword
Definition: words.h:313
#define byte
Definition: words.h:303
const char * name
Definition: words.h:535
#define uint
Definition: words.h:288
int64_t nano_secs
[nanoseconds]
Definition: words.h:628
int64_t secs
[seconds], usually since 1970-01-01 00:00:00
Definition: words.h:627
unsigned __int64 uint64_t
Definition: words.h:250