File: srcline.h

package info (click to toggle)
fis-gtm 6.3-014-3
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 36,680 kB
  • sloc: ansic: 333,039; asm: 5,180; csh: 4,956; sh: 1,924; awk: 291; makefile: 66; sed: 13
file content (61 lines) | stat: -rwxr-xr-x 2,046 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/****************************************************************
 *								*
 *	Copyright 2001, 2014 Fidelity Information Services, Inc	*
 *								*
 *	This source code contains the intellectual property	*
 *	of its copyright holder(s), and is made available	*
 *	under a license.  If you do not know the terms of	*
 *	the license, please stop and do not read further.	*
 *								*
 ****************************************************************/

#ifndef SRCLINE_H_INCLUDED
#define SRCLINE_H_INCLUDED

/* $TEXT() source status flags */
#define CHECKSUMFAIL	0x0001
#define LABELNOTFOUND	0x0002
#define ZEROLINE	0x0004
#define NEGATIVELINE	0x0008
#define AFTERLASTLINE	0x0010
#define OBJMODMISS	0x0020
#define SRCNOTFND	0x0040
#define SRCNOTAVAIL	0x0080
#define TRIGNTAVAIL	0x0100

/* Structure that holds the program source information for $TEXT/ZPRINT/etc */
typedef struct
{
	int		srcrecs;	/* Size of the mstr array */
	unsigned int	srcstat;	/* Status of the array */
	unsigned char	*srcbuff;	/* Pointer to source buffer holding all lines */
	mstr		srclines[1];	/* Array size dependent on routine */
} routine_source;

#ifdef GTM_TRIGGER
/* Macro to determine if a routine name is a trigger name - the answer is yes if
 * the routine name contains a "#" which all triggers do. Args are mstr addr and boolean_t.
 * Note: If # occurs after 31st byte, then it is treated as a non-trigger routine due to truncation.
 */
# define IS_TRIGGER_RTN(RTNNAME, RSLT) 										\
{ 														\
	char	*cptr, *cptr_top;										\
	int	rtnlen;												\
														\
	rtnlen = MIN((RTNNAME)->len, MAX_MIDENT_LEN);								\
	if (0 < rtnlen)												\
	{													\
		for (cptr = (RTNNAME)->addr, cptr_top = cptr + rtnlen - 1; cptr <= cptr_top; --cptr_top) 	\
		{												\
			if ('#' == *cptr_top)									\
				break;										\
		}												\
		RSLT = !(cptr > cptr_top);									\
	} else													\
		RSLT = FALSE;											\
}
#else
# define IS_TRIGGER_RTN(RTNNAME, RSLT) RSLT = FALSE
#endif

#endif /* SRCLINE_H_INCLUDED */