remove the rest of the references to mice from global visibility
This commit is contained in:
parent
ad397639da
commit
df60477f7c
@ -59,9 +59,6 @@ bool caseless; /* ignore letter case when searching */
|
|||||||
bool *change; /* change this line */
|
bool *change; /* change this line */
|
||||||
char newpat[PATLEN + 1]; /* new pattern */
|
char newpat[PATLEN + 1]; /* new pattern */
|
||||||
|
|
||||||
/* Internal prototypes: */
|
|
||||||
static void scrollbar(MOUSE *p);
|
|
||||||
|
|
||||||
/* read references from a file */
|
/* read references from a file */
|
||||||
bool readrefs(char *filename) {
|
bool readrefs(char *filename) {
|
||||||
FILE *file;
|
FILE *file;
|
||||||
@ -96,43 +93,6 @@ bool readrefs(char *filename) {
|
|||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* scrollbar actions */
|
|
||||||
static void scrollbar(MOUSE *p) {
|
|
||||||
// XXX
|
|
||||||
///* reposition list if it makes sense */
|
|
||||||
// if (totallines == 0) {
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// switch (p->percent) {
|
|
||||||
|
|
||||||
// case 101: /* scroll down one page */
|
|
||||||
// if (nextline + mdisprefs > totallines) {
|
|
||||||
// nextline = totallines - mdisprefs + 1;
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
|
|
||||||
// case 102: /* scroll up one page */
|
|
||||||
// nextline = topline - mdisprefs;
|
|
||||||
// if (nextline < 1) {
|
|
||||||
// nextline = 1;
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
|
|
||||||
// case 103: /* scroll down one line */
|
|
||||||
// nextline = topline + 1;
|
|
||||||
// break;
|
|
||||||
|
|
||||||
// case 104: /* scroll up one line */
|
|
||||||
// if (topline > 1) {
|
|
||||||
// nextline = topline - 1;
|
|
||||||
// }
|
|
||||||
// break;
|
|
||||||
// default:
|
|
||||||
// nextline = p->percent * totallines / 100;
|
|
||||||
// }
|
|
||||||
////seekline(nextline);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* count the references found */
|
/* count the references found */
|
||||||
void countrefs(void) {
|
void countrefs(void) {
|
||||||
char file[PATHLEN + 1]; /* file name */
|
char file[PATHLEN + 1]; /* file name */
|
||||||
|
@ -60,15 +60,6 @@
|
|||||||
|
|
||||||
typedef void (*sighandler_t)(int);
|
typedef void (*sighandler_t)(int);
|
||||||
|
|
||||||
typedef struct { /* mouse action */
|
|
||||||
int button;
|
|
||||||
int percent;
|
|
||||||
int x1;
|
|
||||||
int y1;
|
|
||||||
int x2;
|
|
||||||
int y2;
|
|
||||||
} MOUSE;
|
|
||||||
|
|
||||||
struct cmd { /* command history struct */
|
struct cmd { /* command history struct */
|
||||||
struct cmd *prev, *next; /* list ptrs */
|
struct cmd *prev, *next; /* list ptrs */
|
||||||
int field; /* input field number */
|
int field; /* input field number */
|
||||||
@ -200,16 +191,11 @@ extern struct keystruct {
|
|||||||
struct keystruct *next;
|
struct keystruct *next;
|
||||||
} keyword[];
|
} keyword[];
|
||||||
|
|
||||||
/* mouse.c global data */
|
|
||||||
extern bool mouse; /* mouse interface */
|
|
||||||
|
|
||||||
/* readline.c global data */
|
/* readline.c global data */
|
||||||
extern char *rl_line_buffer;
|
extern char *rl_line_buffer;
|
||||||
extern char input_line[PATLEN + 1];
|
extern char input_line[PATLEN + 1];
|
||||||
extern int rl_point;
|
extern int rl_point;
|
||||||
|
|
||||||
// extern bool unixpcmouse; /* UNIX PC mouse interface */
|
|
||||||
|
|
||||||
/* cscope functions called from more than one function or between files */
|
/* cscope functions called from more than one function or between files */
|
||||||
|
|
||||||
char *filepath(char *file);
|
char *filepath(char *file);
|
||||||
@ -310,8 +296,7 @@ bool readrefs(char *filename);
|
|||||||
bool search(const char *query);
|
bool search(const char *query);
|
||||||
bool writerefsfound(void);
|
bool writerefsfound(void);
|
||||||
|
|
||||||
int findinit(const char *pattern_);
|
int findinit(const char *pattern_);
|
||||||
MOUSE *getmouseaction(char leading_char);
|
|
||||||
|
|
||||||
int egrep(char *file, FILE *output, char *format);
|
int egrep(char *file, FILE *output, char *format);
|
||||||
int hash(const char * ss);
|
int hash(const char * ss);
|
||||||
|
@ -376,8 +376,6 @@ int normal_global_input(const int c) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int change_input(const int c) {
|
int change_input(const int c) {
|
||||||
MOUSE *p; /* mouse data */
|
|
||||||
|
|
||||||
switch(c) {
|
switch(c) {
|
||||||
case '*': /* invert page */
|
case '*': /* invert page */
|
||||||
for(unsigned i = 0; i < (nextline-1); i++) {
|
for(unsigned i = 0; i < (nextline-1); i++) {
|
||||||
@ -391,17 +389,19 @@ int change_input(const int c) {
|
|||||||
}
|
}
|
||||||
window_change |= CH_RESULT;
|
window_change |= CH_RESULT;
|
||||||
break;
|
break;
|
||||||
case ctrl('X'): /* mouse selection */
|
/* MOUSE SELECTION
|
||||||
|
case ctrl('X'):
|
||||||
|
MOUSE *p;
|
||||||
if((p = getmouseaction(DUMMYCHAR)) == NULL) {
|
if((p = getmouseaction(DUMMYCHAR)) == NULL) {
|
||||||
break; /* unknown control sequence */
|
break; // unknown control sequence
|
||||||
}
|
}
|
||||||
/* if the button number is a scrollbar tag */
|
// if the button number is a scrollbar tag
|
||||||
if(p->button == '0') {
|
if(p->button == '0') {
|
||||||
// scrollbar(p);
|
// scrollbar(p);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
/* find the selected line */
|
// find the selected line
|
||||||
/* NOTE: the selection is forced into range */
|
// NOTE: the selection is forced into range
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
for(i = disprefs - 1; i > 0; --i) {
|
for(i = disprefs - 1; i > 0; --i) {
|
||||||
@ -410,6 +410,7 @@ int change_input(const int c) {
|
|||||||
change[i] = !change[i];
|
change[i] = !change[i];
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
*/
|
||||||
case ctrl('D'):
|
case ctrl('D'):
|
||||||
changestring(input_line, newpat, change, totallines);
|
changestring(input_line, newpat, change, totallines);
|
||||||
free(change);
|
free(change);
|
||||||
|
@ -47,6 +47,17 @@ void mousemenu(void);
|
|||||||
void mouseinit(void);
|
void mouseinit(void);
|
||||||
void mousereinit(void);
|
void mousereinit(void);
|
||||||
|
|
||||||
|
typedef struct { /* mouse action */
|
||||||
|
int button;
|
||||||
|
int percent;
|
||||||
|
int x1;
|
||||||
|
int y1;
|
||||||
|
int x2;
|
||||||
|
int y2;
|
||||||
|
} MOUSE;
|
||||||
|
|
||||||
|
MOUSE *getmouseaction(char leading_char);
|
||||||
|
|
||||||
// extern bool unixpcmouse; /* UNIX PC mouse interface */
|
// extern bool unixpcmouse; /* UNIX PC mouse interface */
|
||||||
|
|
||||||
extern int LINES;
|
extern int LINES;
|
||||||
@ -430,3 +441,41 @@ int process_mouse() {
|
|||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// NOTE: this comes from command.c
|
||||||
|
// /* scrollbar actions */
|
||||||
|
// static void scrollbar(MOUSE *p) {
|
||||||
|
// // XXX
|
||||||
|
// ///* reposition list if it makes sense */
|
||||||
|
// // if (totallines == 0) {
|
||||||
|
// // return;
|
||||||
|
// // }
|
||||||
|
// // switch (p->percent) {
|
||||||
|
//
|
||||||
|
// // case 101: /* scroll down one page */
|
||||||
|
// // if (nextline + mdisprefs > totallines) {
|
||||||
|
// // nextline = totallines - mdisprefs + 1;
|
||||||
|
// // }
|
||||||
|
// // break;
|
||||||
|
//
|
||||||
|
// // case 102: /* scroll up one page */
|
||||||
|
// // nextline = topline - mdisprefs;
|
||||||
|
// // if (nextline < 1) {
|
||||||
|
// // nextline = 1;
|
||||||
|
// // }
|
||||||
|
// // break;
|
||||||
|
//
|
||||||
|
// // case 103: /* scroll down one line */
|
||||||
|
// // nextline = topline + 1;
|
||||||
|
// // break;
|
||||||
|
//
|
||||||
|
// // case 104: /* scroll up one line */
|
||||||
|
// // if (topline > 1) {
|
||||||
|
// // nextline = topline - 1;
|
||||||
|
// // }
|
||||||
|
// // break;
|
||||||
|
// // default:
|
||||||
|
// // nextline = p->percent * totallines / 100;
|
||||||
|
// // }
|
||||||
|
// ////seekline(nextline);
|
||||||
|
// }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user