13
13
GNU General Public License for more details.
15
15
You should have received a copy of the GNU General Public License
16
along with this program; if not, write to the Free Software
17
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
16
along with this program. If not, see <http://www.gnu.org/licenses/>.
21
20
Description: Header to tX_global.c / defines the heavily used
26
21 Jul 1999: Introduced the lowpass globals.
29
24
#ifndef _TX_GLOBAL_H
223
218
#define store_float_id(s, i, id); tX_store((sizeof(i)>4) ? "%s<%s id=\"%i\">%lf</%s>\n" : "%s<%s id=\"%i\">%f</%s>\n", indent, s, id, i, s);
224
219
#define store_bool_id(s, i, id); tX_store("%s<%s id=\"%i\">%s</%s>\n", indent, s, id, i ? "true" : "false", s);
221
#define store_id_sp(name, sp); { tX_store("%s<%s ", indent, name); sp.store_meta(rc, rz); tX_store("/>\n"); }
226
222
#define store_int_sp(name, i, sp); { tX_store("%s<%s ", indent, name); sp.store_meta(rc, rz); tX_store(">%i</%s>\n", (int) i, name); }
227
223
#define store_float_sp(name, i, sp); { tX_store("%s<%s ", indent, name); sp.store_meta(rc, rz); tX_store((sizeof(i)>4) ? ">%lf</%s>\n" : ">%f</%s>\n" , i, name); }
228
224
#define store_bool_sp(name, i, sp); { tX_store("%s<%s ", indent, name); sp.store_meta(rc, rz); tX_store(">%s</%s>\n", i ? "true" : "false", name); }
226
#define restore_sp_id(s, sp); if ((!elementFound) && (!xmlStrcmp(cur->name, (const xmlChar *) s))) { elementFound=1; sp.restore_meta(cur); }
230
227
#define restore_int_id(s, i, sp, init); if ((!elementFound) && (!xmlStrcmp(cur->name, (const xmlChar *) s))) { elementFound=1; if (xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)) { sscanf((char *) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1), "%i", &i); init; } sp.restore_meta(cur); }
231
228
#define restore_float_id(s, i, sp, init); if ((!elementFound) && (!xmlStrcmp(cur->name, (const xmlChar *) s))) { elementFound=1; if (xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)) {sscanf((char *) xmlNodeListGetString(doc, cur->xmlChildrenNode, 1), "%lf", &dvalue); i=dvalue; init; } sp.restore_meta(cur);}
232
229
#define restore_bool_id(s, i, sp, init); if ((!elementFound) && (!xmlStrcmp(cur->name, (const xmlChar *) s))) { elementFound=1; if (xmlNodeListGetString(doc, cur->xmlChildrenNode, 1)) {if (xmlStrcmp(xmlNodeListGetString(doc, cur->xmlChildrenNode, 1), (const xmlChar *) "true")==0) i=true; else i=false; init; } sp.restore_meta(cur);}