Indexcdds_addaxis cdds_align cdds_axis_prod cdds_binfd cdds_calloc cdds_check cdds_close cdds_closepr cdds_closepr2 cdds_copy cdds_count cdds_datadefn cdds_dict cdds_errors cdds_fflush cdds_free cdds_genus cdds_get cdds_history cdds_in cdds_index cdds_info cdds_initmpi cdds_initmpix cdds_initopenmp cdds_isreg cdds_key cdds_lseek cdds_lseek8 cdds_malloc cdds_map cdds_member cdds_memuse cdds_mod cdds_name cdds_newer cdds_next cdds_object cdds_offset cdds_open cdds_openm cdds_openpr cdds_out cdds_parent cdds_prec cdds_prev cdds_prime cdds_printf cdds_printt cdds_printv cdds_prtcon cdds_prterr cdds_prthdr cdds_prtmsg cdds_put cdds_read cdds_readm cdds_realloc cdds_rmaxis cdds_savepr cdds_scale cdds_scanf cdds_scank cdds_scant cdds_scantn cdds_scanv cdds_switch cdds_write cdds_writem setargcv
|
cdds_openpr - open printout file
SYNOPSIS
#include "cdds.h"
int cdds_openpr(pname, id);
-
const char *pname
const char *id
[ Description
| Examples
]
DESCRIPTION
cdds_openpr() first checks the command line for a user request
of online help via the help= switch using
cdds_switch. If help is requested, a standard header is written
to the console and the return value is 1 (or 2 if non-DDS command
arguments are present). Otherwise, a unique print file is opened up,
a standard header is written to it, and the return value is 0.
The print file is created using the program name, pname.
If the file cannot be opened, the return value is -1.
If a file is already opened, the return value is -2.
The standard header is written by cdds_prthdr() using the
program name, pname, and RCS Id, id (see NOTE on RCS).
The other print routines can write to this print file.
NOTE: The RCS Id is a Revision Control Sysem keyword
(CVS, RCS or Subversion). However, this parameters is really no
longer used if the DDS Application makefiles are used. Instead,
a svn_version.c file is created in the object directory and built
into the code with the current subversion revision number.
That way the revision number in the code will always reflect
the latest revision number in the repository.
ier=cdds_openpr("filt", "$Id: openpr.html 57 2009-02-11 23:09:37Z ehlersjw $");
if (ier != 0) help();
...
cdds_prterr("illegal value=%f\n", value);
...
cdds_prtmsg("offset = %d\nangle =%f\n", ofst, angle);
...
if(!cdds_errors()) {
...
cdds_prtcon("%d% complete\n", pct);
}
...
cdds_closepr();
SEE ALSO
cdds_prtmsg print message
cdds_prtcon print message to console
cdds_prterr print error message
cdds_errors check for print errors
cdds_closepr close out & termination
AUTHOR
Jerry Ehlers, BP America (May 2003)
|