* 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.
This commit is contained in:
Pavel Roskin 2001-07-24 15:04:21 +00:00
parent fd895e3759
commit 159b4aa1ef
6 changed files with 25 additions and 22 deletions

View File

@ -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>
* user.c: Eliminate static variable s_editwidget. Pass

View File

@ -64,6 +64,8 @@
#define B_OUSER B_USER + 6
#define B_OGROUP B_USER + 7
static struct Dlg_head *ch_dlg;
static struct {
int ret_cmd, flags, y, x;
char *text;
@ -88,7 +90,7 @@ static int x_toggle;
static char ch_flags[11];
static char *ch_perm = "rwx";
static umode_t ch_cmode;
struct stat *sf_stat;
static struct stat *sf_stat;
static int need_update;
static int end_chown;
static int current_file;
@ -265,7 +267,7 @@ static void do_enter_key (Dlg_head *h, int f_pos)
chl_end = 0;
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 */
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;
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, \
chown_advanced_but[i].ret_cmd, chown_advanced_but[i].flags, _(chown_advanced_but[i].text), \

View File

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

View File

@ -4,11 +4,4 @@ void chmod_cmd (void);
int stat_file (char *, struct stat *);
void ch1_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

View File

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

View File

@ -71,11 +71,11 @@
#include "../vfs/vfs.h"
/* 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 */
/* to hint the filename_completion_function */
int look_for_executables = 0;
static int look_for_executables = 0;
static char *
filename_completion_function (char *text, int state)
@ -1025,7 +1025,7 @@ complete_engine (WInput *in, int what_to_do)
query_width = w;
query_dlg = create_dlg (y, x, query_height, query_width,
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);
add_widget (query_dlg, query_list);
for (p = in->completions + 1; *p; p++)