/*
+ * $Id: psa.c,v 1.5 2009-10-13 22:55:37 didg Exp $
+ *
* Copyright (c) 1990,1995 Regents of The University of Michigan.
* All Rights Reserved. See COPYRIGHT.
- */
-
-/*
+ *
* PostScript Accounting, psa.
*
* psa is invoked by psf, as output for a communication program. The
#ifdef HAVE_CONFIG_H
#include "config.h"
-#endif
+#endif /* HAVE_CONFIG_H */
+#ifdef HAVE_UNISTD_H
+#include <unistd.h>
+#endif /* HAVE_UNISTD_H */
#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
-main( ac, av )
- int ac;
- char **av;
+int main( int ac, char **av)
{
FILE *af;
char *acc, *user, *host;
}
}
if ( cc != 0 && write( 2, buf, cc ) != cc ) {
- fprintf( stderr, "write 1: 2 %X %d\n", buf, cc );
+ fprintf( stderr, "write 1: 2 %p %d\n", buf, cc );
perror( "write" );
exit( 2 );
}