chiark / gitweb /
Upgrade licence to GPLv3+.
[userv.git] / tokens.h.m4
index 21a3dbe0678ea90a23ddcf77b4ef303157c3937d..4887682e07de33eb32fe1502c4875048efadb456 100644 (file)
@@ -1,21 +1,23 @@
 dnl  userv - tokens.h.m4
 dnl  token values, passed through m4 with defs from langauge.i4
 /*  
- *   Copyright (C)1996-1997 Ian Jackson
- *  
- *   This is free software; you can redistribute it and/or modify it
- *   under the terms of the GNU General Public License as published by
- *   the Free Software Foundation; either version 2 of the License, or
- *   (at your option) any later version.
- *  
- *   This program is distributed in the hope that it will be useful, but
- *   WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *   General Public License for more details.
- *  
- *   You should have received a copy of the GNU General Public License
- *   along with userv; if not, write to the Free Software
- *   Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ * userv is
+ * Copyright 1996-2017 Ian Jackson <ian@davenant.greenend.org.uk>.
+ * Copyright 2000      Ben Harris <bjh21@cam.ac.uk>
+ * Copyright 2016-2017 Peter Benie <pjb1008@cam.ac.uk>
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with userv; if not, see <http://www.gnu.org/licenses/>.
  */
 
 include(language.i4)
@@ -24,67 +26,18 @@ include(language.i4)
 #define TOKENS_H
 
 enum tokens {
-  tokm_instance=           000000000777,
-  tokm_repres=             000000007000,
-  tokm_type=               017777770000,
-  tokr_nonstring=          000000001000,
-  tokr_word=               000000002000,
-  tokr_punct=              000000003000,
-  tokr_string=             000000004000,
+  tokm_instance=           0x000000ff,
+  tokm_repres=             0x00000f00,
+  tokm_type=               0xfffff000,
+  tokr_nonstring=          0x00000100,
+  tokr_word=               0x00000200,
+  tokr_punct=              0x00000300,
+  tokr_string=             0x00000400,
 undivert(4)
 undivert(1)
 undivert(2)
 };
 
-typedef int directive_fnt(int dtoken);
-directive_fnt df_reject, df_execute, df_executefrompath;
-directive_fnt df_executefromdirectory;
-directive_fnt df_errorstostderr, df_errorstosyslog, df_errorstofile;
-directive_fnt dfg_fdwant, dfg_setflag;
-directive_fnt df_reset, df_cd, df_userrcfile, df_include;
-directive_fnt df_includelookup, df_includedirectory;
-directive_fnt df_message, df_error, df_quit, df_eof;
-directive_fnt df_if, df_catchquit, df_errorspush;
-directive_fnt dfi_includeuserrcfile, dfi_includeclientconfig;
-/* directive functions return:
- *  0 for success
- *   having scanned up to and including end of line but not beyond
- *  an exception (eg tokv_error) for failure of some kind
- */
-
-typedef int parmcondition_fnt(int ctoken, char **parmvalues, int *rtrue);
-parmcondition_fnt pcf_glob, pcf_range, pcf_grep;
-/* all conditional functions return tokv_error or 0 for success at parsing
- *  and testing, in which case *rtrue is set to 0 or 1.  On success they
- *  have scanned up to and including the condition's terminating newline.
- * The parameter-based conditionals take a list of parameter values
- * as obtained from the parameter functions and pa_parameter,
- * and do _not_ free it.
- */
-
-typedef int parameter_fnt(int ptoken, char ***rvalues);
-parameter_fnt pf_service;
-parameter_fnt pf_callinguser, pf_serviceuser;
-parameter_fnt pf_callinggroup, pf_servicegroup;
-parameter_fnt pf_callingusershell, pf_serviceusershell;
-/* Parameter functions return tokv_error or 0 for success at parsing
- * and determining the value, in which case *rvalues is made to be
- * a mallocd null-terminated array of pointers to mallocd strings.
- * freeparm can be used to free such an array.
- */
-
-int yylex(void);
-/* Returns a token (which may be a eof or error exception) */
-
-extern directive_fnt *lr_dir;
-extern parmcondition_fnt *lr_parmcond;
-extern parameter_fnt *lr_parameter;
-extern int lr_loglevel, lr_logfacility, lr_min, lr_max, *lr_flag;
-extern int lr_flagval, lr_controlend;
-extern int lr_fdwant_readwrite; /* -1=never, 0=opt, 1=always */
-
-undivert(4)
-
 #endif
 
 divert(-1)