00001 /* 00002 * DB-ALLe - Archive for punctual meteorological data 00003 * 00004 * Copyright (C) 2005,2006 ARPA-SIM <urpsim@smr.arpa.emr.it> 00005 * 00006 * This program is free software; you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation; either version 2 of the License. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA 00018 * 00019 * Author: Enrico Zini <enrico@enricozini.com> 00020 */ 00021 00022 #ifndef BUFREX_OPCODE_H 00023 #define BUFREX_OPCODE_H 00024 00025 #ifdef __cplusplus 00026 extern "C" { 00027 #endif 00028 00035 #include <dballe/core/vartable.h> 00036 00040 struct _bufrex_opcode 00041 { 00043 dba_varcode val; 00045 struct _bufrex_opcode* next; 00046 }; 00048 typedef struct _bufrex_opcode* bufrex_opcode; 00049 00056 void bufrex_opcode_delete(bufrex_opcode* entry); 00057 00068 dba_err bufrex_opcode_append(bufrex_opcode* entry, dba_varcode value); 00069 00093 dba_err bufrex_opcode_prepend(bufrex_opcode* dest, bufrex_opcode src); 00094 00105 dba_err bufrex_opcode_join(bufrex_opcode* op1, bufrex_opcode op2); 00106 00119 dba_err bufrex_opcode_pop(bufrex_opcode* chain, bufrex_opcode* head); 00120 00136 dba_err bufrex_opcode_pop_n(bufrex_opcode* chain, bufrex_opcode* head, int length); 00137 00149 void bufrex_opcode_print(bufrex_opcode chain, void* outstream); 00150 00151 #if 0 00152 00161 #define bufrex_opcode_next(entry) ((entry)->next) 00162 /*bufrex_opcode bufrex_opcode_next(bufrex_opcode entry);*/ 00163 00176 bufrex_opcode bufrex_opcode_copy_n(bufrex_opcode entry, int length); 00177 00178 /* void bufrex_opcode_print(bufrex_opcode entry, FILE* out); */ 00179 #endif 00180 00181 #ifdef __cplusplus 00182 } 00183 #endif 00184 00185 #endif