SCCS-vsn: local/ditroff/ditroff.old.okeeffe/gremlin.aed/gremlin/gremlin.h 1.2
SCCS-vsn: local/ditroff/ditroff.old.okeeffe/gremlin.aed/gremlin/long1.c 1.2
SCCS-vsn: local/ditroff/ditroff.old.okeeffe/gremlin.aed/gremlin/long2.c 1.2
SCCS-vsn: local/ditroff/ditroff.old.okeeffe/gremlin.aed/gremlin/main.c 1.2
SCCS-vsn: local/ditroff/ditroff.old.okeeffe/gremlin.aed/gremlin/menu.c 1.2
SCCS-vsn: local/ditroff/ditroff.old.okeeffe/gremlin.aed/gremlin/path.c 1.2
SCCS-vsn: local/ditroff/ditroff.old.okeeffe/gremlin.aed/gremlin/point.c 1.2
SCCS-vsn: local/ditroff/ditroff.old.okeeffe/gremlin.aed/gremlin/short.c 1.2
+/* @(#)gremlin.h 1.2 %G%
*
*
* This file contains standard definitions used by the gremlin program.
*
*
* This file contains standard definitions used by the gremlin program.
*
* Copyright -C- 1982 Barry S. Roitblat
*
*
* Copyright -C- 1982 Barry S. Roitblat
*
/* The following are defined to allow creation of the command
* lookup table.
*/
/* The following are defined to allow creation of the command
* lookup table.
*/
LGWrite, /* write file */
LGPoint}; /* create point from cursor */
LGWrite, /* write file */
LGPoint}; /* create point from cursor */
int
LGLookup(str, table, next)
char str[]; /* Pointer to a string to be looked up */
int
LGLookup(str, table, next)
char str[]; /* Pointer to a string to be looked up */
LGCommand(command)
char *command;
LGCommand(command)
char *command;
if (index == -2) error("not a command.");
}
}
if (index == -2) error("not a command.");
}
}
static char badarg[10] = "bad args";
static char noset[15] = "no current set";
static char badarg[10] = "bad args";
static char noset[15] = "no current set";
return(result);
} /* end GetNumParm */
return(result);
} /* end GetNumParm */
LGOpoint(line)
char *line;
/*
LGOpoint(line)
char *line;
/*
LGPoint(line);
} /* end LGOpoint */
LGPoint(line);
} /* end LGOpoint */
LGPoint(line)
char *line;
/*
LGPoint(line)
char *line;
/*
GRBlankPoints();
} /* end CP */
GRBlankPoints();
} /* end CP */
LGClearPoints(line)
char *line;
/*
LGClearPoints(line)
char *line;
/*
Consume = FALSE;
} /* end DeletePoint */
Consume = FALSE;
} /* end DeletePoint */
LGShowPoints(line)
char *line;
/*
LGShowPoints(line)
char *line;
/*
Consume = FALSE;
} /* end ShowPoints */
Consume = FALSE;
} /* end ShowPoints */
LGText(line)
char *line;
/* This routine implements the text commands. It first looks
LGText(line)
char *line;
/* This routine implements the text commands. It first looks
LGBrush(line)
char *line;
/*
LGBrush(line)
char *line;
/*
LGMBrush(line)
char *line;
/*
LGMBrush(line)
char *line;
/*
CHANGED = TRUE;
} /* end MBrush */
CHANGED = TRUE;
} /* end MBrush */
LGMFont(line)
char *line;
/*
LGMFont(line)
char *line;
/*
CHANGED = TRUE;
} /* end MFont */
CHANGED = TRUE;
} /* end MFont */
LGMSize(line)
char *line;
/*
LGMSize(line)
char *line;
/*
CHANGED = TRUE;
} /* end MSize */
CHANGED = TRUE;
} /* end MSize */
LGMText(line)
char *line;
/* This routine allows modification of text by replacing
LGMText(line)
char *line;
/* This routine allows modification of text by replacing
} /* end while */
CHANGED = TRUE;
} /* end LGMText */
} /* end while */
CHANGED = TRUE;
} /* end LGMText */
LGMPoint(line)
char *line;
/*
LGMPoint(line)
char *line;
/*
} /* end if !DBNullelt */
} /* end MPOINT */
} /* end if !DBNullelt */
} /* end MPOINT */
LGGripe(line)
char *line;
/*
LGGripe(line)
char *line;
/*
Consume = FALSE;
} /* end Little Point */
Consume = FALSE;
} /* end Little Point */
SetOrient(orient)
int orient;
/*
SetOrient(orient)
int orient;
/*
SHUpdate();
} /* end Orient */
SHUpdate();
} /* end Orient */
LGSave(line)
char *line;
/*
LGSave(line)
char *line;
/*
*
* Copyright -C- 1982 Barry S. Roitblat
*
*
* Copyright -C- 1982 Barry S. Roitblat
*
static char badarg[10] = "bad args";
static char badarg[10] = "bad args";
LGFont(line)
char *line;
/*
LGFont(line)
char *line;
/*
LGJust(line)
char *line;
/*
LGJust(line)
char *line;
/*
LGSize(line)
char *line;
/*
LGSize(line)
char *line;
/*
Consume = FALSE;
} /* end LGAlign */
Consume = FALSE;
} /* end LGAlign */
LGIncludeSet(line)
char *line;
/*
LGIncludeSet(line)
char *line;
/*
LGMenu(line)
char *line;
/*
LGMenu(line)
char *line;
/*
CHANGED = TRUE;
} /* end LGMenu */
CHANGED = TRUE;
} /* end LGMenu */
LGRead(line)
char *line;
/*
LGRead(line)
char *line;
/*
CHANGED = TRUE;
} /* end LGRead */
CHANGED = TRUE;
} /* end LGRead */
LGEdit(line)
char *line;
/*
LGEdit(line)
char *line;
/*
BACKPOINT = pl1;
} /* end restorepoints */
BACKPOINT = pl1;
} /* end restorepoints */
LGUndo(line)
char *line;
/*
LGUndo(line)
char *line;
/*
Consume = FALSE;
} /* LGUndo */
Consume = FALSE;
} /* LGUndo */
LGWrite(line)
char *line;
/*
LGWrite(line)
char *line;
/*
(void) fclose(fp);
} /* end LGWrite */;
(void) fclose(fp);
} /* end LGWrite */;
LGQuit(line)
char *line;
/*
LGQuit(line)
char *line;
/*
LGVAdjust()
/*
* Vertical adjust -
LGVAdjust()
/*
* Vertical adjust -
static sign(x)
float x;
/*
static sign(x)
float x;
/*
CHANGED = TRUE;
} /* end LGMirror */
CHANGED = TRUE;
} /* end LGMirror */
LGPath(line)
char *line;
/*
LGPath(line)
char *line;
/*
*
* Copyright -C- 1982 Barry S. Roitblat
*
*
* Copyright -C- 1982 Barry S. Roitblat
*
main(argc, argv)
int argc;
char *argv[];
main(argc, argv)
int argc;
char *argv[];
OnCommand()
/*-----------------------------------------------------------------------------
OnCommand()
/*-----------------------------------------------------------------------------
- if (cmd != '\\f') putchar(cmd);
+ if (cmd != '\') putchar(cmd);
(void) fflush(stdout);
SHCommand(&cmd);
}
(void) fflush(stdout);
SHCommand(&cmd);
}
*
* Copyright -C- 1982 Barry S. Roitblat
*
*
* Copyright -C- 1982 Barry S. Roitblat
*
#define columns 2
#define border 395
#define columns 2
#define border 395
/* bytewise definitions of menu symbols (special fonts), left to right,
* top to bottom. See textcommand array for corresponding commands.
*/
/* bytewise definitions of menu symbols (special fonts), left to right,
* top to bottom. See textcommand array for corresponding commands.
*/
(void) fflush(display);
}; /* end Icon */
(void) fflush(display);
}; /* end Icon */
MNInitMenu(orientation)
int orientation; /* orientation of work space */
/*
MNInitMenu(orientation)
int orientation; /* orientation of work space */
/*
} /* end for */;
} /* end initmenu */
} /* end for */;
} /* end initmenu */
MNDisplayMenu()
/*
* This routine displays the menu defined by initmenu
MNDisplayMenu()
/*
* This routine displays the menu defined by initmenu
GRVector(&bord1, &bord2, bordstyle);
} /* end displaymenu */;
GRVector(&bord1, &bord2, bordstyle);
} /* end displaymenu */;
char *MNFindMenuItem(x,y)
int x, y;
/*
char *MNFindMenuItem(x,y)
int x, y;
/*
MNHighLt(sym, eraseany);
}
MNHighLt(sym, eraseany);
}
MNInterpretCursor(button, cx, cy)
int cx, cy, button;
/*
MNInterpretCursor(button, cx, cy)
int cx, cy, button;
/*
*
* Copyright -C- 1982 Barry S. Roitblat
*
*
* Copyright -C- 1982 Barry S. Roitblat
*
NULL, NULL, NULL, NULL, NULL};
static int discard = 0;
NULL, NULL, NULL, NULL, NULL};
static int discard = 0;
int
PConvertTilde(psource, pdest, size)
char **psource; /* Pointer to a pointer to the source string */
int
PConvertTilde(psource, pdest, size)
char **psource; /* Pointer to a pointer to the source string */
int
PSetPath(string)
char *string; /* Pointer to a string that is to become
int
PSetPath(string)
char *string; /* Pointer to a string that is to become
FILE *
POpen(file, prealname, search)
char *file; /* Name of the file to be opened. */
FILE *
POpen(file, prealname, search)
char *file; /* Name of the file to be opened. */
*
* Copyright -C- 1982 Barry S. Roitblat
*
*
* Copyright -C- 1982 Barry S. Roitblat
*
*
* Copyright -C- 1982 Barry S. Roitblat
*
*
* Copyright -C- 1982 Barry S. Roitblat
*
extern char *textpos[], *dispmode[];/* text positioning modes */
extern int textmode[]; /* text positioning */
extern char *textpos[], *dispmode[];/* text positioning modes */
extern int textmode[]; /* text positioning */
extern SHUpdate(), SHDrawArc(), SHDrawCurve(), SHCopy(), SHRedis(),
SHDefineSet(), SHErase(), SHSetArea(), SHGravity(),
SHGrid(), SHRotate(), SHScale(), SHTranslate(), SHShellEsc(),
extern SHUpdate(), SHDrawArc(), SHDrawCurve(), SHCopy(), SHRedis(),
SHDefineSet(), SHErase(), SHSetArea(), SHGravity(),
SHGrid(), SHRotate(), SHScale(), SHTranslate(), SHShellEsc(),
SHBox, /* rectangle from two points */
SHMAdjust}; /* manhattan adjust */
SHBox, /* rectangle from two points */
SHMAdjust}; /* manhattan adjust */
int
SHLookup(c, table)
char c; /* Pointer to a char to be looked up */
int
SHLookup(c, table)
char c; /* Pointer to a char to be looked up */
return(-1);
} /* end SHLookup */
return(-1);
} /* end SHLookup */
SHCommand(command)
char *command;
SHCommand(command)
char *command;
error("no such command");
}
} /* end SHCommand */
error("no such command");
}
} /* end SHCommand */
static char nopnt[18] = "not enough points";
static char noset[15] = "no current set";
static char nopnt[18] = "not enough points";
static char noset[15] = "no current set";
SHDrawCurve()
/*
* This routine creates and displays a curve using points previously
SHDrawCurve()
/*
* This routine creates and displays a curve using points previously
CHANGED = TRUE;
} /* end SHErase */
CHANGED = TRUE;
} /* end SHErase */
SHGravity()
/*
* This routine toggles the gravity mode.
SHGravity()
/*
* This routine toggles the gravity mode.
Consume = FALSE;
} /* end SHGrid */
Consume = FALSE;
} /* end SHGrid */
SHMAdjust()
/*
* Manhattan Adjust -
SHMAdjust()
/*
* Manhattan Adjust -
SHDefineSet()
/*
* This routine defines the current set based upon previously
SHDefineSet()
/*
* This routine defines the current set based upon previously
} /* end while */
} /* end SHSetArea */
} /* end while */
} /* end SHSetArea */
SHTranslate()
/*
* This routine translates the elements in the current set as defined
SHTranslate()
/*
* This routine translates the elements in the current set as defined
CHANGED = TRUE;
} /* end SHTranslate */
CHANGED = TRUE;
} /* end SHTranslate */
SHCopy()
/*
* This routine copies the elements in the current set as defined
SHCopy()
/*
* This routine copies the elements in the current set as defined
CHANGED = TRUE;
} /* end SHCopy */
CHANGED = TRUE;
} /* end SHCopy */
SHRotate()
/*
* This routine rotates the elements in the current set as defined
SHRotate()
/*
* This routine rotates the elements in the current set as defined
CHANGED = TRUE;
} /* end SHRotate */
CHANGED = TRUE;
} /* end SHRotate */
SHScale()
/*
* This routine scales the elements in the current set as defined
SHScale()
/*
* This routine scales the elements in the current set as defined
CHANGED = TRUE;
} /* end SHScale */
CHANGED = TRUE;
} /* end SHScale */
SHUpdate()
/*
* This routine redraws the graphics screen by clearing the screen ,
SHUpdate()
/*
* This routine redraws the graphics screen by clearing the screen ,
Consume = FALSE;
} /* end SHUpdate */
Consume = FALSE;
} /* end SHUpdate */
SHRedis()
/*
* This routine is used to redisplay the text screen.
SHRedis()
/*
* This routine is used to redisplay the text screen.
Consume = FALSE;
} /* end SHRedis */
Consume = FALSE;
} /* end SHRedis */
SHShellEsc()
/*
* This routine performs a shell escape through the c 'system'
SHShellEsc()
/*
* This routine performs a shell escape through the c 'system'
SHRedis(); /* reclaim terminal */
} /* end ShellEsc */
SHRedis(); /* reclaim terminal */
} /* end ShellEsc */
static savemen(sym)
int sym;
/*
static savemen(sym)
int sym;
/*
SHBox()
/*
* This routine creates and displays a rectangle whose diagonal is
SHBox()
/*
* This routine creates and displays a rectangle whose diagonal is