Diff for /loncom/homework/CAPA-converter/capaCommon.h between versions 1.1 and 1.6

version 1.1, 2000/04/12 20:06:16 version 1.6, 2001/11/18 09:40:45
Line 32 Line 32
 #include <sys/fcntl.h>    /* lockf()  */  #include <sys/fcntl.h>    /* lockf()  */
 #include <sys/file.h>     /* flock()  */  #include <sys/file.h>     /* flock()  */
 #include <sys/types.h>  #include <sys/types.h>
   #include <stdarg.h>
 #include "capaParser.h"  #include "capaParser.h"
   
 #ifndef    MAX  #ifndef    MAX
Line 138  typedef struct { Line 139  typedef struct {
   
 #define leap_years_since_year_1(yr)  ((yr) / 4 - centuries_since_1700(yr) + quad_centuries_since_1700(yr))  #define leap_years_since_year_1(yr)  ((yr) / 4 - centuries_since_1700(yr) + quad_centuries_since_1700(yr))
   
   struct dyn_string {
       int len;
       int max;
       char *str;
   };
   struct dyn_string dyn_out;
   struct dyn_string dyn_delayed;
   extern int dyn_maxlen;
   extern char *import_prefix;
   
   #define MAX_CACHE 100
   #define CACHE_ERROR 100
   extern struct dyn_string cached_data[MAX_CACHE];
   extern int current_cache;
   extern int do_cache[MAX_CACHE];
   
   #define MAX_STREAMS 100
   #define ALL_STREAMS -1
   extern struct dyn_string streams[MAX_STREAMS];
   extern int num_streams;
   
   int mode[MAX_STREAMS];
   #define MODE_NONE    0
   #define MODE_COMMENT 1
   #define MODE_BLOCK   2
   #define MODE_SCRIPT  3
   #define MODE_OUTTEXT 4
   #define MODE_ANSWER  5
   #define MODE_HINT    6
   #define MODE_IMPORT  7
   /* end_mode always sets this to 0, if you want to check if any other
      mode has been entered. Set this to 1 and check again if it has been
      set back to zero.
   */
   extern int watch_mode[MAX_STREAMS];
 /*=============================================================================*/  /*=============================================================================*/
 /* CAPA PROTOTYPES FOR FUNCTIONS IN COMMON.C                                   */  /* CAPA PROTOTYPES FOR FUNCTIONS IN COMMON.C                                   */
 /*=============================================================================*/  /*=============================================================================*/
 /*-----------------------------------------------------------------------------*/  /*-----------------------------------------------------------------------------*/
 int   capa_parse CAPA_ARG((int  set,Problem_t **problem,char *filename,int *num_questions,void (*func_ptr)()));  int capa_parse(int  set,Problem_t **problem,char *filename,int *num_questions,void (*func_ptr)());
 void  send CAPA_ARG((char* text));  void send(char* text,...);
   void end_mode(void);
   void end_mode_stream(int which);
   void start_mode(int newmode,char* args);
   void start_mode_stream(int which,int newmode,char* args);
   void dyn_init(struct dyn_string *dyn);
   void dyn_free(struct dyn_string *dyn);
   int append_message(struct dyn_string *dyn_msg,char *format,va_list ap);
   void add_delayed(char *format, ...);
   void flush_delayed();
   void start_delayed();
   void end_delayed();
   void send_stream(int which,char* text,...);
   void start_streams(int num);
   void end_streams(int which);
   void new_cache();
   void delete_cache();
   void start_cache();
   void stop_cache();
 /*============================================================================*/  /*============================================================================*/
   
 #endif  /* CAPA_COMMON_H  */  #endif  /* CAPA_COMMON_H  */

Removed from v.1.1  
changed lines
  Added in v.1.6


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>