source: MondoRescue/branches/2.2.6/mondo/src/mondorestore/mondo-rstr-newt.h@ 1930

Last change on this file since 1930 was 1930, checked in by Bruno Cornec, 16 years ago

Renaming of files to be in conformity with stable and ease aplication of patches between branches.

  • Property svn:keywords set to Id
File size: 8.1 KB
Line 
1/***************************************************************************
2 mondo-rstr-newt.h - description
3 -------------------
4 begin : Sat Apr 20 2002
5 copyright : (C) 2002 by Stan Benoit
6 email : troff@nakedsoul.org
7 cvsid : $Id: mondo-rstr-newt.h 1930 2008-04-22 12:05:49Z bruno $
8 ***************************************************************************/
9
10/***************************************************************************
11 * *
12 * This program is free software; you can redistribute it and/or modify *
13 * it under the terms of the GNU General Public License as published by *
14 * the Free Software Foundation; either version 2 of the License, or *
15 * (at your option) any later version. *
16 * *
17 ***************************************************************************/
18
19
20#include "my-stuff.h"
21#include "../common/mondostructures.h"
22#include "../common/libmondo.h"
23#ifdef __FreeBSD__
24#define raid_device_record vinum_volume
25#endif /*__FreeBSD__*/
26
27#define NO_FLAWS_DETECTED "No flaws detected in mountlist at this time. Hit 'OK' to proceed."
28
29
30/** I found this in the code :) *******************************************/
31char g_strings_of_flist_window[ARBITRARY_MAXIMUM][MAX_STR_LEN];
32bool g_is_path_selected[ARBITRARY_MAXIMUM];
33bool g_is_path_expanded[ARBITRARY_MAXIMUM];
34char tmpnopath[MAX_STR_LEN + 2];
35char tmpprevpath[MAX_STR_LEN + 2];
36
37/* external subroutines and global vars */
38
39extern long get_time(void);
40extern char *last_line_of_file(char *);
41extern void center_string(char *, int);
42extern bool does_file_exist(char *);
43extern void finish(int);
44extern long get_phys_size_of_drive(char *);
45extern bool is_this_device_mounted(char *);
46extern void strip_spaces(char *);
47extern void initialize_raidrec(struct raid_device_record *);
48extern int make_list_of_drives(struct mountlist_itself *,
49 char[ARBITRARY_MAXIMUM][MAX_STR_LEN]);
50char *number_to_text(int);
51extern void reload_filelist(struct s_node *);
52extern void toggle_all_root_dirs_on(struct s_node *);
53extern void toggle_path_expandability(struct s_node *, char *, bool);
54extern void toggle_path_selection(struct s_node *, char *, bool);
55extern void toggle_node_selection(struct s_node *, bool);
56extern struct s_node *find_node_in_filelist(struct s_node *,
57 char *filename);
58extern int what_number_cd_is_this();
59//extern void fatal_error (char *);
60extern void sort_mountlist_by_device(struct mountlist_itself *);
61extern int load_mountlist(struct mountlist_itself *a, char *b);
62extern bool g_text_mode;
63
64
65/* hacks */
66extern int load_raidtab_into_raidlist(struct raidlist_itself *a, char *b);
67
68
69
70extern long g_start_time, g_minimum_progress, g_maximum_progress,
71 g_current_progress, g_currentY;
72extern bool g_ISO_restore_mode;
73
74
75/* my global variables */
76
77//extern newtComponent g_progressForm, g_blurb1, g_blurb2, g_blurb3, g_label,
78// g_timeline, g_percentline, g_scale;
79//extern char err_log_lines[NOOF_ERR_LINES][MAX_STR_LEN], g_blurb_str_1[MAX_STR_LEN] =
80// "", g_blurb_str_2[MAX_STR_LEN] = "", g_blurb_str_3[MAX_STR_LEN] = "";
81//newtComponent g_isoform_main =
82// NULL, g_isoform_header, g_isoform_scale, g_isoform_timeline,
83// g_isoform_pcline;
84//long g_isoform_starttime;
85//int g_isoform_old_progress = -1;
86//char g_isoform_header_str[MAX_STR_LEN];
87//int g_mysterious_dot_counter;
88
89
90
91
92
93/* my subroutines */
94
95void add_disklist_entry(struct list_of_disks *, char *,
96 struct mountlist_itself *);
97void add_mountlist_entry(struct mountlist_itself *,
98 struct raidlist_itself *, newtComponent, int,
99 void *keylist[]);
100void add_varslist_entry(struct raid_device_record *);
101bool ask_me_yes_or_no(char *);
102bool ask_me_OK_or_cancel(char *);
103long calculate_raid_device_size(struct mountlist_itself *,
104 struct raidlist_itself *, char *);
105void choose_raid_level(struct
106#ifdef __FreeBSD__
107 vinum_plex
108#else
109 raid_device_record
110#endif
111 *);
112void close_evalcall_form(void);
113void close_progress_form(void);
114void del_partns_listed_in_disklist(struct mountlist_itself *,
115 struct raidlist_itself *,
116 struct list_of_disks *);
117void delete_disklist_entry(struct list_of_disks *, char *, int);
118void delete_mountlist_entry(struct mountlist_itself *,
119 struct raidlist_itself *, newtComponent, int,
120 void *keylist[]);
121void delete_raidlist_entry(struct mountlist_itself *,
122 struct raidlist_itself *, char *);
123void delete_varslist_entry(struct raid_device_record *, int);
124char *disklist_entry_to_string(struct list_of_disks *, int);
125int edit_filelist(struct s_node *);
126void edit_mountlist_entry(struct mountlist_itself *,
127 struct raidlist_itself *, newtComponent, int,
128 void *keylist[]);
129void edit_raidlist_entry(struct mountlist_itself *,
130 struct raidlist_itself *,
131 struct raid_device_record *, int);
132void edit_varslist_entry(struct raid_device_record *, int);
133int edit_mountlist_in_newt(char *mountlist_fname,
134 struct mountlist_itself *,
135 struct raidlist_itself *);
136int edit_mountlist(char *mountlist_fname, struct mountlist_itself *,
137 struct raidlist_itself *);
138void edit_raidrec_additional_vars(struct raid_device_record *);
139int evaluate_mountlist(struct mountlist_itself *, char *, char *, char *);
140int find_device_in_mountlist(struct mountlist_itself *, char *);
141int find_next_free_index_in_disklist(struct list_of_disks *);
142int find_raid_device_in_raidlist(struct raidlist_itself *, char *);
143bool get_isodir_info(char *, char *, char *, bool);
144void initiate_new_raidlist_entry(struct raidlist_itself *,
145 struct mountlist_itself *, int, char *);
146void insert_essential_additionalvars(struct raid_device_record *);
147bool is_this_raid_personality_registered(int);
148void log_file_end_to_screen(char *, char *);
149void log_to_screen(const char *fmt, ...);
150int look_for_duplicate_mountpoints(struct mountlist_itself *, char *);
151int look_for_weird_formats(struct mountlist_itself *, char *);
152void make_list_of_unallocated_raid_partitions(struct mountlist_itself *,
153 struct mountlist_itself *,
154 struct raidlist_itself *);
155char *mountlist_entry_to_string(struct mountlist_itself *, int);
156void mvaddstr_and_log_it(int, int, char *);
157void nuke_mode_dummy();
158char *number_of_disks_as_string(int, char *);
159void open_evalcall_form(char *);
160void open_progress_form(char *, char *, char *, char *, long);
161void popup_and_OK(char *);
162bool popup_and_get_string(char *, char *, char *, int);
163bool popup_with_buttons(char *, char *, char *);
164void redraw_disklist(struct list_of_disks *, void *keylist[],
165 newtComponent);
166void redraw_mountlist(struct mountlist_itself *, void *keylist[],
167 newtComponent);
168void redraw_unallocpartnslist(struct mountlist_itself *, void *keylist[],
169 newtComponent);
170void redraw_varslist(struct additional_raid_variables *, void *keylist[],
171 newtComponent);
172int read_variableINT_and_remove_from_raidvars(struct raid_device_record *,
173 char *);
174void refresh_log_screen(void);
175void rejig_partition_name_in_raidlist_if_necessary(struct raidlist_itself
176 *, char *, char *);
177void remove_essential_additionalvars(struct raid_device_record *);
178void select_raid_disks(struct mountlist_itself *, struct raidlist_itself *,
179 struct raid_device_record *, char *,
180 struct list_of_disks *);
181void setup_newt_stuff(void);
182long size_of_specific_device(struct mountlist_itself *, char *);
183bool spread_flaws_across_three_lines(char *, char *, char *, char *, int);
184char *turn_raid_level_number_to_string(int);
185void update_evalcall_form(int);
186void update_progress_form(char *);
187void update_progress_form_full(char *, char *, char *);
188char which_restore_mode(void);
189void write_variableINT_to_raid_var_line(struct raid_device_record *, int,
190 char *, int);
191int where_in_drivelist_is_drive(struct list_of_disks *, char *);
192char *strip_path(char *);
193
194
195
196
197/* -------------------------------------------------------------------- */
198
199
200
201
202char tmpnopath[MAX_STR_LEN + 2];
203char tmpprevpath[MAX_STR_LEN + 2];
204
205#ifdef __FreeBSD__
206#undef raid_device_record
207#endif
Note: See TracBrowser for help on using the repository browser.