summaryrefslogtreecommitdiffhomepage
path: root/src/mvsfmt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/mvsfmt.c')
-rw-r--r--src/mvsfmt.c28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/mvsfmt.c b/src/mvsfmt.c
index 8424ac8..dc268b0 100644
--- a/src/mvsfmt.c
+++ b/src/mvsfmt.c
@@ -138,15 +138,15 @@ static void put32(unsigned char *p, uint32_t v) {
* | 152 | 2 | CSINUMEN | number of field names |
* | 154 | 8 | CSIFLDNM | field names |
*/
-#define CSIFILTK 0
-#define CSIDTYPS 132
-#define CSIRESUM 149
-#define CSIS1CAT 150
-#define CSINUMEN 152
-#define CSIFLDNM 154
+constexpr unsigned CSIFILTK = 0; /**< +0, length of the filter key */
+constexpr unsigned CSIDTYPS = 132; /**< entry types to return */
+constexpr unsigned CSIRESUM = 149; /**< Y: return error information */
+constexpr unsigned CSIS1CAT = 150; /**< Y: search one catalog only */
+constexpr unsigned CSINUMEN = 152; /**< number of field names */
+constexpr unsigned CSIFLDNM = 154; /**< field names, 8 each */
/* Return work area, the first field of it (see csi_parse()). */
-#define CSIREQLN 4
+constexpr unsigned CSIREQLN = 4; /**< length of the entry that failed */
/*
* Return work area: CSIUSRLN +0 (4, set by the caller), CSIREQLN +4,
@@ -156,12 +156,12 @@ static void put32(unsigned char *p, uint32_t v) {
* X'40') or, with halfword lengths, CSITOTLN (2) counting itself, two
* reserved bytes, one length per field and the fields.
*/
-#define CSIUSDLN 8
-#define CSI_FIRST 14
-#define CSIE_NAME 2
-#define CSIE_FIXED 46
-#define CSIE_RETINFO 50
-#define CSIENTER 0x40 /* CSIEFLAG: error, return information follows */
+constexpr unsigned CSIUSDLN = 8; /**< bytes of return information used */
+constexpr unsigned CSI_FIRST = 14; /**< offset of the first entry */
+constexpr unsigned CSIE_NAME = 2; /**< name, within an entry */
+constexpr unsigned CSIE_FIXED = 46; /**< bytes before the lengths */
+constexpr unsigned CSIE_RETINFO = 50; /**< bytes of an entry with return info */
+constexpr unsigned char CSIENTER = 0x40; /**< CSIEFLAG: error, return info follows */
#define EB_ZERO 0xf0 /* CSIETYPE of a catalog entry, EBCDIC '0' */
#define EB_Y 0xe8 /* EBCDIC 'Y' */
@@ -299,7 +299,7 @@ bool csi_parse(const unsigned char *work, size_t worklen, mvs_name_fn *fn,
* at -- and a broad filter on a big catalog is the one way this feature
* can put real work on catalog management.
*/
-#define CSI_MAX_CALLS 3
+constexpr int CSI_MAX_CALLS = 3; /**< searches before giving up */
/**
* @brief Search the catalog: build the criteria, call, decode, and