File: srcline.h

package info (click to toggle)
fis-gtm 6.2-000-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 30,784 kB
  • ctags: 42,554
  • sloc: ansic: 358,483; asm: 4,847; csh: 4,574; sh: 2,261; awk: 200; makefile: 86; sed: 13
file content (58 lines) | stat: -rw-r--r-- 1,928 bytes parent folder | download
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
/****************************************************************
 *								*
 *	Copyright 2001, 2012 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.
 */
# define IS_TRIGGER_RTN(RTNNAME, RSLT) 												\
{ 																\
	unsigned char	*cptr, *cptr_top;											\
																\
	if (0 < (RTNNAME)->len)													\
	{															\
		for (cptr = (unsigned char *)(RTNNAME)->addr, cptr_top = cptr + (RTNNAME)->len - 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 */