#endif
#include <stdio.h>
-#include <libgen.h>
#include <time.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
int main(int argc, char **argv)
{
graph_t *g, *prev = NULL;
- int rv;
- char *str;
gvc = gvNEWcontext(Info, username());
-
- setCmdName(argv[0]);
-
- str = basename(argv[0]);
- rv = gvlayout_select(gvc, str);
- if (rv == NO_SUPPORT)
- gvlayout_select(gvc, "dot");
-
parse_args(gvc, argc, argv);
#ifndef MSWIN32
GP.x = GP.y = 0;
CB.LL.x = CB.LL.y = CB.UR.x = CB.UR.y = 0;
PFC.x = PFC.y = 0;
- Deffontsize = 0;
- Deffontname = (char *) 0;
for (n = agfstnode(g); n; n = agnxtnode(g, n)) {
ND_state(n) = 0;
* AT&T Research, Florham Park NJ *
**********************************************************/
+#include <ctype.h>
+#include <libgen.h>
+
#include "render.h"
#include "htmltable.h"
-#include <ctype.h>
#if !defined(DISABLE_CODEGENS) && !defined(HAVE_GD_FREETYPE)
codegen_t *Output_codegen;
exit(exval);
}
-void setCmdName(char *s)
-{
- char *n = strrchr(s, '/');
-
- if (n)
- CmdName = n + 1;
- else
- CmdName = s;
-}
-
/* getFlagOpt:
* Look for flag parameter. idx is index of current argument.
* We assume argv[*idx] has the form "-x..." If there are characters
gvplugin_builtins(gvc);
gvconfig(gvc, CONFIG);
+ CmdName = basename(argv[0]);
+ i = gvlayout_select(gvc, CmdName);
+ if (i == NO_SUPPORT)
+ gvlayout_select(gvc, "dot");
+
aginit();
nfiles = 0;
for (i = 1; i < argc; i++)
nfiles++;
Files = N_NEW(nfiles + 1, char *);
nfiles = 0;
- if (!CmdName)
- setCmdName(argv[0]);
for (i = 1; i < argc; i++) {
if (argv[i] && argv[i][0] == '-') {
rest = &(argv[i][2]);
#endif
#endif
)
- emit_reset(gvc, g);
+ emit_reset(gvc, g); /* FIXME - split into emit_init & page reset */
switch (gvc->job->output_lang) {
case GVRENDER_PLUGIN:
flags = chkOrder(g);
extern point dotneato_closest(splines * spl, point p);
extern void graph_init(graph_t * g);
extern void dotneato_initialize(GVC_t * gvc, int, char **);
- extern void setCmdName(char *);
extern void dotneato_usage(int);
extern void dotneato_postprocess(Agraph_t *, nodesizefn_t);
extern void dotneato_set_margins(GVC_t * gvc, Agraph_t *);