From 374ce9dcbe29dd7e22d2ccaf5c99b554995fb931 Mon Sep 17 00:00:00 2001 From: erg Date: Fri, 8 Apr 2005 20:45:34 +0000 Subject: [PATCH] Update with new lefty, fixing many bugs and supporting new features --- cmd/lefty/internal.h | 30 +++++++++++++------------- cmd/lefty/io.h | 51 +++++++++++++++++++++++--------------------- 2 files changed, 42 insertions(+), 39 deletions(-) diff --git a/cmd/lefty/internal.h b/cmd/lefty/internal.h index 9d3762bd7..677b8c211 100644 --- a/cmd/lefty/internal.h +++ b/cmd/lefty/internal.h @@ -1,6 +1,6 @@ /* $Id$ $Revision$ */ /* vim:set shiftwidth=4 ts=8: */ - + /********************************************************** * This software is part of the graphviz package * * http://www.graphviz.org/ * @@ -13,30 +13,30 @@ * Information and Software Systems Research * * AT&T Research, Florham Park NJ * **********************************************************/ - + #ifdef __cplusplus extern "C" { #endif - -/* Lefteris Koutsofios - AT&T Bell Laboratories */ +/* Lefteris Koutsofios - AT&T Labs Research */ #ifndef _INTERNAL_H #define _INTERNAL_H - typedef struct Ifunc_t { - char *name; - int (*func) (int, Tonm_t *); - int min, max; - } Ifunc_t; +typedef struct Ifunc_t { + char *name; + int (*func) (int, Tonm_t *); + int min, max; +} Ifunc_t; - void Iinit(void); - void Iterm(void); - int Igetfunc(char *); +void Iinit (void); +void Iterm (void); +int Igetfunc (char *); - extern Ifunc_t Ifuncs[]; - extern int Ifuncn; -#endif /* _INTERNAL_H */ +extern Ifunc_t Ifuncs[]; +extern int Ifuncn; +#endif /* _INTERNAL_H */ #ifdef __cplusplus } #endif + diff --git a/cmd/lefty/io.h b/cmd/lefty/io.h index cc940f38a..9ec288d74 100644 --- a/cmd/lefty/io.h +++ b/cmd/lefty/io.h @@ -18,27 +18,29 @@ extern "C" { #endif - -/* Lefteris Koutsofios - AT&T Bell Laboratories */ +/* Lefteris Koutsofios - AT&T Labs Research */ #ifndef _IO_H #define _IO_H - typedef enum { - IO_FILE, IO_PTY, IO_PIPE, IO_SOCKET, +#define IO_FILE 0 +#define IO_PTY 1 +#define IO_PIPE 2 +#define IO_SOCKET 3 #ifdef FEATURE_CS - IO_CS, +#define IO_CS 4 +#define IO_SIZE 5 +#else +#define IO_SIZE 4 #endif - IO_SIZE - } iotype_t; - typedef struct io_t { - int inuse, ismonitored; - iotype_t type; - FILE *ifp, *ofp; - int pid; - char *buf; - } io_t; +typedef struct io_t { + int inuse, ismonitored; + int type; + FILE *ifp, *ofp; + int pid; + char *buf; +} io_t; #ifdef FEATURE_MS #define IOmonitor(ioi, set) do { \ @@ -63,19 +65,20 @@ extern "C" { #define IOSIZE sizeof (io_t) #define IOBUFSIZE 2048 - extern io_t *iop; - extern int ion; +extern io_t *iop; +extern int ion; - void IOinit(void); - void IOterm(void); - int IOopen(char *, char *, char *, char *); - int IOclose(int, char *); - int IOreadline(int, char *, int); - int IOread(int, char *, int); - int IOwriteline(int, char *); +void IOinit (void); +void IOterm (void); +int IOopen (char *, char *, char *, char *); +int IOclose (int, char *); +int IOreadline (int, char *, int); +int IOread (int, char *, int); +int IOwriteline (int, char *); -#endif /* _IO_H */ +#endif /* _IO_H */ #ifdef __cplusplus } #endif + -- 2.40.0