-
Notifications
You must be signed in to change notification settings - Fork 131
Expand file tree
/
Copy pathpp.h
More file actions
62 lines (52 loc) · 1.76 KB
/
pp.h
File metadata and controls
62 lines (52 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
/** \file pp.h
* for functions that are internal to exppp, not shared
*/
#ifndef PP_H
#define PP_H
#include <stdbool.h>
#include <express/symbol.h>
extern int indent2; /**< where continuation lines start */
extern int curpos; /**< current line position (1 is first position) */
extern const int NOLEVEL; /**< unused-level indicator */
extern Symbol error_sym; /**< only used when printing errors */
extern Error ERROR_select_empty;
extern FILE * exppp_fp;
extern bool first_line;
/** output a string, exactly as provided
* \sa wrap()
*/
void raw( const char * fmt, ... );
/** output a string, insert newlines to keep line length down
* TODO list globals this func uses
* \sa raw()
*/
void wrap( const char * fmt, ... );
/** convert a real into our preferred form compatible with 10303-11
* (i.e. decimal point is required; no trailing zeros)
* uses a static buffer, so NOT thread safe
* \param r the real to convert
* \returns const char pointer to static buffer containing ascii representation of real
*/
const char * real2exp( double r );
/** Break a long un-encoded string up, enclose in '', output via raw()
* if short, don't insert line breaks
* \param in the input string
*
* side effects: output via raw()
* reads globals indent2 and curpos
*/
void breakLongStr( const char * in );
int finish_buffer();
int minimum( int a, int b, int c );
int prep_buffer( char * buf, int len );
int prep_string();
void finish_file();
void first_newline();
void prep_file();
char * finish_string();
const char * real2exp( double r );
void exp_output( char * buf, unsigned int len );
void exppp_init();
void exppp_ref_info( Symbol * s );
extern char * placeholder;
#endif /* PP_H */