File:  [LON-CAPA] / capa / capa51 / pProj / capalogineditor.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Sep 28 21:26:22 1999 UTC (24 years, 7 months ago) by albertel
Branches: capa
CVS tags: start
Created directory structure

/* gather subjective answers from student */

#define    BS    8
#define    DEL   127
#define    ESC   27

#define    COLON 58

#define EDIT_HEIGHT 21
#define EDIT_WIDTH 80

void init_editor(char*** sbuf_pp)
{
  int   ww=EDIT_WIDTH, hh=EDIT_HEIGHT,i;
  *sbuf_pp = (char **)capa_malloc(sizeof(char *),hh);
  for(i=0;i<hh;i++) {
    *sbuf_pp[i] = (char *)capa_malloc(sizeof(char)*ww+1,1);
  }
}

int handle_keystrokes_editor(char** sbuf_pp)
{
}

int editor(char*** sbuf_pp)
{
  init_editor(sbuf_pp);
  return handle_keystrokes_editor(*sbuf_pp);
}

void
answer_subjective(student_number,set,section,prob)
char  *student_number; 
int    set; 
int   *section;
int    prob;
{
  char **sbuf_pp;

  if (editor(&sbuf_pp)) {
    /*turn sbuf_pp into one string and store subjective*/
  }
}

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