Commit c3d0f919 authored by Jan Maria Matejka's avatar Jan Maria Matejka
Browse files

Merge branch 'int-new' into mq-taskqueue

parents 1e52cd6a d4cebc6b
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -100,6 +100,7 @@ static struct include_file_stack *ifs_head;
#define YY_INPUT(buf,result,max) result = cf_read_hook(buf, max, ifs->fd);
#define YY_NO_UNPUT
#define YY_FATAL_ERROR(msg) cf_error(msg)
#define YY_USER_ACTION ifs->chno += yyleng; ifs->toklen = yyleng;

static void cf_include(char *arg, int alen);
static int check_eof(void);
@@ -313,7 +314,7 @@ else: {

{WHITE}+

\n	ifs->lino++;
\n	ifs->lino++; ifs->chno = 0;

#	BEGIN(COMMENT);

@@ -323,13 +324,14 @@ else: {

<COMMENT>\n {
  ifs->lino++;
  ifs->chno = 0;
  BEGIN(INITIAL);
}

<COMMENT>.

<CCOMM>\*\/	BEGIN(INITIAL);
<CCOMM>\n	ifs->lino++;
<CCOMM>\n	ifs->lino++; ifs->chno = 0;
<CCOMM>\/\*	cf_error("Comment nesting not supported");
<CCOMM><<EOF>>	cf_error("Unterminated comment");
<CCOMM>.
+1 −0
Original line number Diff line number Diff line
@@ -512,6 +512,7 @@ cf_error(const char *msg, ...)
  va_end(args);
  new_config->err_msg = cfg_strdup(buf);
  new_config->err_lino = ifs->lino;
  new_config->err_chno = ifs->chno - ifs->toklen + 1;
  new_config->err_file_name = ifs->file_name;
  cf_lex_unwind();
  longjmp(conf_jmpbuf, 1);
+3 −1
Original line number Diff line number Diff line
@@ -47,6 +47,7 @@ struct config {
  u32 watchdog_timeout;			/* Watchdog timeout (in seconds, 0 = disabled) */
  char *err_msg;			/* Parser error message */
  int err_lino;				/* Line containing error */
  int err_chno;				/* Character where the parser stopped */
  char *err_file_name;			/* File name containing error */
  char *file_name;			/* Name of main configuration file */
  int file_fd;				/* File descriptor of main configuration file */
@@ -139,6 +140,8 @@ struct include_file_stack {
  char *file_name;			/* File name */
  int fd;				/* File descriptor */
  int lino;				/* Current line num */
  int chno;				/* Current char num (on current line) */
  int toklen;				/* Current token length */
  int depth;				/* Include depth, 0 = cannot include */

  struct include_file_stack *prev;	/* Previous record in stack */
@@ -147,7 +150,6 @@ struct include_file_stack {

extern struct include_file_stack *ifs;


int cf_lex(void);
void cf_lex_init(int is_cli, struct config *c);
void cf_lex_unwind(void);
+1 −0
Original line number Diff line number Diff line
@@ -424,6 +424,7 @@ int bvsnprintf(char *buf, int size, const char *fmt, va_list args)

		case 'X':
			flags |= LARGE;
			/* fallthrough */
		case 'x':
			base = 16;
			break;
+1 −1
Original line number Diff line number Diff line
@@ -805,7 +805,7 @@ as_path_match(const struct adata *path, struct f_path_mask *mask)
	  val2 = val = mask->val;
	  goto step;
	case PM_ASN_EXPR:
	  ASSERT(0);
	  bug("Expressions should be evaluated on AS path mask construction.");
	case PM_ASN_RANGE:
	  val = mask->val;
	  val2 = mask->val2;
Loading