Back to home page

Enduro/X

 
 

    


0001 /**
0002  * @brief Tuxedo ubb config parser -> Enduro/X translator
0003  *
0004  * @file ubb.h
0005  */
0006 /* -----------------------------------------------------------------------------
0007  * Enduro/X Middleware Platform for Distributed Transaction Processing
0008  * Copyright (C) 2009-2016, ATR Baltic, Ltd. All Rights Reserved.
0009  * Copyright (C) 2017-2023, Mavimax, Ltd. All Rights Reserved.
0010  * This software is released under one of the following licenses:
0011  * AGPL (with Java and Go exceptions) or Mavimax's license for commercial use.
0012  * See LICENSE file for full text.
0013  * -----------------------------------------------------------------------------
0014  * AGPL license:
0015  *
0016  * This program is free software; you can redistribute it and/or modify it under
0017  * the terms of the GNU Affero General Public License, version 3 as published
0018  * by the Free Software Foundation;
0019  *
0020  * This program is distributed in the hope that it will be useful, but WITHOUT ANY
0021  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A
0022  * PARTICULAR PURPOSE. See the GNU Affero General Public License, version 3
0023  * for more details.
0024  *
0025  * You should have received a copy of the GNU Affero General Public License along 
0026  * with this program; if not, write to the Free Software Foundation, Inc.,
0027  * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
0028  *
0029  * -----------------------------------------------------------------------------
0030  * A commercial use license is available from Mavimax, Ltd
0031  * contact@mavimax.com
0032  * -----------------------------------------------------------------------------
0033  */
0034 #ifndef UBB_H
0035 #define UBB_H
0036 
0037 #ifdef  __cplusplus
0038 extern "C" {
0039 #endif
0040 
0041 /*---------------------------Includes-----------------------------------*/
0042 #include <ndrx_config.h>
0043 #include <ndrstandard.h>
0044 #include <nstdutil.h>
0045 /*---------------------------Externs------------------------------------*/
0046 /*---------------------------Macros-------------------------------------*/
0047 /*---------------------------Enums--------------------------------------*/
0048 /*---------------------------Typedefs-----------------------------------*/
0049 
0050 /* used for ddr parser */
0051 typedef char ndrx_routcritseq_dl_t;
0052 
0053 /**
0054  * Support structure for parse time
0055  */
0056 typedef struct
0057 {
0058     int     error;       /**< error is not set                           */
0059     int     line;        /**< Line number of config                      */
0060     ndrx_growlist_t  stringbuffer;   /**< list used for string build */
0061     char errbuf[1024];
0062     char *parsebuf;     /**< currently parsing buffer ptr, for ddr       */
0063 } ndrx_ubb_parser_t;
0064 
0065 /*---------------------------Globals------------------------------------*/
0066 extern ndrx_ubb_parser_t ndrx_G_ubbp;      /**< Parsing time attributes, ubb*/
0067 extern ndrx_ubb_parser_t ndrx_G_ddrp;      /**< Parsing time attributes, ddr*/
0068 
0069 extern int ndrx_G_ubbcolumn;
0070 extern int ndrx_G_ubbline;
0071 
0072 /*---------------------------Statics------------------------------------*/
0073 /*---------------------------Prototypes---------------------------------*/
0074 extern void ubberror(char *s, ...);
0075 extern void ddrerror(char *s, ...);
0076 extern int ubbaddarg(char *arg);
0077 extern int ubbaddres(char *arg);
0078 
0079 extern int ubb_add_val(char *arg);
0080 extern int ubb_add_res_parm(char *arg);
0081 extern int ubb_add_sect_parm(char *arg);
0082 extern int ubb_add_sect_keyw(char *arg);
0083 extern int ubb_add_sect(char *arg);
0084 extern int init_vm(char *script_nm, char *opt_n, char *opt_y, char *opt_L,
0085         char *opt_A, char *opt_P, char *opt_O);
0086 extern int call_add_func(const char *func, char *arg);
0087 
0088 extern char *ndrx_ddr_new_rangeval(char *range, int is_negative, int dealloc);
0089 extern ndrx_routcritseq_dl_t * ndrx_ddr_new_rangeexpr(char *range_min, char *range_max);
0090 extern int ndrx_ddr_add_group(ndrx_routcritseq_dl_t * seq, char *grp, int is_mallocd);
0091 
0092 
0093 #ifdef  __cplusplus
0094 }
0095 #endif
0096 
0097 #endif  /* UBB_H */
0098 
0099 /* vim: set ts=4 sw=4 et smartindent: */