plan 9 kernel history: overview | file list | diff list

1992/1024/port/lib.h (diff list | history)

1992/1023/sys/src/9/port/lib.h:24,351992/1024/sys/src/9/port/lib.h:24,42 (short | long | prev | next)
Add UTFmax, Runesync, Runeself, Runeerror, etc. Update print routines.
rsc Fri Mar 4 12:44:25 2005
1990/0227    
extern	long	strlen(char*); 
1991/1011    
extern	int	atoi(char*); 
1990/0227    
 
1992/1024    
enum 
{ 
	UTFmax		= 3,		/* maximum bytes per rune */ 
	Runesync	= 0x80,		/* cannot represent part of a UTF sequence (<) */ 
	Runeself	= 0x80,		/* rune and UTF sequences are the same (<) */ 
	Runeerror	= 0x80,		/* decoding error in UTF */ 
}; 
 
1990/0227    
/* 
1991/1223    
 * rune routines 
 */ 
extern	int	runetochar(char*, Rune*); 
extern	int	chartorune(Rune*, char*); 
extern	int	countrune(char*); 
1992/0213    
extern	char*	utfrune(char*, long); 
1992/0805    
extern	int	utflen(char*); 
1991/1223    
 
1992/1023/sys/src/9/port/lib.h:38,631992/1024/sys/src/9/port/lib.h:45,64
1991/1223    
/* 
1990/0227    
 * print routines 
 */ 
                 
#define	FUNSIGN	4 
#define	FSHORT	2 
#define	FLONG	1 
                 
typedef struct Op	Op; 
struct Op 
1992/1024    
typedef 
struct 
1990/0227    
{ 
	char	*p; 
	char	*ep; 
	void	*argp; 
1992/1024    
	char*	out;		/* pointer to next output */ 
	char*	eout;		/* pointer to end */ 
1990/0227    
	int	f1; 
	int	f2; 
	int	f3; 
}; 
1992/1023    
typedef void*	Fconv;	/* to allow fcall.h to compile */ 
1990/0227    
extern	void	strconv(char*, Op*, int, int); 
extern	int	numbconv(Op*, int); 
1992/1024    
	int	chr; 
} Fconv; 
extern	void	strconv(char*, Fconv*); 
extern	int	numbconv(void*, Fconv*); 
1990/0614    
extern	char	*doprint(char*, char*, char*, void*); 
1990/0227    
extern	int	fmtinstall(char, int (*)(Op*)); 
1992/1024    
extern	int	fmtinstall(int, int (*)(void*, Fconv*)); 
1990/0227    
extern	int	sprint(char*, char*, ...); 
extern	int	print(char*, ...); 
1991/1011    
 


source code copyright © 1990-2005 Lucent Technologies; see license
Plan 9 distribution
comments to russ cox (rsc@swtch.com)