[BACK]Return to lesskey.c CVS log [TXT][DIR] Up to [local] / src / usr.bin / less

Diff for /src/usr.bin/less/lesskey.c between version 1.13 and 1.14

version 1.13, 2015/11/19 18:39:49 version 1.14, 2015/11/23 09:39:55
Line 92 
Line 92 
         int cn_action;          int cn_action;
 };  };
   
 static void lkerr(char *s);  static void     lkerr(char *);
   
 struct cmdname cmdnames[] = {  struct cmdname cmdnames[] = {
         { "back-bracket",               A_B_BRACKET },          { "back-bracket",               A_B_BRACKET },
Line 215 
Line 215 
   
 extern char version[];  extern char version[];
   
 void  static void
 usage(void)  usage(void)
 {  {
         (void) fprintf(stderr, "usage: lesskey [-o output] [input]\n");          (void) fprintf(stderr, "usage: lesskey [-o output] [input]\n");
         exit(1);          exit(1);
 }  }
   
 char *  static char *
 mkpathname(char *dirname, char *filename)  mkpathname(char *dirname, char *filename)
 {  {
         char *pathname;          char *pathname;
Line 260 
Line 260 
 /*  /*
  * Parse command line arguments.   * Parse command line arguments.
  */   */
 void  static void
 parse_args(int argc, char **argv)  parse_args(int argc, char **argv)
 {  {
         char *arg;          char *arg;
Line 327 
Line 327 
 /*  /*
  * Initialize data structures.   * Initialize data structures.
  */   */
 void  static void
 init_tables(void)  init_tables(void)
 {  {
         cmdtable.names = cmdnames;          cmdtable.names = cmdnames;
Line 343 
Line 343 
 /*  /*
  * Parse one character of a string.   * Parse one character of a string.
  */   */
 char *  static char *
 tstr(char **pp, int xlate)  tstr(char **pp, int xlate)
 {  {
         char *p;          char *p;
Line 465 
Line 465 
 /*  /*
  * Skip non-space characters in a string.   * Skip non-space characters in a string.
  */   */
 char *  static char *
 skipnsp(char *s)  skipnsp(char *s)
 {  {
         while (*s != '\0' && *s != ' ' && *s != '\t')          while (*s != '\0' && *s != ' ' && *s != '\t')
Line 477 
Line 477 
  * Clean up an input line:   * Clean up an input line:
  * strip off the trailing newline & any trailing # comment.   * strip off the trailing newline & any trailing # comment.
  */   */
 char *  static char *
 clean_line(char *s)  clean_line(char *s)
 {  {
         int i;          int i;
Line 493 
Line 493 
 /*  /*
  * Add a byte to the output command table.   * Add a byte to the output command table.
  */   */
 void  static void
 add_cmd_char(int c)  add_cmd_char(int c)
 {  {
         if (currtable->pbuffer >= currtable->buffer + MAX_USERCMD) {          if (currtable->pbuffer >= currtable->buffer + MAX_USERCMD) {
Line 506 
Line 506 
 /*  /*
  * Add a string to the output command table.   * Add a string to the output command table.
  */   */
 void  static void
 add_cmd_str(char *s)  add_cmd_str(char *s)
 {  {
         for (; *s != '\0'; s++)          for (; *s != '\0'; s++)
Line 516 
Line 516 
 /*  /*
  * See if we have a special "control" line.   * See if we have a special "control" line.
  */   */
 int  static int
 control_line(char *s)  control_line(char *s)
 {  {
 #define PREFIX(str, pat)        (strncmp(str, pat, strlen(pat)) == 0)  #define PREFIX(str, pat)        (strncmp(str, pat, strlen(pat)) == 0)
Line 544 
Line 544 
 /*  /*
  * Output some bytes.   * Output some bytes.
  */   */
 void  static void
 fputbytes(FILE *fd, char *buf, int len)  fputbytes(FILE *fd, char *buf, int len)
 {  {
         while (len-- > 0) {          while (len-- > 0) {
Line 556 
Line 556 
 /*  /*
  * Output an integer, in special KRADIX form.   * Output an integer, in special KRADIX form.
  */   */
 void  static void
 fputint(FILE *fd, unsigned int val)  fputint(FILE *fd, unsigned int val)
 {  {
         char c;          char c;
Line 575 
Line 575 
 /*  /*
  * Find an action, given the name of the action.   * Find an action, given the name of the action.
  */   */
 int  static int
 findaction(char *actname)  findaction(char *actname)
 {  {
         int i;          int i;
Line 587 
Line 587 
         return (A_INVALID);          return (A_INVALID);
 }  }
   
 void  static void
 lkerr(char *s)  lkerr(char *s)
 {  {
         (void) fprintf(stderr, "line %d: %s\n", linenum, s);          (void) fprintf(stderr, "line %d: %s\n", linenum, s);
Line 595 
Line 595 
 }  }
   
   
 void  static void
 parse_cmdline(char *p)  parse_cmdline(char *p)
 {  {
         int cmdlen;          int cmdlen;
Line 660 
Line 660 
         }          }
 }  }
   
 void  static void
 parse_varline(char *p)  parse_varline(char *p)
 {  {
         char *s;          char *s;
Line 693 
Line 693 
 /*  /*
  * Parse a line from the lesskey file.   * Parse a line from the lesskey file.
  */   */
 void  static void
 parse_line(char *line)  parse_line(char *line)
 {  {
         char *p;          char *p;

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14