# HG changeset patch # User Michiel Broek # Date 1406657483 -7200 # Node ID 54f9b5d39e4c335ba73213a8676a3ede14d05c54 # Parent 4f21ffc16cd4a22e755cbedd1fbf012ccb00369a Removed mosquitto dependency diff -r 4f21ffc16cd4 -r 54f9b5d39e4c mash/beerxml.h --- a/mash/beerxml.h Mon Jul 28 21:41:03 2014 +0200 +++ b/mash/beerxml.h Tue Jul 29 20:11:23 2014 +0200 @@ -59,7 +59,7 @@ float amount; /* Weight in KG */ float yield; /* Percent dry yield (fine grain) */ float color; /* The color of the item in Lovibond */ - bool add_after_boil; /* May be TRUE. */ + int add_after_boil; /* May be TRUE. */ char *origin; /* Country or place of origin */ char *supplier; /* Supplier of the grain/extract/sugar */ float coarse_fine_diff; /* Percent difference between the coarse grain yield and fine grain yield. */ @@ -67,7 +67,7 @@ float diastatic_power; /* The diastatic power of the grain */ float protein; /* The percent protein in the grain. */ float max_in_batch; /* The recommended maximum percentage */ - bool recommend_mash; /* TRUE if it is recommended to mash */ + int recommend_mash; /* TRUE if it is recommended to mash */ } fermentable_rec; typedef struct _equipment_rec { @@ -82,7 +82,7 @@ float trub_chiller_loss; /* The amount of wort normally lost. */ float evap_rate; /* Perc of wort lost to evaporation per hour. */ float boil_time; /* The normal amount of time one boils */ - bool calc_boil_volume; /* Flag denoting to calculate the boil size. */ + int calc_boil_volume; /* Flag denoting to calculate the boil size. */ float lauter_deadspace; /* Amount lost to the lauter tun. */ float top_up_kettle; /* Amount normally added to the boil */ float hop_utilization; /* Large batch hop utilization. */ @@ -96,7 +96,7 @@ char *type; /* “Ale”, “Lager”, “Wheat”, “Wine”, “Champagne” */ char *form; /* “Liquid”, “Dry”, “Slant” or “Culture” */ float amount; /* The amount of yeast, measured in liters. */ - bool amount_is_weight; /* TRUE if the amount measurement is a weight */ + int amount_is_weight; /* TRUE if the amount measurement is a weight */ char *laboratory; /* The laboratory that produced the yeast. */ char *product_id; /* The manufacturer’s product ID label */ float min_temperature; /* The minimum recommended temperature */ @@ -107,7 +107,7 @@ char *best_for; /* Beerstyle this yeast is best suited for. */ int times_cultured; /* Number of times this yeast has been reused */ int max_reuse; /* Recommended maximum reuse times */ - bool add_to_secondary; /* Flag this yeast was added for a secondary */ + int add_to_secondary; /* Flag this yeast was added for a secondary */ } yeast_rec; typedef struct _misc_rec { @@ -118,7 +118,7 @@ char *use; /* “Boil”, “Mash”, “Primary”, “Secondary”, “Bottling” */ float time; /* Time the misc was boiled, steeped, mashed, etc in minutes. */ float amount; /* Amount of item used. Liters or Weight */ - bool amount_is_weight; /* TRUE if amount is weight */ + int amount_is_weight; /* TRUE if amount is weight */ char *use_for; /* Desc. of what the ingredient is used for */ char *notes; /* Detailed notes on the item including usage. */ } misc_rec; @@ -190,7 +190,7 @@ float ph; /* PH of the sparge. */ float tun_weight; /* Weight of the mash tun in kilograms */ float tun_specific_heat; /* Specific heat of the tun material */ - bool equip_adjust; /* Adjust for tun heat loss */ + int equip_adjust; /* Adjust for tun heat loss */ } mash_profile; typedef struct _brew_equipment { @@ -204,7 +204,7 @@ float trub_chiller_loss; /* Amount of wort lost during cooling */ float evap_rate; /* Perc of wort lost to evaporation per hour. */ float boil_time; /* The normal amount of boil time for this eq. */ - bool calc_boil_volume; /* Should the program calculate the boil size. */ + int calc_boil_volume; /* Should the program calculate the boil size. */ float lauter_dead_space; /* Amount lost to the lauter tun. */ float top_up_kettle; /* Amount added to the boil kettle b4 the boil. */ float hop_utilization; /* Large batch hop utilization. */ @@ -246,7 +246,7 @@ float age_temp; /* Temperature for aging after bottling. */ char *date; /* Date brewed in a easily recognizable format. */ float carbonation; /* Volume of CO2 used to carbonate this beer. */ - bool forced_carbonation; /* TRUE if forced carbonated using CO2 pressure */ + int forced_carbonation; /* TRUE if forced carbonated using CO2 pressure */ char *priming_sugar_name; /* Text describing the priming agent. */ float carbonation_temp; /* Temp for either bottling/forced carbonation. */ float priming_sugar_equiv; /* Factor used to convert this priming agent */ diff -r 4f21ffc16cd4 -r 54f9b5d39e4c mash/mash.h --- a/mash/mash.h Mon Jul 28 21:41:03 2014 +0200 +++ b/mash/mash.h Tue Jul 29 20:11:23 2014 +0200 @@ -32,9 +32,6 @@ #include -/* mosquitto */ -#include - #define MBSE_SS(x) (x)?(x):"(null)" diff -r 4f21ffc16cd4 -r 54f9b5d39e4c mash/rdconfig.c --- a/mash/rdconfig.c Mon Jul 28 21:41:03 2014 +0200 +++ b/mash/rdconfig.c Tue Jul 29 20:11:23 2014 +0200 @@ -24,7 +24,7 @@ #include "xutil.h" -bool debug = FALSE; +int debug = FALSE; static char *mypath; static char *k, *v; static int linecnt = 0; @@ -32,13 +32,9 @@ -//static int getstr(char **); static int getint(char **); static int getw1(char **); -//static int getuch(char **); -//static int getfloat(char **); -//static int getbyt(char **); -//static int gethex(char **); + #define XSTR(x) #x #define STR(x) XSTR(x) @@ -223,17 +219,6 @@ } -/* -static int getstr(char **dest) -{ - if (debug) - syslog(LOG_NOTICE, "rdconfig: getstr: %s(%d): %s %s", mypath, linecnt, MBSE_SS(k), MBSE_SS(v)); - - *dest = xstrcpy(v); - return 0; -} -*/ - static int getint(char **dest) { @@ -299,70 +284,3 @@ } -/* -static int getuch(char **dest) -{ - if (debug) - syslog(LOG_NOTICE, "rdconfig: getuch: %s(%d): %s %s", mypath, linecnt, MBSE_SS(k), MBSE_SS(v)); - - if (isalnum(v[0])) { - *((unsigned char*)dest) = v[0]; - } else { - syslog(LOG_NOTICE, "rdconfig: %s(%d): %s %s - bad character", mypath, linecnt, MBSE_SS(k), MBSE_SS(v)); - } - return 0; -} - - - -static int getfloat(char **dest) -{ - float val = 0.0; - int rc; - - if (debug) - syslog(LOG_NOTICE, "rdconfig: getfloat: %s(%d): %s %s", mypath, linecnt, MBSE_SS(k), MBSE_SS(v)); - - rc = sscanf(v, "%f", &val); - if (rc != 1) { - syslog(LOG_NOTICE, "rdconfig: %s(%d): %s %s - bad float value", mypath, linecnt, MBSE_SS(k), MBSE_SS(v)); - return 1; - } - *((float*)dest) = val; - - return 0; -} -*/ - -/* -static int getbyt(char **dest) -{ - Log_Msg("[rdconfig] getbyt: %s(%d): %s %s", mypath, linecnt, k, v); - if (strspn(v,"0123456789") != strlen(v)) - Log_Msg("[rdconfig] %s(%d): %s %s - bad numeric", mypath, linecnt, S(k), S(v)); - else - *((Uint8*)dest)=atoi(v); - return 0; -} -*/ - - -/* -static int gethex(char **dest) -{ - unsigned int val = 0; - int rc; - - Log_Msg("[rdconfig] gethex: %s(%d): %s %s", mypath, linecnt, k, v); - rc = sscanf(v, "%08x", &val); - if (rc != 1) { - Log_Msg("[rdconfig] %s(%d): %s %s - bad hex value", mypath, linecnt, S(k), S(v)); - return 1; - } - *((int*)dest) = val; - - return 0; -} -*/ - -