Graphviz 12.0.1~dev.20240716.0800
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 <cgraph/alloc.h>
#include <cgraph/exit.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 <stdbool.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.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 * readln (const char *path)
 readlink-alike but dynamically allocates
 
static char * find_me (void)
 find an absolute path to the current executable
 
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
 
static char * smyrnaGlade
 
static char * useString
 
static char * Info []
 

Function Documentation

◆ find_me()

static char * find_me ( void  )
static

Definition at line 215 of file main.c.

References free(), graphviz_exit(), gv_alloc(), gv_realloc(), NULL, and readln().

Referenced by find_share().

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

◆ find_share()

static char * find_share ( void  )
static

Definition at line 314 of file main.c.

References find_me(), free(), graphviz_exit(), gv_alloc(), 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 354 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 103 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:

◆ readln()

static char * readln ( const char *  path)
static

Definition at line 183 of file main.c.

References free(), gv_realloc(), and NULL.

Referenced by find_me().

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

◆ smyrnaPath()

char * smyrnaPath ( char *  suffix)

Definition at line 68 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 92 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 139 of file main.c.

References change_cursor(), configure_gl(), create_window(), gladewidget, _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 97 of file main.c.

Referenced by parseArgs().

◆ smyrnaDir

char* smyrnaDir
static

Definition at line 56 of file main.c.

Referenced by main(), and smyrnaPath().

◆ smyrnaGlade

char* smyrnaGlade
static

Definition at line 57 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 86 of file main.c.

Referenced by usage().