Graphviz 13.0.0~dev.20250121.0651
Loading...
Searching...
No Matches
main.c File Reference
#include "builddate.h"
#include "config.h"
#include "frmobjectui.h"
#include "gltemplate.h"
#include "gui.h"
#include "gvprpipe.h"
#include "menucallbacks.h"
#include "support.h"
#include "viewport.h"
#include <glade/glade.h>
#include <gtk/gtk.h>
#include <gtk/gtkgl.h>
#include "glexpose.h"
#include "glutrender.h"
#include <assert.h>
#include <getopt.h>
#include <stdlib.h>
#include <string.h>
#include <util/alloc.h>
#include <util/exit.h>
#include <util/gv_find_me.h>
Include dependency graph for main.c:

Go to the source code of this file.

Functions

char * smyrnaPath (char *suffix)
 
static void usage (int v)
 
static char * parseArgs (int argc, char *argv[], ViewInfo *viewinfo)
 
static void windowedMode (int argc, char *argv[])
 
static char * find_share (void)
 find an absolute path to where Smyrna auxiliary files are stored
 
int main (int argc, char *argv[])
 

Variables

static char * smyrnaDir
 path to directory containing smyrna data files
 
static char * smyrnaGlade
 
static char * useString
 
static char * Info []
 

Function Documentation

◆ find_share()

static char * find_share ( void  )
static

Definition at line 168 of file main.c.

References free(), graphviz_exit(), gv_alloc(), gv_find_me(), and NULL.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 212 of file main.c.

References bindtextdomain, cb_glutinit(), find_share(), graphviz_exit(), GUI_FULLSCREEN, _ViewInfo::guiMode, gv_alloc(), init_viewport(), _ViewInfo::initFile, _ViewInfo::initFileName, NULL, _ViewInfo::optArg, parseArgs(), smyrnaDir, textdomain, view, and windowedMode().

Here is the call graph for this function:

◆ parseArgs()

static char * parseArgs ( int  argc,
char *  argv[],
ViewInfo viewinfo 
)
static

Definition at line 89 of file main.c.

References _ViewInfo::drawSplines, graphviz_exit(), GUI_FULLSCREEN, _ViewInfo::guiMode, Info, NULL, _ViewInfo::optArg, and usage.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ smyrnaPath()

char * smyrnaPath ( char *  suffix)

Definition at line 54 of file main.c.

References gv_calloc(), len(), smyrnaDir, and suffix.

Referenced by get_data_dir(), glcreate_gl_topview_menu(), init_viewport(), load_attr_list(), load_mouse_actions(), and windowedMode().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ usage()

static void usage ( int  v)
static

Definition at line 78 of file main.c.

References graphviz_exit(), and useString.

Here is the call graph for this function:

◆ windowedMode()

static void windowedMode ( int  argc,
char *  argv[] 
)
static

Definition at line 125 of file main.c.

References change_cursor(), configure_gl(), create_window(), _ViewInfo::graphComboBox, GUI_FULLSCREEN, _ViewInfo::guiMode, mQuitSlot(), NULL, smyrnaGlade, smyrnaPath(), view, and xml.

Referenced by main().

Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ Info

char* Info[]
static
Initial value:
= {
"smyrna",
PACKAGE_VERSION,
BUILDDATE
}

Definition at line 83 of file main.c.

Referenced by parseArgs().

◆ smyrnaDir

char* smyrnaDir
static

Definition at line 42 of file main.c.

Referenced by main(), and smyrnaPath().

◆ smyrnaGlade

char* smyrnaGlade
static

Definition at line 43 of file main.c.

Referenced by windowedMode().

◆ useString

char* useString
static
Initial value:
= "Usage: smyrna [-v?] <file>\n\
-f<WxH:bits@rate> - full-screen mode\n\
-e - draw edges as splines if available\n\
-v - verbose\n\
-? - print usage\n"

Definition at line 72 of file main.c.

Referenced by usage().