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

Diff for /src/usr.bin/less/optfunc.c between version 1.12 and 1.13

version 1.12, 2015/11/07 18:07:44 version 1.13, 2015/11/09 16:39:13
Line 66 
Line 66 
         PARG parg;          PARG parg;
   
         if (secure) {          if (secure) {
                 error("log file support is not available", NULL_PARG);                  error("log file support is not available", NULL);
                 return;                  return;
         }          }
         switch (type) {          switch (type) {
Line 75 
Line 75 
                 break;                  break;
         case TOGGLE:          case TOGGLE:
                 if (ch_getflags() & CH_CANSEEK) {                  if (ch_getflags() & CH_CANSEEK) {
                         error("Input is not a pipe", NULL_PARG);                          error("Input is not a pipe", NULL);
                         return;                          return;
                 }                  }
                 if (logfile >= 0) {                  if (logfile >= 0) {
                         error("Log file is already in use", NULL_PARG);                          error("Log file is already in use", NULL);
                         return;                          return;
                 }                  }
                 s = skipsp(s);                  s = skipsp(s);
Line 89 
Line 89 
                 break;                  break;
         case QUERY:          case QUERY:
                 if (logfile < 0) {                  if (logfile < 0) {
                         error("No log file", NULL_PARG);                          error("No log file", NULL);
                 } else {                  } else {
                         parg.p_string = namelogfile;                          parg.p_string = namelogfile;
                         error("Log file \"%s\"", &parg);                          error("Log file \"%s\"", &parg);
Line 126 
Line 126 
                         s++;                          s++;
                         jump_sline_fraction = getfraction(&s, "j", &err);                          jump_sline_fraction = getfraction(&s, "j", &err);
                         if (err)                          if (err)
                                 error("Invalid line fraction", NULL_PARG);                                  error("Invalid line fraction", NULL);
                         else                          else
                                 calc_jump_sline();                                  calc_jump_sline();
                 } else {                  } else {
                         int sline = getnum(&s, "j", &err);                          int sline = getnum(&s, "j", &err);
                         if (err) {                          if (err) {
                                 error("Invalid line number", NULL_PARG);                                  error("Invalid line number", NULL);
                         } else {                          } else {
                                 jump_sline = sline;                                  jump_sline = sline;
                                 jump_sline_fraction = -1;                                  jump_sline_fraction = -1;
Line 183 
Line 183 
                         s++;                          s++;
                         shift_count_fraction = getfraction(&s, "#", &err);                          shift_count_fraction = getfraction(&s, "#", &err);
                         if (err)                          if (err)
                                 error("Invalid column fraction", NULL_PARG);                                  error("Invalid column fraction", NULL);
                         else                          else
                                 calc_shift_count();                                  calc_shift_count();
                 } else {                  } else {
                         int hs = getnum(&s, "#", &err);                          int hs = getnum(&s, "#", &err);
                         if (err) {                          if (err) {
                                 error("Invalid column number", NULL_PARG);                                  error("Invalid column number", NULL);
                         } else {                          } else {
                                 shift_count = hs;                                  shift_count = hs;
                                 shift_count_fraction = -1;                                  shift_count_fraction = -1;
Line 254 
Line 254 
                 break;                  break;
         case TOGGLE:          case TOGGLE:
                 if (secure) {                  if (secure) {
                         error("tags support is not available", NULL_PARG);                          error("tags support is not available", NULL);
                         break;                          break;
                 }                  }
                 findtag(skipsp(s));                  findtag(skipsp(s));
Line 501 
Line 501 
                 }                  }
                 if (s[1] != '\0' && s[2] != '\0') {                  if (s[1] != '\0' && s[2] != '\0') {
                         error("-\" must be followed by 1 or 2 chars",                          error("-\" must be followed by 1 or 2 chars",
                             NULL_PARG);                              NULL);
                         return;                          return;
                 }                  }
                 openquote = s[0];                  openquote = s[0];
Line 531 
Line 531 
         switch (type) {          switch (type) {
         case QUERY:          case QUERY:
         case TOGGLE:          case TOGGLE:
                 error("Use \"h\" for help", NULL_PARG);                  error("Use \"h\" for help", NULL);
                 break;                  break;
         case INIT:          case INIT:
                 dohelp = 1;                  dohelp = 1;

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