FreeBSD/contrib/mdocml/roff.c
/*
 * Handle some predefined read-only number registers.
 * For now, return -1 if the requested register is not predefined;
 * in case a predefined read-only register having the value -1
 * were to turn up, another special value would have to be chosen.
 */
Handle some predefined read-only number registers.
For now, return -1 if the requested register is not predefined;
in case a predefined read-only register having the value -1
were to turn up, another special value would have to be chosen.
Handle some predefined read - only number registers . For now return - 1 if the requested register is not predefined ; in case a predefined read - only register having the value - 1 were to turn up another special value would have to be chosen .
static int
roff_getregro(const struct roff *r, const char *name)
{
	switch (*name) {
	case '$':  
		return r->argc;
	case 'A':  
		return 0;
	case 'g':  
		return 1;
	case 'H':  
		return 24;
	case 'j':  
		return 0;
	case 'T':  
		return 1;
	case 'V':  
		return 40;
	default:
		return -1;
	}
}
static int roff_getregro ( const struct roff * r , const char * name ) { switch ( * name ) { case ' ' : return r -> argc ; case ' ' : return 0 ; case ' ' : return 1 ; case ' ' : return 24 ; case ' ' : return 0 ; case ' ' : return 1 ; case ' ' : return 40 ; default : return -1 ; } }
Handle some predefined read-only number registers.
Handle some predefined read - only number registers .
/* Number of arguments of the last macro evaluated. */ /* ASCII approximation mode is always off. */ /* Groff compatibility mode is always on. */ /* Fixed horizontal resolution. */ /* Always adjust left margin only. */ /* Some output device is always defined. */ /* Fixed vertical resolution. */