|
11 | 11 | *
|
12 | 12 | * History
|
13 | 13 | *
|
| 14 | + * bengsig 27-may-2024 - Improve some comments |
14 | 15 | * bengsig 17-apr-2024 - nostatistics statement
|
15 | 16 | * bengsig 16-apr-2024 - bit operation on clflags, -=
|
16 | 17 | * bengsig 4-apr-2024 - $oraerror:showoci directive
|
@@ -356,11 +357,11 @@ extern int nanosleep(struct timespec *, int);
|
356 | 357 |
|
357 | 358 | struct rwl_option
|
358 | 359 | {
|
359 |
| - const char *longn; |
| 360 | + const char *longn; // long name e.g. --version |
360 | 361 | ub4 optbits;
|
361 | 362 | #define RWL_OPT_NOLARG 0
|
362 | 363 | #define RWL_OPT_HASARG 0x00000001 // option must have agument
|
363 |
| - ub4 shortn; |
| 364 | + ub4 shortn; // short name e.g. 'v' |
364 | 365 | };
|
365 | 366 |
|
366 | 367 |
|
@@ -489,6 +490,7 @@ struct rwl_cinfo
|
489 | 490 | text serverr[RWL_DB_SERVERR_LEN]; //
|
490 | 491 | };
|
491 | 492 |
|
| 493 | +// How was a string allocated in rwl_value |
492 | 494 | enum rwl_vsalloc
|
493 | 495 | {
|
494 | 496 | RWL_SVALLOC_NOT = 0 /* no buffer allocated this MUST have value 0 */
|
@@ -829,6 +831,7 @@ struct rwl_arglist
|
829 | 831 | };
|
830 | 832 | #define RWL_USER_ARG_OFFSET 500 // offset from ordinary option val in struct option
|
831 | 833 |
|
| 834 | +// RWLOADSIM_PATH |
832 | 835 | struct rwl_pathlist
|
833 | 836 | {
|
834 | 837 | text *pathname; // name of entry in RWLOADISM_PATH
|
@@ -1296,12 +1299,14 @@ struct rwl_main
|
1296 | 1299 | text sqlbuffer[RWL_MAXSQL+2]; /* text of last SQL */
|
1297 | 1300 | } ;
|
1298 | 1301 |
|
| 1302 | +// Linked list of contatenation, currently used by rwldoprintf |
1299 | 1303 | struct rwl_conlist
|
1300 | 1304 | {
|
1301 | 1305 | rwl_estack *estk; // expression
|
1302 | 1306 | rwl_conlist *connxt; // linked list pointer
|
1303 | 1307 | };
|
1304 | 1308 |
|
| 1309 | +// Link list of identifiers, e.g. used for rwlreadline |
1305 | 1310 | struct rwl_idlist
|
1306 | 1311 | {
|
1307 | 1312 | sb4 idnum; // variable number
|
@@ -1415,6 +1420,7 @@ struct rwl_localvar
|
1415 | 1420 | rwl_type atype; /* the type of the argument */
|
1416 | 1421 | };
|
1417 | 1422 |
|
| 1423 | +// All operators in the RPN evaluations stack |
1418 | 1424 | enum rwl_stack_t
|
1419 | 1425 | {
|
1420 | 1426 | RWL_STACK_notinuse = 0
|
@@ -1662,6 +1668,7 @@ enum rwl_code_t
|
1662 | 1668 | , RWL_CODE_SQLEND // return from something with database calls - ceptr1 is variable name (of procedure), ceint2 location guess
|
1663 | 1669 | };
|
1664 | 1670 |
|
| 1671 | +// Entries in the p-code array |
1665 | 1672 | struct rwl_code
|
1666 | 1673 | {
|
1667 | 1674 | rwl_code_t ctyp; /* operator - code type */
|
@@ -1701,7 +1708,9 @@ struct rwl_rastvar /* random string as a variable */
|
1701 | 1708 | /* Internal variable names
|
1702 | 1709 | * Note that "runseconds" to the user is like
|
1703 | 1710 | * a read-only variable, while it really is a
|
1704 |
| - * function without arguments |
| 1711 | + * function without arguments. It should be given |
| 1712 | + * by the user as runseconds() as if it were a |
| 1713 | + * function |
1705 | 1714 | */
|
1706 | 1715 | #define RWL_LOOPNUMBER_VAR (text *)"loopnumber"
|
1707 | 1716 | #define RWL_THREADNUMBER_VAR (text *)"threadnumber"
|
@@ -1753,7 +1762,6 @@ struct rwl_histogram
|
1753 | 1762 | /* execution time statistics structure */
|
1754 | 1763 | struct rwl_stats
|
1755 | 1764 | {
|
1756 |
| - //rwl_mutex *mutex_stats; // moved to rwl_identifier due to RWL-600 [rwlmutexget-notinit] |
1757 | 1765 | double wtime, etime, atime, dtime; // wait exec, application time
|
1758 | 1766 | ub4 *persec; /* array of per second counters */
|
1759 | 1767 | double *wtimsum; // array of per second wait time
|
@@ -1814,6 +1822,7 @@ extern void rwlexprdestroy(rwl_main *, rwl_estack *);
|
1814 | 1822 | // rwlexprbic: vvv -= (vvv/bbb)%2 ? bbb : 0
|
1815 | 1823 | // note that bbb must be rwl_onep, rwl_twop, rwl_fourp, etc
|
1816 | 1824 | //
|
| 1825 | +// They can be much simplified once we get bitwise operators |
1817 | 1826 | #define rwlexprbis(rwm, vvv, bbb) \
|
1818 | 1827 | /* vvv */ rwlexprpush(rwm, vvv, RWL_STACK_VAR); \
|
1819 | 1828 | /* bbb */ rwlexprpush(rwm, bbb, RWL_STACK_NUM); \
|
|
0 commit comments