#include "spice.h"
#include "cpdefs.h"
#include <sys/types.h>
#include "suffix.h"
Go to the source code of this file.
|
static struct ccom * | getccom () |
|
static wordlist * | ccfilec () |
|
static wordlist * | ccmatch () |
|
static void | printem () |
|
static wordlist * | cctowl () |
|
static void | throwaway () |
|
static struct ccom * | clookup () |
|
static void | cdelete () |
|
void | cp_ccom (wordlist *wlist, char *buf, bool esc) |
|
static wordlist * | cctowl (struct ccom *cc, bool sib) |
|
wordlist * | cp_cctowl (char *stuff) |
|
void | cp_ccon (bool on) |
|
bool | cp_comlook (char *word) |
|
void | cp_addcomm (char *word, long bits0, long bits1, long bits2, long bits3) |
|
void | cp_remcomm (char *word) |
|
void | cp_addkword (int class, char *word) |
|
void | cp_remkword (class, char *word) |
|
char * | cp_kwswitch (int class, char *tree) |
|
void | cp_ccfreetrie (char *pntr) |
|
void | cp_ccrestart (bool kwords) |
|
static void | throwaway (struct ccom *dbase) |
|
static struct ccom * | clookup (char *word, struct ccom **dd, bool pref, bool create) |
|
static void | cdelete (struct ccom *node) |
|
Definition at line 376 of file complete.c.
struct wordlist * wl_prev
static wordlist * cctowl()
struct wordlist * wl_next
static void cdelete |
( |
struct ccom * |
node | ) |
|
|
static |
static struct ccom* clookup |
( |
| ) |
|
|
static |
static struct ccom* clookup |
( |
char * |
word, |
|
|
struct ccom ** |
dd, |
|
|
bool |
pref, |
|
|
bool |
create |
|
) |
| |
|
static |
Definition at line 686 of file complete.c.
693 struct ccom *place = *dd, *tmpc;
697 if (!word || !*word)
return place;
718 if (place->
cc_name[ind] < word[ind]) {
729 for (i = 0; i < ind + 1; i++)
731 place->
cc_name[ind + 1] =
'\0';
734 else if (place->
cc_name[ind] > word[ind]) {
745 if (tmpc->cc_ysibling)
747 else if (tmpc->cc_parent)
752 for (i = 0; i < ind + 1; i++)
754 place->
cc_name[ind + 1] =
'\0';
770 tmpc->cc_parent = place;
774 for (i = 0; i < ind + 2; i++)
776 place->
cc_name[ind + 2] =
'\0';
static char buf[MAXPROMPT]
struct ccom * cc_ysibling
void cp_addcomm |
( |
char * |
word, |
|
|
long |
bits0, |
|
|
long |
bits1, |
|
|
long |
bits2, |
|
|
long |
bits3 |
|
) |
| |
Definition at line 520 of file complete.c.
static struct ccom * clookup()
static struct ccom * commands
void cp_addkword |
( |
int |
class, |
|
|
char * |
word |
|
) |
| |
Definition at line 559 of file complete.c.
569 if ((
class < 1) || (
class >=
NCLASSES)) {
570 fprintf(
cp_err,
"cp_addkword: Internal Error: bad class %d\n",
static struct ccom * clookup()
static struct ccom * keywords[NCLASSES]
void cp_ccfreetrie |
( |
char * |
pntr | ) |
|
Definition at line 626 of file complete.c.
631 struct ccom *dbase = (
struct ccom*)pntr;
static struct ccom * commands
static struct ccom * keywords[NCLASSES]
Definition at line 423 of file complete.c.
429 #ifdef HAVE_TERMIOS_H 431 #define TERM_GET TCGETS 432 #define TERM_SET TCSETS 433 static struct termios
sbuf;
434 static struct termios OS_Buf;
440 #define TERM_GET TCGETA 441 #define TERM_SET TCSETA 442 static struct termio
sbuf;
443 static struct termio OS_Buf;
447 static bool ison =
false;
459 (void) ioctl(fileno(
cp_in), TIOCGETC, (
char *) &tbuf);
464 (void) ioctl(fileno(
cp_in), TIOCSETC, (
char *) &tbuf);
466 (void) ioctl(fileno(
cp_in), TIOCGETP, (
char *) &
sbuf);
467 sbuf.sg_flags &= ~(RAW|CBREAK);
468 (void) ioctl(fileno(
cp_in), TIOCSETP, (
char *) &sbuf);
474 static bool ison =
false;
481 (void) ioctl(fileno(
cp_in), TERM_GET, (
char *) &OS_Buf);
486 (void) ioctl(fileno(
cp_in), TERM_SET, (
char *) &sbuf);
489 (void) ioctl(fileno(
cp_in), TERM_SET, (
char *) &OS_Buf);
void cp_ccrestart |
( |
bool |
kwords | ) |
|
Definition at line 645 of file complete.c.
static struct ccom * commands
static struct ccom * keywords[NCLASSES]
Definition at line 412 of file complete.c.
static wordlist * cctowl()
bool cp_comlook |
( |
char * |
word | ) |
|
Definition at line 506 of file complete.c.
static struct ccom * clookup()
static struct ccom * commands
char* cp_kwswitch |
( |
int |
class, |
|
|
char * |
tree |
|
) |
| |
Definition at line 607 of file complete.c.
614 if ((
class < 1) || (
class >=
NCLASSES)) {
615 fprintf(
cp_err,
"cp_addkword: Internal Error: bad class %d\n",
static struct ccom * keywords[NCLASSES]
void cp_remcomm |
( |
char * |
word | ) |
|
Definition at line 543 of file complete.c.
static struct ccom * clookup()
static struct ccom * commands
void cp_remkword |
( |
class |
, |
|
|
char * |
word |
|
) |
| |
Definition at line 583 of file complete.c.
589 if ((
class < 1) || (
class >=
NCLASSES)) {
590 fprintf(
cp_err,
"cp_addkword: Internal Error: bad class %d\n",
static struct ccom * clookup()
static struct ccom * keywords[NCLASSES]
static struct ccom* getccom |
( |
| ) |
|
|
static |
static void throwaway |
( |
| ) |
|
|
static |
static void throwaway |
( |
struct ccom * |
dbase | ) |
|
|
static |