BRL-CAD
editit.c File Reference
#include "common.h"
#include <stdlib.h>
#include <string.h>
#include "ged.h"
Include dependency graph for editit.c:

Go to the source code of this file.

Macros

#define WIN_EDITOR   "\"c:/Program Files/Windows NT/Accessories/wordpad\""
 
#define MAC_EDITOR   "/Applications/TextEdit.app/Contents/MacOS/TextEdit"
 
#define EMACS_EDITOR   "emacs"
 
#define NANO_EDITOR   "nano"
 
#define VIM_EDITOR   "vim"
 
#define VI_EDITOR   "vi"
 

Functions

int _ged_editit (char *editstring, const char *filename)
 
int ged_editit (struct ged *gedp, int argc, const char *argv[])
 

Detailed Description

The editit function.

Definition in file editit.c.

Macro Definition Documentation

#define WIN_EDITOR   "\"c:/Program Files/Windows NT/Accessories/wordpad\""

Definition at line 41 of file editit.c.

Referenced by _ged_editit().

#define MAC_EDITOR   "/Applications/TextEdit.app/Contents/MacOS/TextEdit"

Definition at line 42 of file editit.c.

Referenced by _ged_editit().

#define EMACS_EDITOR   "emacs"

Definition at line 43 of file editit.c.

Referenced by _ged_editit().

#define NANO_EDITOR   "nano"

Definition at line 44 of file editit.c.

Referenced by _ged_editit().

#define VIM_EDITOR   "vim"

Definition at line 45 of file editit.c.

Referenced by _ged_editit().

#define VI_EDITOR   "vi"

Definition at line 46 of file editit.c.

Referenced by _ged_editit().

Function Documentation

int _ged_editit ( char *  editstring,
const char *  filename 
)

Definition at line 49 of file editit.c.

References bu_argv_from_string(), bu_basename(), bu_calloc(), bu_exit(), bu_file_exists(), bu_free(), bu_getprogname(), bu_log(), BU_STR_EQUAL, bu_vls_addr(), bu_vls_free(), BU_VLS_INIT_ZERO, bu_vls_putc(), bu_vls_sprintf(), bu_vls_strlen(), bu_which(), EMACS_EDITOR, MAC_EDITOR, NANO_EDITOR, RT_MAXLINE, TRUE, VI_EDITOR, VIM_EDITOR, and WIN_EDITOR.

Referenced by ged_edcodes(), ged_editit(), ged_edmater(), and ged_red().

Here is the call graph for this function:

int ged_editit ( struct ged gedp,
int  argc,
const char *  argv[] 
)

Edit file.

Definition at line 254 of file editit.c.

References _ged_editit(), bu_free(), bu_strdup, bu_vls_printf(), GED_CHECK_ARGC_GT_0, GED_CHECK_DATABASE_OPEN, GED_ERROR, and ged::ged_result_str.

Here is the call graph for this function: