Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

pgm(3)

ppm(3)

pnm(3)  —  C LIBRARY FUNCTIONS

NAME

pnm - functions to support portable anymap programs

SYNOPSIS

#include <pbm.h>
cc ... libpbm.a

DESCRIPTION

MESSAGE MANAGEMENT

char ∗pm_progname;

This variable should be set at the beginning of all programs to point to argv[0].

void
pm_message( fmt, ... )
char ∗fmt;

Use this function to write an informational message.

void
pm_error( fmt, ... )
char ∗fmt;

Use this function to write an error message (and exit).

void
pm_usage( usage )
char ∗usage;

Use this function to write a usage message. The string should indicate what arguments are to be provided to the program.

GENERIC FILE MANAGEMENT

FILE ∗
pm_openr( name )
char ∗name;

Open the given file for reading, with appropriate error checking. A filename of “-” is taken as equivalent to stdin.

void
pm_close( f )
FILE ∗f;

Close the file descriptor, with appropriate error checking.

SEE ALSO

pgm(3), ppm(3)

AUTHOR

Manual by Tony Hansen. 
 
Copyright (C) 1989 by Jef Poskanzer.
 
Permission to use, copy, modify, and distribute this software and its documentation for any purpose and without fee is hereby granted, provided that the above copyright notice appear in all copies and that both that copyright notice and this permission notice appear in supporting documentation.  This software is provided "as is" without express or implied warranty.
 

Amiga Unix  —  Last change:

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026