source: MondoRescue/branches/stable/mondo/src/mondorestore/mondo-rstr-newt.h@ 1200

Last change on this file since 1200 was 1200, checked in by Bruno Cornec, 17 years ago

Merge trunk emory management for mondo-rstr-compare.c and .h

  • Property svn:keywords set to Id
File size: 6.7 KB
RevLine 
[1200]1/*
2 * $Id: mondo-rstr-newt.h 1200 2007-02-25 00:28:17Z bruno $
3**/
[1]4
[1067]5#include "my-stuff.h"
[1168]6#include "mr_str.h"
7
8#include "mondostructures.h"
9#include "libmondo.h"
[1]10#ifdef __FreeBSD__
11#define raid_device_record vinum_volume
12#endif /*__FreeBSD__*/
13
[1200]14#define NO_FLAWS_DETECTED _("No flaws detected in mountlist at this time. Hit 'OK' to proceed.")
[1]15
16
17/** I found this in the code :) *******************************************/
18char g_strings_of_flist_window[ARBITRARY_MAXIMUM][MAX_STR_LEN];
19bool g_is_path_selected[ARBITRARY_MAXIMUM];
20bool g_is_path_expanded[ARBITRARY_MAXIMUM];
21char tmpnopath[MAX_STR_LEN + 2];
22char tmpprevpath[MAX_STR_LEN + 2];
23
24/* external subroutines and global vars */
25
[128]26extern long get_time(void);
27extern char *last_line_of_file(char *);
28extern void center_string(char *, int);
29extern bool does_file_exist(char *);
30extern void finish(int);
31extern long get_phys_size_of_drive(char *);
32extern bool is_this_device_mounted(char *);
[1200]33extern void mr_strip_spaces(char *);
[128]34extern void initialize_raidrec(struct raid_device_record *);
35extern int make_list_of_drives(struct mountlist_itself *,
36 char[ARBITRARY_MAXIMUM][MAX_STR_LEN]);
37char *number_to_text(int);
38extern void reload_filelist(struct s_node *);
39extern void toggle_all_root_dirs_on(struct s_node *);
40extern void toggle_path_expandability(struct s_node *, char *, bool);
41extern void toggle_path_selection(struct s_node *, char *, bool);
42extern void toggle_node_selection(struct s_node *, bool);
43extern struct s_node *find_node_in_filelist(struct s_node *,
44 char *filename);
45extern int what_number_cd_is_this(struct s_bkpinfo *);
[1]46//extern void fatal_error (char *);
[128]47extern void sort_mountlist_by_device(struct mountlist_itself *);
48extern int load_mountlist(struct mountlist_itself *a, char *b);
[1]49extern bool g_text_mode;
50
51
52/* hacks */
[128]53extern int load_raidtab_into_raidlist(struct raidlist_itself *a, char *b);
[1]54
55
56
57extern long g_start_time, g_minimum_progress, g_maximum_progress,
[128]58 g_current_progress, g_currentY;
[1]59extern bool g_ISO_restore_mode;
60
61/* my subroutines */
62
[128]63void add_disklist_entry(struct list_of_disks *, char *,
64 struct mountlist_itself *);
65void add_mountlist_entry(struct mountlist_itself *,
66 struct raidlist_itself *, newtComponent, int,
67 void *keylist[]);
68void add_varslist_entry(struct raid_device_record *);
69bool ask_me_yes_or_no(char *);
70bool ask_me_OK_or_cancel(char *);
71long calculate_raid_device_size(struct mountlist_itself *,
72 struct raidlist_itself *, char *);
73void choose_raid_level(struct
[1]74#ifdef __FreeBSD__
[128]75 vinum_plex
[1]76#else
[128]77 raid_device_record
[1]78#endif
[128]79 *);
80void close_evalcall_form(void);
81void close_progress_form(void);
82void del_partns_listed_in_disklist(struct mountlist_itself *,
83 struct raidlist_itself *,
84 struct list_of_disks *);
85void delete_disklist_entry(struct list_of_disks *, char *, int);
86void delete_mountlist_entry(struct mountlist_itself *,
87 struct raidlist_itself *, newtComponent, int,
88 void *keylist[]);
89void delete_raidlist_entry(struct mountlist_itself *,
90 struct raidlist_itself *, char *);
91void delete_varslist_entry(struct raid_device_record *, int);
92char *disklist_entry_to_string(struct list_of_disks *, int);
93int edit_filelist(struct s_node *);
94void edit_mountlist_entry(struct mountlist_itself *,
95 struct raidlist_itself *, newtComponent, int,
96 void *keylist[]);
97void edit_raidlist_entry(struct mountlist_itself *,
98 struct raidlist_itself *,
99 struct raid_device_record *, int);
100void edit_varslist_entry(struct raid_device_record *, int);
101int edit_mountlist_in_newt(char *mountlist_fname,
102 struct mountlist_itself *,
103 struct raidlist_itself *);
104int edit_mountlist(char *mountlist_fname, struct mountlist_itself *,
105 struct raidlist_itself *);
106void edit_raidrec_additional_vars(struct raid_device_record *);
107int evaluate_drive_within_mountlist(struct mountlist_itself *, char *,
108 char *);
109int evaluate_mountlist(struct mountlist_itself *, char *, char *, char *);
110int find_device_in_mountlist(struct mountlist_itself *, char *);
111int find_next_free_index_in_disklist(struct list_of_disks *);
112int find_raid_device_in_raidlist(struct raidlist_itself *, char *);
113bool get_isodir_info(char *, char *, char *, bool);
114void initiate_new_raidlist_entry(struct raidlist_itself *,
115 struct mountlist_itself *, int, char *);
116void insert_essential_additionalvars(struct raid_device_record *);
117bool is_this_raid_personality_registered(int);
118void log_file_end_to_screen(char *, char *);
119void log_to_screen(const char *fmt, ...);
120int look_for_duplicate_mountpoints(struct mountlist_itself *, char *);
121int look_for_weird_formats(struct mountlist_itself *, char *);
122void make_list_of_unallocated_raid_partitions(struct mountlist_itself *,
123 struct mountlist_itself *,
124 struct raidlist_itself *);
125char *mountlist_entry_to_string(struct mountlist_itself *, int);
126void mvaddstr_and_log_it(int, int, char *);
[1103]127void nuke_mode_dummy(void);
[128]128char *number_of_disks_as_string(int, char *);
129void open_evalcall_form(char *);
130void open_progress_form(char *, char *, char *, char *, long);
131void popup_and_OK(char *);
132bool popup_and_get_string(char *, char *, char *, int);
133bool popup_with_buttons(char *, char *, char *);
134void redraw_disklist(struct list_of_disks *, void *keylist[],
135 newtComponent);
136void redraw_mountlist(struct mountlist_itself *, void *keylist[],
137 newtComponent);
138void redraw_unallocpartnslist(struct mountlist_itself *, void *keylist[],
139 newtComponent);
140void redraw_varslist(struct additional_raid_variables *, void *keylist[],
141 newtComponent);
142int read_variableINT_and_remove_from_raidvars(struct raid_device_record *,
143 char *);
144void refresh_log_screen(void);
145void rejig_partition_name_in_raidlist_if_necessary(struct raidlist_itself
146 *, char *, char *);
147void remove_essential_additionalvars(struct raid_device_record *);
148void select_raid_disks(struct mountlist_itself *, struct raidlist_itself *,
149 struct raid_device_record *, char *,
150 struct list_of_disks *);
151void setup_newt_stuff(void);
152long size_of_specific_device(struct mountlist_itself *, char *);
153bool spread_flaws_across_three_lines(char *, char *, char *, char *, int);
154char *turn_raid_level_number_to_string(int);
155void update_evalcall_form(int);
156void update_progress_form(char *);
157void update_progress_form_full(char *, char *, char *);
158char which_restore_mode(void);
159void write_variableINT_to_raid_var_line(struct raid_device_record *, int,
160 char *, int);
161int where_in_drivelist_is_drive(struct list_of_disks *, char *);
[1]162char *strip_path(char *);
163
164/* -------------------------------------------------------------------- */
165
166
167
168
169char tmpnopath[MAX_STR_LEN + 2];
170char tmpprevpath[MAX_STR_LEN + 2];
171
172#ifdef __FreeBSD__
173#undef raid_device_record
174#endif
Note: See TracBrowser for help on using the repository browser.