/*
- * $Id: pa.c,v 1.4 2001-06-29 14:14:46 rufustfirefly Exp $
+ * $Id: pa.c,v 1.6 2009-10-14 02:24:05 didg Exp $
*
* Copyright (c) 1990,1991 Regents of The University of Michigan.
* All Rights Reserved.
#include "pa.h"
-pa_buf_t *pa_init( fd )
- int fd;
+pa_buf_t *pa_init(int fd)
{
pa_buf_t *h;
int rc;
h->bufsz = PA_BUFBLK * 2;
if (( rc = read( fd, h->buf, PA_BUFBLK )) < 0 ) {
- return( 0 );
+ return( NULL );
}
h->cur = h->buf - 1;
return( h );
}
-char *pa_gettok( h )
- pa_buf_t *h;
+char *pa_gettok(pa_buf_t *h)
{
h->state = PA_NORMAL;
h->tmp = *(h->cur);
return( h->mark );
}
-char _pa_fixbuf( h )
- pa_buf_t *h;
+char _pa_fixbuf(pa_buf_t *h)
{
int rc;
char *t;