userprintf_rbox_r.c
Go to the documentation of this file.
1 /*<html><pre> -<a href="qh-user_r.htm"
2  >-------------------------------</a><a name="TOP">-</a>
3 
4  userprintf_rbox_r.c
5  qh_fprintf_rbox()
6 
7  see README.txt see COPYING.txt for copyright information.
8 
9  If you recompile and load this file, then userprintf_rbox_r.o will not be loaded
10  from qhull.a or qhull.lib
11 
12  See libqhull_r.h for data structures, macros, and user-callable functions.
13  See user_r.c for qhull-related, redefinable functions
14  see user_r.h for user-definable constants
15  See usermem_r.c for qh_exit(), qh_free(), and qh_malloc()
16  see Qhull.cpp and RboxPoints.cpp for examples.
17 
18  Please report any errors that you fix to qhull@qhull.org
19 */
20 
21 #include "libqhull_r.h"
22 
23 #include <stdarg.h>
24 #include <stdio.h>
25 #include <stdlib.h>
26 
27 /*-<a href="qh-user_r.htm#TOC"
28  >-------------------------------</a><a name="qh_fprintf_rbox">-</a>
29 
30  qh_fprintf_rbox(qh, fp, msgcode, format, list of args )
31  print arguments to *fp according to format
32  Use qh_fprintf_rbox() for rboxlib_r.c
33 
34  notes:
35  same as fprintf()
36  fgets() is not trapped like fprintf()
37  exit qh_fprintf_rbox via qh_errexit_rbox()
38 */
39 
40 void qh_fprintf_rbox(qhT *qh, FILE *fp, int msgcode, const char *fmt, ... ) {
41  va_list args;
42 
43  if (!fp) {
44  qh_fprintf_stderr(6231, "Qhull internal error (userprintf_rbox_r.c): fp is 0. Wrong qh_fprintf_rbox called.\n");
45  qh_errexit_rbox(qh, 6231);
46  }
47  if (msgcode >= MSG_ERROR && msgcode < MSG_STDERR)
48  fprintf(fp, "QH%.4d ", msgcode);
49  va_start(args, fmt);
50  vfprintf(fp, fmt, args);
51  va_end(args);
52 } /* qh_fprintf_rbox */
53 
Definition: libqhull.h:465
void qh_fprintf_stderr(int msgcode, const char *fmt,...)
Definition: usermem.c:57
#define MSG_ERROR
Definition: user.h:74
void qh_fprintf_rbox(qhT *qh, FILE *fp, int msgcode, const char *fmt,...)
void qh_errexit_rbox(int exitcode)
Definition: rboxlib.c:866
#define qh
Definition: libqhull.h:457
#define MSG_STDERR
Definition: user.h:76
fmt
Definition: obb.py:126


hpp-fcl
Author(s):
autogenerated on Fri Jun 2 2023 02:39:02