#include "exec.h"
#include "cs2l.h"
-int C2Lopen(char *name, char *mode, FILE ** ifp, FILE ** ofp)
-{
+int C2Lopen (char *name, char *mode, FILE **ifp, FILE **ofp) {
int fd;
- if ((fd = csopen(name, CS_OPEN_READ)) == -1)
- return -1;
- fcntl(fd, F_SETFD, FD_CLOEXEC);
- *ifp = fdopen(fd, "r"), *ofp = fdopen(fd, "a+");
+ if ((fd = csopen (name, CS_OPEN_READ)) == -1)
+ return -1;
+ fcntl (fd, F_SETFD, FD_CLOEXEC);
+ *ifp = fdopen (fd, "r"), *ofp = fdopen (fd, "a+");
return 0;
}
/* LEFTY builtin */
-int C2Lreadcsmessage(int argc, lvar_t * argv)
-{
+int C2Lreadcsmessage (int argc, lvar_t *argv) {
-#if 0 /* not finished yet */
+#if 0 /* not finished yet */
io_t *p;
int ioi, n;
Msg_call_t msg;
Tobj to;
int tm;
- ioi = Tgetnumber(argv[0].o);
+ ioi = Tgetnumber (argv[0].o);
if (ioi < 0 || ioi >= ion)
- return L_FAILURE;
+ return L_FAILURE;
p = &iop[ioi];
- fseek(p->ofp, 0L, 1);
- if ((n = msgrecv(fileno(p->ifp), &msg)) <= 0)
- return L_FAILURE;
- to = Ttable(6);
- tm = Mpushmark(to);
- Tinss(to, "id", Tinteger(MSG_CHANNEL_USR(msg.channel)));
- Tinss(to, "pid", Tinteger(MSG_CHANNEL_SYS(msg.channel)));
+ fseek (p->ofp, 0L, 1);
+ if ((n = msgrecv (fileno (p->ifp), &msg)) <= 0)
+ return L_FAILURE;
+ to = Ttable (6);
+ tm = Mpushmark (to);
+ Tinss (to, "id", Tinteger (MSG_CHANNEL_USR (msg.channel)));
+ Tinss (to, "pid", Tinteger (MSG_CHANNEL_SYS (msg.channel)));
rtno = to;
- Mpopmark(tm);
+ Mpopmark (tm);
#endif
return L_SUCCESS;
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
-
+
/**********************************************************
* This software is part of the graphviz package *
* http://www.graphviz.org/ *
extern "C" {
#endif
-
-/* Lefteris Koutsofios - AT&T Bell Laboratories */
+/* Lefteris Koutsofios - AT&T Labs Research */
#ifndef _GFXVIEW_H
#define _GFXVIEW_H
- void GFXinit(void);
- void GFXterm(void);
- void GFXprune(void);
- void GFXlabelcb(Gevent_t *);
- void GFXviewcb(Gevent_t *);
- void GFXevent(Gevent_t *);
- void GFXmove(void);
- void GFXredraw(void);
- void GFXtextcb(int, char *);
- void GFXbuttoncb(int, void *);
- void GFXmonitorfile(int);
- void GFXidle(void);
+void GFXinit (void);
+void GFXterm (void);
+void GFXprune (void);
+void GFXlabelcb (Gevent_t *);
+void GFXviewcb (Gevent_t *);
+void GFXevent (Gevent_t *);
+void GFXmove (void);
+void GFXredraw (void);
+void GFXtextcb (int, char *);
+void GFXbuttoncb (int, void *);
+void GFXmonitorfile (int);
+void GFXidle (void);
- int GFXcreatewidget(int, lvar_t *);
- int GFXsetwidgetattr(int, lvar_t *);
- int GFXgetwidgetattr(int, lvar_t *);
- int GFXdestroywidget(int, lvar_t *);
- int GFXclear(int, lvar_t *);
- int GFXsetgfxattr(int, lvar_t *);
- int GFXgetgfxattr(int, lvar_t *);
- int GFXarrow(int, lvar_t *);
- int GFXline(int, lvar_t *);
- int GFXbox(int, lvar_t *);
- int GFXpolygon(int, lvar_t *);
- int GFXsplinegon(int, lvar_t *);
- int GFXarc(int, lvar_t *);
- int GFXtext(int, lvar_t *);
- int GFXtextsize(int, lvar_t *);
- int GFXcreatebitmap(int, lvar_t *);
- int GFXdestroybitmap(int, lvar_t *);
- int GFXreadbitmap(int, lvar_t *);
- int GFXwritebitmap(int, lvar_t *);
- int GFXbitblt(int, lvar_t *);
- int GFXclearpick(int, lvar_t *);
- int GFXsetpick(int, lvar_t *);
- int GFXdisplaymenu(int, lvar_t *);
-#endif /* _GFXVIEW_H */
+int GFXcreatewidget (int, lvar_t *);
+int GFXsetwidgetattr (int, lvar_t *);
+int GFXgetwidgetattr (int, lvar_t *);
+int GFXdestroywidget (int, lvar_t *);
+int GFXclear (int, lvar_t *);
+int GFXsetgfxattr (int, lvar_t *);
+int GFXgetgfxattr (int, lvar_t *);
+int GFXarrow (int, lvar_t *);
+int GFXline (int, lvar_t *);
+int GFXbox (int, lvar_t *);
+int GFXpolygon (int, lvar_t *);
+int GFXsplinegon (int, lvar_t *);
+int GFXarc (int, lvar_t *);
+int GFXtext (int, lvar_t *);
+int GFXtextsize (int, lvar_t *);
+int GFXcreatebitmap (int, lvar_t *);
+int GFXdestroybitmap (int, lvar_t *);
+int GFXreadbitmap (int, lvar_t *);
+int GFXwritebitmap (int, lvar_t *);
+int GFXbitblt (int, lvar_t *);
+int GFXclearpick (int, lvar_t *);
+int GFXsetpick (int, lvar_t *);
+int GFXdisplaymenu (int, lvar_t *);
+int GFXcolormap (int, lvar_t *);
+#endif /* _GFXVIEW_H */
#ifdef __cplusplus
}
#endif
+