Sindbad~EG File Manager

Current Path : /usr/home/beeson/Otter-Lambda/yyy/
Upload File :
Current File : /usr/home/beeson/Otter-Lambda/yyy/wfile.h

#define MAXFILENAME 64    /* longer than the longest (non-path) filename */
#define TBOUND 300        /* see wfile.c for explanation   */
#ifdef _MAC
#define PATHCHAR ':'
#else
#define PATHCHAR '\\'
#endif

#define NEWLINE 10    /* On the Mac, lines are separated by linefeed only */
                      /* 13,10 separates lines on the PC */

typedef struct sl
  { char *data;
    struct sl *next;
  } strlist;    /* linked list of strings */

typedef struct
  { char number[4];       /* as assigned in file, need not be consecutive.
                             Digits optionally followed by a letter, 3 chars max. */
    char *formula;        /* must be parseable */
    strlist *comment;        /* author-supplied comment */
  } problem;

typedef struct
  { problem *problems;    /* dynamic array of problems   */
    int nproblems;        /* dimension of problems array */
    int currentproblem;   /* this one is to be worked on */
    char *filename;       /* source of the problems      */
    char *author;         /* for SOURCE_TEXTBOOK         */
    unsigned index:6;     /* identifying number, entered into
                             the 'homework' field of the docdata */
                          /* 6 bits ok as long as MAXHOMEWORKS <= 64 */
    unsigned  source:2;   /* SOURCE_MATHPERT, SOURCE_USER,
                             SOURCE_FILE, or SOURCE_TEXTBOOK */
    int inuse: 8;         /* number of documents using this hw */
    int top;              /* the topic that goes with this hw  */
  } homework;
int legal_filename(char *);
MEXPORT_GETPROB void destroy_homeworks(void);
MEXPORT_GETPROB homework *get_homework(int);
MEXPORT_GETPROB void init_session_history(void);
MEXPORT_GETPROB void add_new_problem(char *);
MEXPORT_GETPROB int set_homeworks(PDOCDATA, char *);  /* initialize homework in doc data */
/* if not NULL, the char * is treated as a problem file name to
   override the default Mathpert problem file for this topic. */
MEXPORT_GETPROB int load_hwfile(unsigned long hwnd, int *topic);
MEXPORT_GETPROB int remove_hw(unsigned long hwnd, int *removed);
MEXPORT_GETPROB void decrement_inuse(int); /* the int is a topic number */
MEXPORT_GETPROB int count_lines(HFILE hFile);
MEXPORT_GETPROB char *GetProblemNumber(PDOCDATA);
MEXPORT_GETPROB int get_nhomeworks(void);
MEXPORT_GETPROB void display_commentary(unsigned long hwnd);
/* display Author's Commentary using SymbolMessageBox */
MEXPORT_GETPROB int commentary_exists(unsigned long hwnd);
MEXPORT_GETPROB void read_problems(HFILE hFile, problem *problems, int *nproblems, int *topic);
MEXPORT_GETPROB int GetProblemFileTOC(HFILE hIndexFile, int c, char ans[MAXPATHLENGTH]);
MEXPORT_GETPROB int dead_topic(int c);
MEXPORT_GETPROB int open_specified_hwfile(char *szFile, int *topic);

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists