1
1

* achown.c: Make all global variables static. Fix help.

* complete.c: Likewise.
* chmod.c: Make all global variables static.
* chown.c: Likewise.
* chmod.h: Remove all variables.
Этот коммит содержится в:
Pavel Roskin 2001-07-24 15:04:21 +00:00
родитель fd895e3759
Коммит 159b4aa1ef
6 изменённых файлов: 25 добавлений и 22 удалений

Просмотреть файл

@ -1,3 +1,11 @@
2001-07-24 Pavel Roskin <proski@gnu.org>
* achown.c: Make all global variables static. Fix help.
* complete.c: Likewise.
* chmod.c: Make all global variables static.
* chown.c: Likewise.
* chmod.h: Remove all variables.
2001-07-23 Pavel Roskin <proski@gnu.org> 2001-07-23 Pavel Roskin <proski@gnu.org>
* user.c: Eliminate static variable s_editwidget. Pass * user.c: Eliminate static variable s_editwidget. Pass

Просмотреть файл

@ -64,6 +64,8 @@
#define B_OUSER B_USER + 6 #define B_OUSER B_USER + 6
#define B_OGROUP B_USER + 7 #define B_OGROUP B_USER + 7
static struct Dlg_head *ch_dlg;
static struct { static struct {
int ret_cmd, flags, y, x; int ret_cmd, flags, y, x;
char *text; char *text;
@ -88,7 +90,7 @@ static int x_toggle;
static char ch_flags[11]; static char ch_flags[11];
static char *ch_perm = "rwx"; static char *ch_perm = "rwx";
static umode_t ch_cmode; static umode_t ch_cmode;
struct stat *sf_stat; static struct stat *sf_stat;
static int need_update; static int need_update;
static int end_chown; static int end_chown;
static int current_file; static int current_file;
@ -265,7 +267,7 @@ static void do_enter_key (Dlg_head *h, int f_pos)
chl_end = 0; chl_end = 0;
chl_dlg = create_dlg (lyy, lxx, 13, 17, dialog_colors, chl_callback, chl_dlg = create_dlg (lyy, lxx, 13, 17, dialog_colors, chl_callback,
"[Chown-advanced]", "achown_enter", DLG_NONE); "[Advanced Chown]", "achown_enter", DLG_NONE);
/* get new listboxes */ /* get new listboxes */
chl_list = listbox_new (1, 1, 15, 11, 0, l_call, NULL); chl_list = listbox_new (1, 1, 15, 11, 0, l_call, NULL);
@ -553,7 +555,7 @@ static void init_chown_advanced (void)
x_toggle = 070; x_toggle = 070;
ch_dlg = create_dlg (0, 0, 13, 74, dialog_colors, advanced_chown_callback, ch_dlg = create_dlg (0, 0, 13, 74, dialog_colors, advanced_chown_callback,
"[Chown-advanced]", "achown", DLG_CENTER); "[Advanced Chown]", "achown", DLG_CENTER);
#define XTRACT(i) BY+chown_advanced_but[i].y, BX+chown_advanced_but[i].x, \ #define XTRACT(i) BY+chown_advanced_but[i].y, BX+chown_advanced_but[i].x, \
chown_advanced_but[i].ret_cmd, chown_advanced_but[i].flags, _(chown_advanced_but[i].text), \ chown_advanced_but[i].ret_cmd, chown_advanced_but[i].flags, _(chown_advanced_but[i].text), \

Просмотреть файл

@ -47,7 +47,7 @@
#include "../vfs/vfs.h" #include "../vfs/vfs.h"
static int single_set; static int single_set;
struct Dlg_head *ch_dlg; static struct Dlg_head *ch_dlg;
#define PX 5 #define PX 5
#define PY 2 #define PY 2
@ -69,19 +69,18 @@ struct Dlg_head *ch_dlg;
#define B_SETMRK B_USER+2 #define B_SETMRK B_USER+2
#define B_CLRMRK B_USER+3 #define B_CLRMRK B_USER+3
int mode_change, need_update; static int mode_change, need_update;
int c_file, end_chmod; static int c_file, end_chmod;
umode_t and_mask, or_mask, c_stat; static umode_t and_mask, or_mask, c_stat;
char *c_fname, *c_fown, *c_fgrp, *c_fperm; static char *c_fname, *c_fown, *c_fgrp;
int c_fsize;
static WLabel *statl; static WLabel *statl;
static int normal_color; static int normal_color;
static int title_color; static int title_color;
static int selection_color; static int selection_color;
struct { static struct {
mode_t mode; mode_t mode;
char *text; char *text;
int selected; int selected;
@ -102,7 +101,7 @@ struct {
{ S_ISUID, N_("set user ID on execution"), 0, 0, }, { S_ISUID, N_("set user ID on execution"), 0, 0, },
}; };
struct { static struct {
int ret_cmd, flags, y, x; int ret_cmd, flags, y, x;
char *text; char *text;
} chmod_but[BUTTONS] = } chmod_but[BUTTONS] =

Просмотреть файл

@ -4,11 +4,4 @@ void chmod_cmd (void);
int stat_file (char *, struct stat *); int stat_file (char *, struct stat *);
void ch1_cmd (int id); void ch1_cmd (int id);
void ch2_cmd (int id); void ch2_cmd (int id);
extern Dlg_head *ch_dlg;
extern umode_t c_stat;
extern char *c_fname, *c_fown, *c_fgrp, *c_fperm;
extern int c_fsize;
#endif #endif

Просмотреть файл

@ -66,11 +66,12 @@
#define B_SETUSR B_USER + 1 #define B_SETUSR B_USER + 1
#define B_SETGRP B_USER + 2 #define B_SETGRP B_USER + 2
/* struct stat *sf_stat; */ static struct Dlg_head *ch_dlg;
static int need_update, end_chown; static int need_update, end_chown;
static int current_file; static int current_file;
static int single_set; static int single_set;
static WListbox *l_user, *l_group; static WListbox *l_user, *l_group;
static int c_fsize;
static struct { static struct {
int ret_cmd, flags, y, x; int ret_cmd, flags, y, x;

Просмотреть файл

@ -71,11 +71,11 @@
#include "../vfs/vfs.h" #include "../vfs/vfs.h"
/* This flag is used in filename_completion_function */ /* This flag is used in filename_completion_function */
int ignore_filenames = 0; static int ignore_filenames = 0;
/* This flag is used by command_completion_function */ /* This flag is used by command_completion_function */
/* to hint the filename_completion_function */ /* to hint the filename_completion_function */
int look_for_executables = 0; static int look_for_executables = 0;
static char * static char *
filename_completion_function (char *text, int state) filename_completion_function (char *text, int state)
@ -1025,7 +1025,7 @@ complete_engine (WInput *in, int what_to_do)
query_width = w; query_width = w;
query_dlg = create_dlg (y, x, query_height, query_width, query_dlg = create_dlg (y, x, query_height, query_width,
dialog_colors, query_callback, dialog_colors, query_callback,
"[Completion-query]", "complete", DLG_NONE); "[Completion]", "complete", DLG_NONE);
query_list = listbox_new (1, 1, w - 2, h - 2, 0, querylist_callback, NULL); query_list = listbox_new (1, 1, w - 2, h - 2, 0, querylist_callback, NULL);
add_widget (query_dlg, query_list); add_widget (query_dlg, query_list);
for (p = in->completions + 1; *p; p++) for (p = in->completions + 1; *p; p++)