Bontiv-Sourceer source code viewer
Root | Help
./web-crawler/src/tplcp/main.h
/*
Main header
*/

#ifndef H_MAIN
#define H_MAIN 1

#include "strct.h"
#include "auto.h"
#include "interpret.h"
#include "compile.h"
#include <stdio.h>

typedef struct args_s *ARGS;
typedef struct file_list_s *FILES;

#define DEBUG_FLAG 1
#define INTERPRET_FLAG 2
#define COMPILE_FLAG 4
#define FILE_FLAG 8
#define OUTPUT_FLAG 16

#define GCC "gcc -c /tmp/code.c -o /tmp/code.o "

struct file_list_s {
  FILE* file;
  char* name;
  FILES next;
};

struct args_s {
  int flags;
  FILES file;
  FILE* output;
  char* cflags;
  tpl_data data;
};

ARGS parsearg(int argc, char* argv[]);
void addfile(ARGS arg, char* file);
void exec_page(ARGS args, FILE* input, char* page);
void main(int argc, char* argv[]);
char* stream2buffer(FILE* stream, size_t* len);

#endif // H_MAIN
Presented with Bontiv-Sourceer