userprintf_rbox.c
Go to the documentation of this file.
00001 /*<html><pre>  -<a                             href="qh-user.htm"
00002   >-------------------------------</a><a name="TOP">-</a>
00003 
00004    userprintf_rbox.c
00005    qh_fprintf_rbox()
00006 
00007    see README.txt  see COPYING.txt for copyright information.
00008 
00009    If you recompile and load this file, then userprintf_rbox.o will not be loaded
00010    from qhull.a or qhull.lib
00011 
00012    See libqhull.h for data structures, macros, and user-callable functions.
00013    See user.c for qhull-related, redefinable functions
00014    see user.h for user-definable constants
00015    See usermem.c for qh_exit(), qh_free(), and qh_malloc()
00016    see Qhull.cpp and RboxPoints.cpp for examples.
00017 
00018    Please report any errors that you fix to qhull@qhull.org
00019 */
00020 
00021 #include "libqhull.h"
00022 
00023 #include <stdarg.h>
00024 #include <stdio.h>
00025 #include <stdlib.h>
00026 
00027 /*-<a                             href="qh-user.htm#TOC"
00028    >-------------------------------</a><a name="qh_fprintf_rbox">-</a>
00029 
00030    qh_fprintf_rbox(fp, msgcode, format, list of args )
00031      print arguments to *fp according to format
00032      Use qh_fprintf_rbox() for rboxlib.c
00033 
00034    notes:
00035      same as fprintf()
00036      fgets() is not trapped like fprintf()
00037      exit qh_fprintf_rbox via qh_errexit_rbox()
00038 */
00039 
00040 void qh_fprintf_rbox(FILE *fp, int msgcode, const char *fmt, ... ) {
00041     va_list args;
00042 
00043     if (!fp) {
00044         fprintf(stderr, "QH6231 Qhull internal error (userprintf.c): fp is 0.  Wrong qh_fprintf_rbox called.\n");
00045         qh_errexit_rbox(6231);
00046     }
00047     if (msgcode >= MSG_ERROR && msgcode < MSG_STDERR)
00048       fprintf(fp, "QH%.4d ", msgcode);
00049     va_start(args, fmt);
00050     vfprintf(fp, fmt, args);
00051     va_end(args);
00052 } /* qh_fprintf_rbox */
00053 


libqhull-ours
Author(s): Robert Krug
autogenerated on Mon Jan 6 2014 11:32:11