mondo  3.3.0
About: Mondo (like Mindi part of MondoRescue, a disaster recovery suite for Linux/FreeBSD) is responsible for carrying out the actual backups and and restores
  Fossies Dox: mondo-3.3.0.tar.gz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

newt-specific.c File Reference
#include "my-stuff.h"
#include "mr_mem.h"
#include "mr_str.h"
#include "mondostructures.h"
#include "newt-specific.h"
#include "libmondo-string-EXT.h"
#include "libmondo-files-EXT.h"
#include "libmondo-devices-EXT.h"
#include "libmondo-tools-EXT.h"
#include "libmondo-fork-EXT.h"
#include "libmondo-gui-EXT.h"
#include "lib-common-externs.h"
Include dependency graph for newt-specific.c:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define MAX_NEWT_COMMENT_LEN   200
 

Functions

char * mr_center_string (char *in, int width)
 Pad a string on both sides so it appears centered. More...
 
void set_signals (int)
 Turn signal-trapping on or off. More...
 
void popup_and_OK (char *prompt)
 Give a message to the user in the form of a dialog box (under Newt). More...
 
int ask_me_yes_or_no (char *prompt)
 Ask the user a yes/no question. More...
 
int ask_me_OK_or_cancel (char *prompt)
 Give the user the opportunity to continue the current operation (OK) or cancel it (Cancel). More...
 
void close_evalcall_form (void)
 Close the currently opened evalcall form. More...
 
void close_progress_form ()
 Close the currently opened progress form. More...
 
void kill_anything_like_this (char *str)
 Kill any process containing the string str surrounded by spaces in its commandline. More...
 
void fatal_error (char *error_string)
 Exit Mondo with a fatal error. More...
 
void free_newt_stuff ()
 
void finish (int signal)
 Exit Mondo normally. More...
 
void log_file_end_to_screen (char *filename, char *grep_for_me)
 Log the last g_noof_log_lines lines of filename that match grep_for_me to the screen. More...
 
void log_to_screen (const char *fmt,...)
 Log a message to the screen. More...
 
void mvaddstr_and_log_it (int y, int x, char *output)
 Write a string to the root window at (x, y) and also to the logfile. More...
 
void open_evalcall_form (char *ttl)
 Open an evalcall form with title ttl. More...
 
void open_progress_form (char *title, char *b1, char *b2, char *b3, long max_val)
 Open a progress form with title title. More...
 
char * mr_popup_and_get_string (char *title, char *b, char *input)
 Ask the user to enter a value. More...
 
int popup_and_get_string (char *title, char *b, char *output, int maxsize)
 Ask the user to enter a value. More...
 
int popup_with_buttons (char *p, char *button1, char *button2)
 Pop up a dialog box with user-defined buttons. More...
 
void refresh_log_screen ()
 Synchronize the log messages stored in err_log_lines with those shown on the screen. More...
 
void setup_newt_stuff ()
 Set up the Newt graphical environment. More...
 
void update_evalcall_form_ratio (int num, int denom)
 Update the evalcall form to show (num/denom)*100 %. More...
 
void update_evalcall_form (int curr)
 Update the evalcall form to show curr %. More...
 
void update_progress_form (char *blurb3)
 Update the progress form to show blurb3 and the current value of g_maximum_progress. More...
 
void update_progress_form_full (char *blurb1, char *blurb2, char *blurb3)
 Update the progress form's complete blurb and show g_current_progress. More...
 
t_bkptype which_backup_media_type (int restoring)
 Ask the user which backup media type they would like to use. More...
 
char * which_compression_type ()
 Ask the user which compression type they would like to use. More...
 
int which_compression_level ()
 Ask the user how much compression they would like to use. More...
 
int load_filelist_into_array (struct s_filelist *filelist, char *source_file)
 Load source_file (a list of files) into filelist. More...
 
char * filelist_entry_to_string (struct s_filelist_entry *flentry)
 Generate a pretty string based on flentry. More...
 
void popup_changelist_from_file (char *source_file)
 Pop up a list containing the filenames in source_file and the severity if they have changed since the last backup. More...
 

Variables

char * MONDO_LOGFILE
 Compatibility #define to ease the transition to logfile-in-a-variable. More...
 
struct s_bkpinfobkpinfo
 
pid_t g_mastermind_pid
 PID of the "main" process. More...
 
char * g_boot_mountpt
 The place where /boot is mounted. More...
 
char * ps_options
 
char * ps_proc_id
 
int g_exiting = 0
 Whether we are currently in a nested call of fatal_error(). More...
 
int g_fail_immediately
 
char g_haharrrrr [500]
 Padding below the Newt components, to overcome bugs in Newt. More...
 
newtComponent g_timeline = NULL
 The line of the progress form that shows the time elapsed/remaining. More...
 
newtComponent g_percentline = NULL
 The line of the progress form that shows the percent completed/remaining. More...
 
newtComponent g_scale = NULL
 The progress bar component in the progress form. More...
 
newtComponent g_progressForm = NULL
 The progress form component itself. More...
 
newtComponent g_blurb1 = NULL
 The component for line 1 of the blurb in the progress form. More...
 
newtComponent g_blurb2 = NULL
 The component for line 2 of the blurb in the progress form. More...
 
newtComponent g_blurb3 = NULL
 The component for line 3 (updated continuously) of the blurb in the progress form. More...
 
newtComponent g_label = NULL
 ????? More...
 
char g_jim_lad_yarr [500]
 Padding above the Newt components, to overcome bugs in Newt. More...
 
char ** err_log_lines = NULL
 The list of log lines to show on the screen. More...
 
char g_blurb_str_1 [200] = ""
 The string for line 1 of the blurb in the progress form. More...
 
char g_blurb_str_2 [200] = ""
 The string for line 2 of the blurb in the progress form. More...
 
char g_blurb_str_3 [200] = ""
 The string for line 3 (updated continuously) of the blurb in the progress form. More...
 
newtComponent g_isoform_main = NULL
 The evalcall form component itself. More...
 
newtComponent g_isoform_header = NULL
 The component for the evalcall form title. More...
 
newtComponent g_isoform_scale = NULL
 The progress bar component in the evalcall form. More...
 
newtComponent g_isoform_timeline = NULL
 The line of the evalcall form that shows the time elapsed/remaining. More...
 
newtComponent g_isoform_pcline = NULL
 The line of the evalcall form that shows the percent completed/remaining. More...
 
long g_isoform_starttime
 The time (in seconds since the epoch) that the evalcall form was opened. More...
 
int g_isoform_old_progress = -1
 The most recent progress update of the evalcall form (percent). More...
 
char g_isoform_header_str [512] = " "
 The string for the evalcall form title. More...
 
int g_mysterious_dot_counter
 The counter for the twirling baton (/ | \ - ...) on percentage less than 3. More...
 
int g_noof_log_lines = 6
 The number of lines to show in the log at the bottom of the screen. More...
 
int g_noof_rows = 25
 The number of rows on the screen. More...
 
int g_currentY = 3
 The row to write background progress messages to. Incremented each time a message is written. More...
 
int g_current_media_number
 The current media number we're using. More...
 
pid_t g_main_pid = 0
 The PID of the main Mondo process. More...
 
long g_maximum_progress = 999L
 The maximum amount of progress (100%) for the currently opened progress form. More...
 
long g_current_progress = -999
 The current amount of progress (filelist #, etc.) for the currently opened progress form. More...
 
long g_start_time = 0L
 The time (in seconds since the epoch) that the progress form was opened. More...
 
int g_text_mode = 1
 If FALSE, use a newt interface; if TRUE, use an ugly (but more compatible) dumb terminal interface. More...
 
char * g_selfmounted_isodir
 Holds the NETFS mountpoint if mounted via mondoarchive. More...
 

Detailed Description

Functions for doing display-type things with the Newt library.

Definition in file newt-specific.c.

Macro Definition Documentation

◆ MAX_NEWT_COMMENT_LEN

#define MAX_NEWT_COMMENT_LEN   200

Definition at line 14 of file newt-specific.c.

Variable Documentation

◆ bkpinfo

struct s_bkpinfo* bkpinfo

Definition at line 60 of file mondoarchive.c.

Referenced by finish(), and load_filelist_into_array().