tin  2.6.1
About: TIN is a threaded NNTP and spool based UseNet newsreader.
  Fossies Dox: tin-2.6.1.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

makecfg.c File Reference
#include "tin.h"
Include dependency graph for makecfg.c:

Go to the source code of this file.

Data Structures

struct  mydata
 

Macros

#define __BUILD__
 
#define PROTO_H   1 /* don't include proto.h */
 
#define L_CURL   '{'
 
#define R_CURL   '}'
 
#define MAXNAME   36 /* maximum name-length (just for readability formatting) */
 
#define MAXTYPE   5 /* limits opt_type to keep names unique within 31 chars */
 
#define MYDATA   struct mydata
 

Functions

static void failed (const char *message)
 
static FILE * open_it (const char *filename, const char *mode)
 
static char * string_dup (const char *string)
 
static void store_data (const char *name, const char *type)
 
static void parse_tbl (char *buffer)
 
static void write_it (FILE *ofp, const char *const *table)
 
static int index_of (struct mydata *p)
 
static int is_title (struct mydata *p)
 
static int type_is_int (struct mydata *p)
 
static const char * typename_of (struct mydata *p)
 
static void generate_tbl (FILE *ofp)
 
static void generate_enum (FILE *ofp2)
 
static void generate_ptr (FILE *ofp, const char *opt_type, const char *ptr_type, int mode)
 
static void makecfg (FILE *ifp, FILE *ofp, FILE *ofp2)
 
int main (int argc, char *argv[])
 

Variables

static struct mydataall_data
 
static int line_no
 

Macro Definition Documentation

◆ __BUILD__

#define __BUILD__

Definition at line 41 of file makecfg.c.

◆ L_CURL

#define L_CURL   '{'

Definition at line 47 of file makecfg.c.

◆ MAXNAME

#define MAXNAME   36 /* maximum name-length (just for readability formatting) */

Definition at line 50 of file makecfg.c.

◆ MAXTYPE

#define MAXTYPE   5 /* limits opt_type to keep names unique within 31 chars */

Definition at line 51 of file makecfg.c.

◆ MYDATA

#define MYDATA   struct mydata

Definition at line 53 of file makecfg.c.

◆ PROTO_H

#define PROTO_H   1 /* don't include proto.h */

Definition at line 42 of file makecfg.c.

◆ R_CURL

#define R_CURL   '}'

Definition at line 48 of file makecfg.c.

Function Documentation

◆ failed()

static void failed ( const char *  message)
static

Definition at line 64 of file makecfg.c.

References EXIT_FAILURE.

Referenced by open_it(), store_data(), and string_dup().

◆ generate_enum()

static void generate_enum ( FILE *  ofp2)
static

Definition at line 282 of file makecfg.c.

References all_data, mydata::link, MYDATA, and write_it().

Referenced by makecfg().

◆ generate_ptr()

static void generate_ptr ( FILE *  ofp,
const char *  opt_type,
const char *  ptr_type,
int  mode 
)
static

Definition at line 321 of file makecfg.c.

References all_data, FALSE, index_of(), L_CURL, mydata::link, MAXNAME, MAXTYPE, MYDATA, R_CURL, and TRUE.

Referenced by makecfg().

◆ generate_tbl()

static void generate_tbl ( FILE *  ofp)
static

Definition at line 215 of file makecfg.c.

References all_data, is_title(), mydata::link, MYDATA, type_is_int(), and write_it().

Referenced by makecfg().

◆ index_of()

static int index_of ( struct mydata p)
static

Definition at line 167 of file makecfg.c.

References all_data, mydata::link, and MYDATA.

Referenced by generate_ptr().

◆ is_title()

static int is_title ( struct mydata p)
static

Definition at line 181 of file makecfg.c.

Referenced by generate_tbl(), and makecfg().

◆ main()

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

Definition at line 527 of file makecfg.c.

References _, all_data, backup_newsrc(), base_name(), batch_mode, bindtextdomain, t_config::cache_overview_files, catchup, catchup_newsrc_file(), cCOLS, CHECK_ANY_NEWS, check_any_unread, check_start_save_any_news(), cLINES, cmd_line, CODESET, count_postponed_articles(), create_mail_save_dirs(), create_save_active_file(), created_rcdir, cvers, debug, DEBUG_FILTER, DEBUG_MISC, EndInverse(), error_message(), EXIT_FAILURE, EXIT_SUCCESS, FALSE, filter_file, free_all_arrays(), FreeIfNeeded, get_termcaps(), getserverbyfile(), giveup(), global_config_file, hash_init(), init_alloc(), init_group_hash(), init_selfinfo(), InitScreen(), mydata::link, local_config_file, LOCALEDIR, MAIL_ANY_NEWS, mail_news, makecfg(), t_menu::max, MIN_COLUMNS_ON_TERMINAL, MIN_LINES_ON_TERMINAL, t_config::mm_local_charset, my_malloc, MYDATA, newsrc, nntp_caps, nntp_close(), nntp_open(), nntp_server, NNTP_SERVER_FILE, no_write, open_it(), output, t_capabilities::over_cmd, overview_xref_support(), PLURAL, post_article_and_exit, post_postponed_and_exit, postinit_regexp(), print_boolean(), quick_post_article(), read_attributes_file(), read_cmd_line_groups(), read_cmd_line_options(), read_config_file(), read_descriptions(), read_filter_file(), read_input_history_file(), read_keymap_file(), read_news_active_file(), read_news_via_nntp, read_newsrc(), read_newsrc_lines, read_saved_news, read_server_config(), ring_bell(), SAVE_ANY_NEWS, save_news, selection_page(), selmenu, set_signal_handlers(), setlocale, setup_default_keys(), setup_screen(), show_description, show_intro_page(), t_config::show_only_unread_groups, START_ANY_NEWS, start_any_unread, strcasecmp(), STRCPY, textdomain, tin_done(), tin_nl_langinfo(), tin_progname, tinrc, toggle_my_groups(), TRUE, txt_batch_update_unavail, txt_exiting, txt_info_postponed, txt_option_not_enabled, txt_reading_keymap_file, txt_screen_init_failed, txt_screen_too_small_exiting, update_index, update_index_files(), verbose, wait_message(), write_config_file(), and xref_supported.

◆ makecfg()

static void makecfg ( FILE *  ifp,
FILE *  ofp,
FILE *  ofp2 
)
static

◆ open_it()

static FILE * open_it ( const char *  filename,
const char *  mode 
)
static

Definition at line 72 of file makecfg.c.

References failed().

Referenced by main().

◆ parse_tbl()

static void parse_tbl ( char *  buffer)
static

Definition at line 119 of file makecfg.c.

References line_no, and store_data().

Referenced by makecfg().

◆ store_data()

static void store_data ( const char *  name,
const char *  type 
)
static

Definition at line 96 of file makecfg.c.

References all_data, failed(), mydata::link, MYDATA, name, and string_dup().

Referenced by parse_tbl().

◆ string_dup()

static char * string_dup ( const char *  string)
static

Definition at line 84 of file makecfg.c.

References buf, and failed().

Referenced by store_data().

◆ type_is_int()

static int type_is_int ( struct mydata p)
static

Definition at line 188 of file makecfg.c.

Referenced by generate_tbl(), and makecfg().

◆ typename_of()

static const char * typename_of ( struct mydata p)
static

Definition at line 198 of file makecfg.c.

Referenced by makecfg().

◆ write_it()

static void write_it ( FILE *  ofp,
const char *const *  table 
)
static

Definition at line 156 of file makecfg.c.

References table.

Referenced by generate_enum(), generate_tbl(), and makecfg().

Variable Documentation

◆ all_data

struct mydata* all_data
static

Definition at line 60 of file makecfg.c.

Referenced by generate_enum(), generate_ptr(), generate_tbl(), index_of(), main(), makecfg(), and store_data().

◆ line_no

int line_no
static

Definition at line 61 of file makecfg.c.

Referenced by makecfg(), and parse_tbl().