This repository has been archived by the owner on Nov 22, 2023. It is now read-only.
forked from gek169/seabass
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdata.h
715 lines (620 loc) · 19.5 KB
/
data.h
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
#ifndef DATA_H
#define DATA_H
/*
DATA.H
defines the data structures needed during compilation of a cbas program into either IR or target code.
*/
#include "targspecifics.h"
#include <stdlib.h>
#include "parser.h"
enum {
BASE_VOID=0,
BASE_U8=1,
BASE_I8=2,
BASE_U16=3,
BASE_I16=4,
BASE_U32=5,
BASE_I32=6,
BASE_U64=7,
BASE_I64=8,
BASE_F32=9,
BASE_F64=10,
BASE_STRUCT=11,
BASE_FUNCTION=12,
NBASETYPES=13
};
static inline uint64_t type_promote(uint64_t a, uint64_t b){
uint64_t promoted_basetype = a;
uint64_t weaker_basetype = b;
if(
(b >= BASE_STRUCT) ||
(a >= BASE_STRUCT)
){
puts("INTERNAL ERROR! Tried to promote struct or bigger!");
exit(1);
}
if(b == BASE_VOID ||
a == BASE_VOID){
puts("INTERNAL ERROR! Tried to promote void!");
exit(1);
}
if(b > a){
promoted_basetype = b;
weaker_basetype = a;
}
if(
promoted_basetype == BASE_U8 ||
promoted_basetype == BASE_U16 ||
promoted_basetype == BASE_U32 ||
promoted_basetype == BASE_U64
)
if(
weaker_basetype == BASE_I8 ||
weaker_basetype == BASE_I16 ||
weaker_basetype == BASE_I32 ||
weaker_basetype == BASE_I64
)
promoted_basetype++; //become signed.
return promoted_basetype;
}
/*the "type" struct.*/
typedef struct type{
uint64_t basetype; /*value from the above enum. Not allowed to be BASE_FUNCTION.*/
uint64_t pointerlevel;
uint64_t arraylen;
uint64_t structid; /*from the list of typedecls.*/
uint64_t is_lvalue;
uint64_t funcid; /*if this is a function, what is the function ID? From the list of symdecls.*/
uint64_t is_function; /*
is this a function? if this is set,
all the "normal" type information here is
interpreted as describing the
return type.
*/
char* membername; /*used for struct members and function arguments*/
}type;
typedef struct{
char* name;
struct type* members;
uint64_t nmembers;
uint64_t is_incomplete; /*incomplete struct declaration*/
uint64_t is_noexport;
uint64_t is_union;
uint64_t algn; //alignment
} typedecl;
//Metadata on a typedecl which tells us how it behaves in OOP land.
typedef struct typedecl_oop_metadata{
int64_t ctor_id; //what is its ctor_id? -1 if it doesn't exist.
int64_t dtor_id; //same thing again...
int64_t have_checked; //have we actually checked to see if this type has type metadata?
} typedecl_oop_metadata;
extern typedecl_oop_metadata* oop_metadata;
uint64_t push_empty_metadata();
void update_metadata(uint64_t declid);
/*Functions and Variables.*/
typedef struct{
type t;
char* name;
type* fargs[MAX_FARGS]; /*function arguments*/
uint64_t nargs; /*Number of arguments to function*/
void* fbody; /*type is scope*/
uint8_t* cdata;
uint64_t cdata_sz;
uint64_t is_pub;
uint64_t is_incomplete; /*incomplete symbol, such as a predeclaration or extern.*/
uint64_t is_codegen; /*Compiletime only?*/
uint64_t is_impure; /*exactly what it says*/
uint64_t is_pure;
uint64_t is_inline;
uint64_t is_atomic; /*only for global variables.*/
uint64_t is_volatile; /*again, only for global variables.*/
uint64_t is_impure_globals_or_asm; /*contains impure behavior.*/
uint64_t is_impure_uses_incomplete_symbols; /*uses incomplete symbols.*/
uint64_t is_data; /*only set for data.*/
uint64_t is_noexport;
} symdecl;
typedef struct{
type t;
} symdecl_astexec;
static inline int sym_is_method(symdecl* s){
if(s->t.is_function == 0) return 0;
if(s->fargs[0] == NULL) return 0;
if(s->fargs[0]->membername == NULL) return 0;
if(streq(s->fargs[0]->membername, "this")){
if(s->fargs[0]->pointerlevel == 1)
if(s->fargs[0]->basetype == BASE_STRUCT)
return 1;
}
return 0;
}
typedef struct scope{
symdecl* syms;
uint64_t nsyms;
void* stmts; /**/
uint64_t nstmts;
uint64_t is_fbody;
uint64_t is_loopbody;
} scope;
typedef struct{
symdecl_astexec* syms;
uint64_t nsyms;
void* stmts; /**/
uint64_t nstmts;
} scope_astexec;
enum{
STMT_BAD=0,
STMT_NOP=1, /*of the form ;, also generated after every single 'end' so that a loop */
STMT_EXPR=2,
STMT_LABEL=3,
STMT_GOTO=4,
STMT_WHILE=5,
STMT_FOR=6,
STMT_IF=7,
STMT_ELIF=8,
STMT_ELSE=9,
STMT_RETURN=10,
STMT_TAIL=11,
STMT_ASM=12,
STMT_CONTINUE=13,
STMT_BREAK=14,
STMT_SWITCH=15,
NSTMT_TYPES
};
#define STMT_MAX_EXPRESSIONS 3
typedef struct stmt{
scope* whereami; /*scope this statement is in. Not owning.*/
scope* myscope; /*if this statement has a scope after it (while, for, if, etc) then this is where it goes.*/
uint64_t kind; /*What type of statement is it?*/
/*expressions belonging to this statement.*/
void* expressions[STMT_MAX_EXPRESSIONS];
uint64_t nexpressions;
struct stmt* referenced_loop; /*
break and continue reference
a loop construct that they reside in.
What loop exactly has to be determined in a second pass,
since the stmt lists are continuously re-alloced.
Goto also uses this, for its jump target.
*/
uint64_t symid; /*for tail.*/
char* referenced_label_name; /*goto gets a label. tail gets a function*/
char** switch_label_list;
uint64_t* switch_label_indices; /**/
uint64_t switch_nlabels; /*how many labels does the switch have in it?*/
int64_t goto_scopediff; /*how many scopes deep does this go?*/
int64_t goto_vardiff; /*How many local variables have to be popped to achieve the context switch?*/
int64_t goto_where_in_scope; /*What exact statement are we going to?*/
uint64_t linenum;
uint64_t colnum;
char* filename;
} stmt;
typedef struct{
scope_astexec* whereami; /*scope this statement is in. Not owning.*/
scope_astexec* myscope; /*if this statement has a scope after it (while, for, if, etc) then this is where it goes.*/
uint64_t kind; /*What type of statement is it?*/
/*expressions belonging to this statement.*/
void* expressions[STMT_MAX_EXPRESSIONS];
uint64_t nexpressions;
struct stmt* referenced_loop; /*
break and continue reference
a loop construct that they reside in.
What loop exactly has to be determined in a second pass,
since the stmt lists are continuously re-alloced.
Goto also uses this, for its jump target.
*/
uint64_t symid; /*for tail.*/
char* referenced_label_name; /*goto gets a label. tail gets a function*/
char** switch_label_list;
uint64_t* switch_label_indices; /**/
uint64_t switch_nlabels; /*how many labels does the switch have in it?*/
/*Used for error printing...*/
int64_t goto_scopediff; /*how many scopes deep does this go?*/
int64_t goto_vardiff; /*How many local variables have to be popped to achieve the context switch?*/
int64_t goto_where_in_scope; /*What exact statement are we going to?*/
} stmt_astexec;
enum{
/*
LIST OF EXPRESSION TYPES
*/
//The slash-slash comments indicate the VM implementation status.
//They will be removed when I am done with the VM's expression executor.
EXPR_BAD=0,
EXPR_BUILTIN_CALL=1, //DONE
EXPR_FCALL=2, //DONE
EXPR_SIZEOF=3, //DONE
EXPR_INTLIT=4, //DONE
EXPR_FLOATLIT=5, //DONE
EXPR_STRINGLIT=6, //DONE (after lsym and gsym)
EXPR_LSYM=7, //DONE
EXPR_GSYM=8, //DONE
EXPR_SYM=9, //E_WONTFIX
/*unary postfix operators*/
EXPR_POST_INCR=10, //DONE
EXPR_POST_DECR=11, //DONE
EXPR_INDEX=12, //DONE
EXPR_MEMBER=13, //DONE
EXPR_METHOD=14, //DONE
/*unary prefix operators*/
EXPR_CAST=15, //DONE
EXPR_NEG=16, //DONE
EXPR_COMPL=17, //DONE
EXPR_NOT=18, //DONE
EXPR_PRE_INCR=19, //DONE
EXPR_PRE_DECR=20, //DONE
/*binary operators starting at the bottom*/
EXPR_MUL=21, //DONE
EXPR_DIV=22, //DONE
EXPR_MOD=23, //DONE
EXPR_ADD=24, //DONE
EXPR_SUB=25, //DONE
EXPR_BITOR=26, //DONE
EXPR_BITAND=27, //DONE
EXPR_BITXOR=28, //DONE
EXPR_LSH=29, //DONE
EXPR_RSH=30, //DONE
EXPR_LOGOR=31, //DONE
EXPR_LOGAND=32, //DONE
EXPR_LT=33, //DONE
EXPR_GT=34, //DONE
EXPR_LTE=35, //DONE
EXPR_GTE=36, //DONE
EXPR_EQ=37, //DONE
EXPR_NEQ=38, //DONE
EXPR_ASSIGN=39, //DONE
EXPR_MOVE=40, //DONE
EXPR_CONSTEXPR_FLOAT=41, //DONE
EXPR_CONSTEXPR_INT=42, //DONE
EXPR_STREQ=43, //DONE
EXPR_STRNEQ=44, //DONE
EXPR_MEMBERPTR=45, //DONE
EXPR_GETFNPTR=46, //DONE
EXPR_CALLFNPTR=47, //DONE
EXPR_GETGLOBALPTR=48, //DONE
NEXPR_TYPES
};
typedef struct expr_node{
type t;
uint64_t kind;
double fdata;
uint64_t idata;
struct expr_node* subnodes[MAX_FARGS];
uint64_t symid;
uint64_t fnptr_nargs;
uint64_t constint_propagator; //for propagating constant integers
char* symname; /*if method: this is unmangled. */
char* method_name; /*if method: this is mangled. */
uint64_t is_global_variable;
uint64_t is_function;
uint64_t is_implied;
uint64_t was_struct_var;
type type_to_get_size_of; //sizeof and cast both use this.
}expr_node;
typedef struct expr_node_astexec{
type t;
uint64_t kind;
double fdata;
uint64_t idata;
struct expr_node_astexec* subnodes[MAX_FARGS];
uint64_t symid;
uint64_t fnptr_nargs;
uint64_t constint_propagator; //for propagating constant integers
char* symname; /*if method: this is unmangled. */
} expr_node_astexec;
static expr_node expr_node_init(){
expr_node ee = {0};
return ee;
}
static void expr_node_destroy(expr_node* ee){
uint64_t i;
for(i = 0; i < MAX_FARGS; i++){
if(ee->subnodes[i]){
expr_node_destroy(ee->subnodes[i]);
free(ee->subnodes[i]);
}
}
if(ee->symname)
free(ee->symname);
*ee = expr_node_init();
}
static stmt stmt_init(){
stmt s = {0};
return s;
}
static scope scope_init(){
scope s = {0};
return s;
}
static void scope_destroy(scope* s);
static void stmt_destroy(stmt* s){
uint64_t i;
for(i = 0; i < s->nexpressions; i++)
expr_node_destroy(s->expressions[i]);
if(s->myscope)
scope_destroy(s->myscope);
/*if(s->myscope2)
scope_destroy(s->myscope2);*/
if(s->referenced_label_name)
free(s->referenced_label_name);
*s = stmt_init();
}
#define MAX_TYPE_DECLARATIONS 65536
#define MAX_SYMBOL_DECLARATIONS 65536
#define MAX_SCOPE_DEPTH 65536
extern typedecl* type_table;
extern symdecl** symbol_table;
extern uint64_t* parsehook_table;
extern scope** scopestack;
extern stmt** loopstack;
extern uint64_t active_function; //What function are we currently working in? Used to get function arguments.
extern uint64_t ntypedecls;
extern uint64_t nsymbols;
extern uint64_t nscopes;
extern uint64_t nloops; /*Needed for identifying the parent loop.*/
extern uint64_t nparsehooks;
static inline scope* scopestack_gettop(){
return scopestack[nscopes-1];
}
static inline int peek_is_fname(){
if(peek()->data != TOK_IDENT) return 0;
if(nsymbols == 0) return 0;
for(unsigned long i = 0; i < nsymbols; i++){
if(streq(peek()->text, symbol_table[i]->name)){
if(symbol_table[i]->t.is_function)
return 1;
}
}
return 0;
}
static inline int str_is_fname(char* s){
for(unsigned long i = 0; i < nsymbols; i++){
if(streq(s, symbol_table[i]->name)){
if(symbol_table[i]->t.is_function)
return 1;
}
}
return 0;
}
static inline int ident_is_used_locally(char* s){
for(unsigned long i = 0; i < nscopes; i++)
for(unsigned long j = 0; j < scopestack[i]->nsyms; j++)
if(streq(s, scopestack[i]->syms[j].name))
return 1;
for(unsigned long i = 0;i < symbol_table[active_function]->nargs;i++){
if(streq(s, symbol_table[active_function]->fargs[i]->membername))
return 1;
}
return 0;
}
static inline int ident_forbidden_declaration_check(char* s){
for(unsigned long i = 0;i < symbol_table[active_function]->nargs;i++){
if(streq(s, symbol_table[active_function]->fargs[i]->membername))
return 1;
}
//for(unsigned long i = 0; i < nscopes; i++)
if(nscopes == 0)
return 0;
unsigned long i = nscopes - 1;
//loop!
for(unsigned long j = 0; j < scopestack[i]->nsyms; j++){
if(streq(s, scopestack[i]->syms[j].name))
return 1;
}
return 0;
}
/*Used during initial-pass parsing for error checking. It is insufficient to prevent duplicate labels in a function, ala:
fn myFunc():
:myLabel2
if(1)
:myLabel //I see nothing!
end
if(1)
:myLabel //I see nothing as well!
end
while(0)
:myLabel //Wow, there are a lot of us!
end
end
static inline int label_name_is_already_in_use(char* s){
for(unsigned long i = 0; i < nscopes; i++)
for(unsigned long j = 0; j < scopestack[i]->nstmts; j++){
stmt* in_particular = ((stmt*)scopestack[i]->stmts) + j;
if( in_particular->kind == STMT_LABEL)
if( in_particular->referenced_label_name )
if(streq(s, in_particular->referenced_label_name)) return 1;
}
return 0;
}
*/
static inline void scopestack_push(scope* s){
scopestack = realloc(scopestack, (++nscopes) * sizeof(scope*));
scopestack[nscopes-1] = s;
}
static inline void scopestack_pop(){
if(nscopes == 0)
parse_error("Tried to pop scope when there was none to pop!");
nscopes--;
}
static inline void loopstack_push(stmt* s){
loopstack = realloc(loopstack, (++nloops) * sizeof(stmt*));
loopstack[nloops-1] = s;
}
static inline void loopstack_pop(){
if(nloops == 0)
parse_error("Tried to pop loop when there was none to pop!");
nloops--;
}
static inline int type_can_be_assigned_integer_literal(type t){
if(t.arraylen) return 0;
if(t.pointerlevel) return 1;
if(t.basetype == BASE_VOID) return 0;
if(t.basetype >= BASE_STRUCT) return 0;
return 1;
}
static inline int type_can_be_assigned_float_literal(type t){
if(t.arraylen) return 0;
if(t.pointerlevel) return 1;
if(t.basetype == BASE_VOID) return 0;
if(t.basetype >= BASE_STRUCT) return 0;
return 1;
}
static inline int type_should_be_assigned_float_literal(type t){
if(t.arraylen) return 0;
if(t.pointerlevel) return 0;
if(t.basetype == BASE_F64 ||
t.basetype == BASE_F32) return 1;
return 0;
}
static inline int peek_ident_is_already_used_globally(){
uint64_t i;
if(peek()->data != TOK_IDENT) return 0;
for(i = 0; i < nsymbols; i++)
if(streq(peek()->text, symbol_table[i]->name))
return 1;
if(peek_is_typename()) return 1;
return 0;
}
static inline int ident_is_already_used_globally(char* name){
uint64_t i;
for(i = 0; i < nsymbols; i++)
if(
streq(name,
symbol_table[i]->name
)
)
return 1;
for(i = 0; i < ntypedecls; i++)
if(streq(name, type_table[i].name))
return 1;
return 0;
}
static inline int type_can_be_in_expression(type t){
if(t.arraylen > 0) return 0;
if(t.pointerlevel > 0) return 1;
if(t.basetype >= BASE_STRUCT) return 0;
return 1;
}
static inline int type_can_be_literal(type t){
if(t.arraylen > 0) return 0;
if(t.pointerlevel > 0) return 0;
if(t.basetype >= BASE_STRUCT) return 0;
if(t.basetype == BASE_VOID) return 0;
return 1;
}
static inline int type_can_be_variable(type t){
if(t.is_function) return 0; /*You may not declare a variable whose type is a function. Functions are functions, not variables!*/
if(t.basetype == BASE_VOID && t.pointerlevel == 0) return 0; /*You may not declare a variable whose type is void.*/
if(t.basetype == BASE_STRUCT){
if(t.structid >= ntypedecls) /*You may not have an invalid struct ID.*/
return 0;
}
if(t.basetype > BASE_STRUCT) return 0; /*invalid basetype*/
if(t.pointerlevel > 65536) return 0; /*May not declare more than 65536 levels of indirection. Mostly as a sanity check.*/
if(t.arraylen && t.is_lvalue) return 0; /*Arrays are never lvalues.*/
/*Otherwise: Yes. it is valid.*/
return 1;
}
static inline uint64_t type_getsz(type t){
if(t.arraylen){
type q = {0};
q = t;
q.arraylen = 0;
return t.arraylen * type_getsz(q);
}
if(t.pointerlevel) return POINTER_SIZE;
if(t.basetype == BASE_STRUCT){
unsigned long sum = 0;
if(t.structid > ntypedecls)
parse_error("Asked to determine size of non-existent struct type?");
/*go through the members and add up how big each one is.*/
if(type_table[t.structid].is_union){
unsigned long tt;
for(unsigned long i = 0; i < type_table[t.structid].nmembers;i++){
tt = type_getsz(type_table[t.structid].members[i]);
if(tt > sum)
sum = tt;
}
}else {
for(unsigned long i = 0; i < type_table[t.structid].nmembers;i++)
sum += type_getsz(type_table[t.structid].members[i]);
}
return sum;
}
if(t.basetype == BASE_U8) return 1;
if(t.basetype == BASE_I8) return 1;
if(t.basetype == BASE_U16) return 2;
if(t.basetype == BASE_I16) return 2;
if(t.basetype == BASE_U32) return 4;
if(t.basetype == BASE_I32) return 4;
if(t.basetype == BASE_F32) return 4;
if(t.basetype == BASE_U64) return 8;
if(t.basetype == BASE_I64) return 8;
if(t.basetype == BASE_F64) return 8;
if(t.basetype == BASE_VOID) return 0;
return 0;
}
static inline type type_init(){
type t = {0};
return t;
}
static inline void type_destroy(type* t){
/*always free membername...*/
if(t->membername) free(t->membername);
*t = type_init();
}
static inline symdecl symdecl_init(){
symdecl s = {0}; return s;
}
static inline void symdecl_destroy(symdecl* t){
unsigned long i;
type_destroy(&t->t);
for(i = 0; i < MAX_FARGS; i++){
if(t->fargs[i]){
type_destroy(t->fargs[i]);
free(t->fargs[i]);
t->fargs[i] = NULL;
}
}
if(t->name)free(t->name);
if(t->fbody) scope_destroy(t->fbody);
if(t->cdata) free(t->cdata);
*t = symdecl_init();
}
static inline typedecl typedecl_init(){
typedecl s = {0}; return s;
}
/*Type declarations */
static inline void typedecl_destroy(typedecl* t){
/*Type declarations own BOTH fargs and members.*/
if(t->members){
for(size_t i = 0; i < t->nmembers; i++)
type_destroy(t->members + i);
free(t->members);
}
if(t->name)free(t->name);
*t = typedecl_init();
}
static void scope_destroy(scope* s){
if(s->syms){
for(unsigned long i = 0; i < s->nsyms; i++)
symdecl_destroy(&s->syms[i]);
free(s->syms);
}
for(unsigned long i = 0; i < s->nstmts; i++)
stmt_destroy(s->stmts+i);
*s = scope_init();
return;
}
static inline int peek_match_keyw(char* s){
if(peek() == NULL) return 0;
if(peek()->data != TOK_KEYWORD) return 0;
return (ID_KEYW(peek()) == ID_KEYW_STRING(s));
}
static inline int strll_match_keyw(strll* i, char* s){
if(i->data != TOK_KEYWORD) return 0;
return (ID_KEYW(i) == ID_KEYW_STRING(s));
}
type parse_type();
//for using uptr...
void set_is_codegen(int);
int get_is_codegen();
void print_manpage(char* subject);
#endif