Jelajahi Sumber

core: mpath aliased to loadpath (for K compatibility)

- accepts now loadpath="searchpath" (K stype)
Daniel-Constantin Mierla 16 tahun lalu
induk
melakukan
8d503e9e3d
2 mengubah file dengan 7 tambahan dan 1 penghapusan
  1. 1 1
      cfg.lex
  2. 6 0
      cfg.y

+ 1 - 1
cfg.lex

@@ -407,7 +407,7 @@ SERVER_ID     "server_id"
 CFG_DESCRIPTION		"description"|"descr"|"desc"
 
 LOADMODULE	loadmodule
-LOADPATH	loadpath
+LOADPATH	"loadpath"|"mpath"
 MODPARAM        modparam
 
 /* values */

+ 6 - 0
cfg.y

@@ -1410,6 +1410,12 @@ module_stm:
 		mods_dir = $2;
 	}
 	| LOADPATH error	{ yyerror("string expected"); }
+	| LOADPATH EQUAL STRING {
+		DBG("loading modules under %s\n", $3);
+		printf("loading modules under %s\n", $3);
+		mods_dir = $3;
+	}
+	| LOADPATH EQUAL error	{ yyerror("string expected"); }
 	| MODPARAM LPAREN STRING COMMA STRING COMMA STRING RPAREN {
 		if (set_mod_param_regex($3, $5, PARAM_STRING, $7) != 0) {
 			 yyerror("Can't set module parameter");