Plan 9 from Bell Labs’s /usr/web/sources/contrib/quanstro/ll/ll.h

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#include	<u.h>
#include	<libc.h>
#include	<bio.h>
#include	"../ll/elf.h"

enum
{
	NHASH		= 10007,
	NHUNK		= 100000,
	STRINGSZ	= 200,
	MINLC		= 1,
	MAXIO		= 6*8192,
	MAXHIST		= 20,				/* limit of path elements for history symbols */
};

extern	char	thechar;
extern	char*	thestring;

#ifndef	EXTERN
#define	EXTERN	extern
#endif

EXTERN	vlong	HEADR;
EXTERN	int	HEADTYPE;
EXTERN	vlong	INITDAT;
EXTERN	char*	INITENTRY;		/* entry point */
EXTERN	vlong	INITRND;
EXTERN	vlong	INITTEXT;
EXTERN	vlong	INITTEXTP;
EXTERN	long	bsssize;
EXTERN	int	cbc;
EXTERN	char*	cbp;
EXTERN	int	cout;
EXTERN	vlong	datsize;
EXTERN	char	debug[128];
EXTERN	char*	hunk;
EXTERN	long	lcsize;
EXTERN	int	nerrors;
EXTERN	long	nhunk;
EXTERN	char*	outfile;
EXTERN	long	spsize;
EXTERN	long	symsize;
EXTERN	vlong	textsize;
EXTERN	long	thunk;

EXTERN union
{
	struct
	{
		char	obuf[MAXIO];			/* output buffer */
		uchar	ibuf[MAXIO];			/* input buffer */
	} u;
	char	dbuf[1];
} buf;

#define	cbuf	u.obuf
#define	xbuf	u.ibuf

void	gethunk(void);
void*	mysbrk(usize);
void	errorexit(void);
void	strnput(char*, int);
void	cflush(void);
vlong	entryvalue(void);
void	wput(long);
void	wputl(long);
void	llput(vlong v);
void	llputl(vlong v);
void	lput(long);
void	lputl(long);
void	cput(uint);
vlong	atolwhex(char*);

/* implementation */
void	diag(char*, ...);

#pragma	varargck	argpos	diag 1

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.