head 1.9; access; symbols pkgsrc-2024Q1:1.8.0.110 pkgsrc-2024Q1-base:1.8 pkgsrc-2023Q4:1.8.0.108 pkgsrc-2023Q4-base:1.8 pkgsrc-2023Q3:1.8.0.106 pkgsrc-2023Q3-base:1.8 pkgsrc-2023Q2:1.8.0.104 pkgsrc-2023Q2-base:1.8 pkgsrc-2023Q1:1.8.0.102 pkgsrc-2023Q1-base:1.8 pkgsrc-2022Q4:1.8.0.100 pkgsrc-2022Q4-base:1.8 pkgsrc-2022Q3:1.8.0.98 pkgsrc-2022Q3-base:1.8 pkgsrc-2022Q2:1.8.0.96 pkgsrc-2022Q2-base:1.8 pkgsrc-2022Q1:1.8.0.94 pkgsrc-2022Q1-base:1.8 pkgsrc-2021Q4:1.8.0.92 pkgsrc-2021Q4-base:1.8 pkgsrc-2021Q3:1.8.0.90 pkgsrc-2021Q3-base:1.8 pkgsrc-2021Q2:1.8.0.88 pkgsrc-2021Q2-base:1.8 pkgsrc-2021Q1:1.8.0.86 pkgsrc-2021Q1-base:1.8 pkgsrc-2020Q4:1.8.0.84 pkgsrc-2020Q4-base:1.8 pkgsrc-2020Q3:1.8.0.82 pkgsrc-2020Q3-base:1.8 pkgsrc-2020Q2:1.8.0.78 pkgsrc-2020Q2-base:1.8 pkgsrc-2020Q1:1.8.0.58 pkgsrc-2020Q1-base:1.8 pkgsrc-2019Q4:1.8.0.80 pkgsrc-2019Q4-base:1.8 pkgsrc-2019Q3:1.8.0.76 pkgsrc-2019Q3-base:1.8 pkgsrc-2019Q2:1.8.0.74 pkgsrc-2019Q2-base:1.8 pkgsrc-2019Q1:1.8.0.72 pkgsrc-2019Q1-base:1.8 pkgsrc-2018Q4:1.8.0.70 pkgsrc-2018Q4-base:1.8 pkgsrc-2018Q3:1.8.0.68 pkgsrc-2018Q3-base:1.8 pkgsrc-2018Q2:1.8.0.66 pkgsrc-2018Q2-base:1.8 pkgsrc-2018Q1:1.8.0.64 pkgsrc-2018Q1-base:1.8 pkgsrc-2017Q4:1.8.0.62 pkgsrc-2017Q4-base:1.8 pkgsrc-2017Q3:1.8.0.60 pkgsrc-2017Q3-base:1.8 pkgsrc-2017Q2:1.8.0.56 pkgsrc-2017Q2-base:1.8 pkgsrc-2017Q1:1.8.0.54 pkgsrc-2017Q1-base:1.8 pkgsrc-2016Q4:1.8.0.52 pkgsrc-2016Q4-base:1.8 pkgsrc-2016Q3:1.8.0.50 pkgsrc-2016Q3-base:1.8 pkgsrc-2016Q2:1.8.0.48 pkgsrc-2016Q2-base:1.8 pkgsrc-2016Q1:1.8.0.46 pkgsrc-2016Q1-base:1.8 pkgsrc-2015Q4:1.8.0.44 pkgsrc-2015Q4-base:1.8 pkgsrc-2015Q3:1.8.0.42 pkgsrc-2015Q3-base:1.8 pkgsrc-2015Q2:1.8.0.40 pkgsrc-2015Q2-base:1.8 pkgsrc-2015Q1:1.8.0.38 pkgsrc-2015Q1-base:1.8 pkgsrc-2014Q4:1.8.0.36 pkgsrc-2014Q4-base:1.8 pkgsrc-2014Q3:1.8.0.34 pkgsrc-2014Q3-base:1.8 pkgsrc-2014Q2:1.8.0.32 pkgsrc-2014Q2-base:1.8 pkgsrc-2014Q1:1.8.0.30 pkgsrc-2014Q1-base:1.8 pkgsrc-2013Q4:1.8.0.28 pkgsrc-2013Q4-base:1.8 pkgsrc-2013Q3:1.8.0.26 pkgsrc-2013Q3-base:1.8 pkgsrc-2013Q2:1.8.0.24 pkgsrc-2013Q2-base:1.8 pkgsrc-2013Q1:1.8.0.22 pkgsrc-2013Q1-base:1.8 pkgsrc-2012Q4:1.8.0.20 pkgsrc-2012Q4-base:1.8 pkgsrc-2012Q3:1.8.0.18 pkgsrc-2012Q3-base:1.8 pkgsrc-2012Q2:1.8.0.16 pkgsrc-2012Q2-base:1.8 pkgsrc-2012Q1:1.8.0.14 pkgsrc-2012Q1-base:1.8 pkgsrc-2011Q4:1.8.0.12 pkgsrc-2011Q4-base:1.8 pkgsrc-2011Q3:1.8.0.10 pkgsrc-2011Q3-base:1.8 pkgsrc-2011Q2:1.8.0.8 pkgsrc-2011Q2-base:1.8 pkgsrc-2011Q1:1.8.0.6 pkgsrc-2011Q1-base:1.8 pkgsrc-2010Q4:1.8.0.4 pkgsrc-2010Q4-base:1.8 pkgsrc-2010Q3:1.8.0.2 pkgsrc-2010Q3-base:1.8 pkgsrc-2010Q2:1.7.0.24 pkgsrc-2010Q2-base:1.7 pkgsrc-2010Q1:1.7.0.22 pkgsrc-2010Q1-base:1.7 pkgsrc-2009Q4:1.7.0.20 pkgsrc-2009Q4-base:1.7 pkgsrc-2009Q3:1.7.0.18 pkgsrc-2009Q3-base:1.7 pkgsrc-2009Q2:1.7.0.16 pkgsrc-2009Q2-base:1.7 pkgsrc-2009Q1:1.7.0.14 pkgsrc-2009Q1-base:1.7 pkgsrc-2008Q4:1.7.0.12 pkgsrc-2008Q4-base:1.7 pkgsrc-2008Q3:1.7.0.10 pkgsrc-2008Q3-base:1.7 cube-native-xorg:1.7.0.8 cube-native-xorg-base:1.7 pkgsrc-2008Q2:1.7.0.6 pkgsrc-2008Q2-base:1.7 cwrapper:1.7.0.4 pkgsrc-2008Q1:1.7.0.2 pkgsrc-2008Q1-base:1.7 pkgsrc-2007Q4:1.6.0.22 pkgsrc-2007Q4-base:1.6 pkgsrc-2007Q3:1.6.0.20 pkgsrc-2007Q3-base:1.6 pkgsrc-2007Q2:1.6.0.18 pkgsrc-2007Q2-base:1.6 pkgsrc-2007Q1:1.6.0.16 pkgsrc-2007Q1-base:1.6 pkgsrc-2006Q4:1.6.0.14 pkgsrc-2006Q4-base:1.6 pkgsrc-2006Q3:1.6.0.12 pkgsrc-2006Q3-base:1.6 pkgsrc-2006Q2:1.6.0.10 pkgsrc-2006Q2-base:1.6 pkgsrc-2006Q1:1.6.0.8 pkgsrc-2006Q1-base:1.6 pkgsrc-2005Q4:1.6.0.6 pkgsrc-2005Q4-base:1.6 pkgsrc-2005Q3:1.6.0.4 pkgsrc-2005Q3-base:1.6 pkgsrc-2005Q2:1.6.0.2 pkgsrc-2005Q2-base:1.6 pkgsrc-2005Q1:1.5.0.6 pkgsrc-2005Q1-base:1.5 pkgsrc-2004Q4:1.5.0.4 pkgsrc-2004Q4-base:1.5 pkgsrc-2004Q3:1.5.0.2 pkgsrc-2004Q3-base:1.5 pkgsrc-2004Q2:1.4.0.4 pkgsrc-2004Q2-base:1.4 pkgsrc-2004Q1:1.4.0.2 pkgsrc-2004Q1-base:1.4 pkgsrc-2003Q4:1.3.0.2 pkgsrc-2003Q4-base:1.3 netbsd-1-6-1:1.1.1.1.0.6 netbsd-1-6-1-base:1.1.1.1 netbsd-1-6:1.1.1.1.0.8 netbsd-1-6-RELEASE-base:1.1.1.1 pkgviews:1.1.1.1.0.4 pkgviews-base:1.1.1.1 buildlink2:1.1.1.1.0.2 buildlink2-base:1.1.1.1 netbsd-1-5-PATCH003:1.1.1.1 netbsd-1-5-PATCH001:1.1.1.1 netbsd-1-5-RELEASE:1.1.1.1 netbsd-1-4-PATCH003:1.1.1.1 netbsd-1-4-PATCH002:1.1.1.1 pkgsrc-base:1.1.1.1 TNF:1.1.1; locks; strict; comment @# @; 1.9 date 2024.04.11.17.52.53; author ktnb; state dead; branches; next 1.8; commitid 8ItoNPPvQ8zvIK5F; 1.8 date 2010.09.19.07.52.19; author obache; state Exp; branches; next 1.7; 1.7 date 2008.01.30.05.43.55; author obache; state Exp; branches; next 1.6; 1.6 date 2005.04.19.10.45.19; author wiz; state Exp; branches; next 1.5; 1.5 date 2004.08.15.12.06.34; author wiz; state Exp; branches; next 1.4; 1.4 date 2004.03.10.18.37.48; author wiz; state Exp; branches; next 1.3; 1.3 date 2003.08.11.07.26.01; author wiz; state Exp; branches; next 1.2; 1.2 date 2003.07.12.12.23.13; author wiz; state Exp; branches; next 1.1; 1.1 date 2000.01.11.02.56.33; author garbled; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 2000.01.11.02.56.33; author garbled; state Exp; branches; next ; desc @@ 1.9 log @nut: removed in favor of biology/nutsqlite @ text @$NetBSD: patch-ab,v 1.8 2010/09/19 07:52:19 obache Exp $ --- db.c.orig 2010-08-20 04:04:35.000000000 +0000 +++ db.c @@@@ -28,6 +28,7 @@@@ #include #include #include +#include #ifndef NUTDIR char nutdir1[]=".nutdb"; @@@@ -982,9 +983,22 @@@@ strcpy(subuser,sub); sprintf(versionfile,"%s/%s/%s","NUTDB",subuser,versionfile1); #else sprintf(nutdir,"%s/%s",getenv("HOME"),nutdir1); -mkdir (nutdir, 0700 ); +if (mkdir(nutdir, S_IRWXU|S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) != 0) { + if (errno != EEXIST) { + printf("Cannot create %s: %s\n", nutdir, + strerror(errno)); + exit(1); + } +} sprintf(nutdirsubuser,"%s/%s/%s",getenv("HOME"),nutdir1,subuser); mkdir (nutdirsubuser, 0700 ); +if (mkdir(nutdirsubuser, S_IRWXU|S_IRUSR|S_IWUSR|S_IRGRP|S_IROTH) != 0) { + if (errno != EEXIST) { + printf("Cannot create %s: %s\n", nutdirsubuser, + strerror(errno)); + exit(1); + } +} sprintf(USDAjoined,"%s/%s",FOODDIR,USDAjoined1); sprintf(globalFOOD,"%s/%s",FOODDIR,globalFOOD1); sprintf(globalNUT,"%s/%s",FOODDIR,globalNUT1); @ 1.8 log @Update nut to 15.8. Based on PR#43776 by Kamel Derouiche for 15.7. What's new in nut 15.8: * This release updates the USDA database to include some data corrections for milk. * The program's initial data load is now considerably faster. What's new in nut 15.7: * This version includes an improvement to the automatic calorie tool to make it better able to hold fat mass or lean mass constant. * Also, there is now a facility to explicitly set the ratio between linoleic and alpha-linolenic acids. What's new in nut 15.0: * This release introduces the new USDA Nutrient Database SR22 and allows current nut installations to have their existing meal records reinterpreted with the new database. What's new in nut 14.5a: * The new feature "Weight Log Regression" does not tell you what you weigh; what it does is apply linear regression to a series of daily weight and body fat percentage entries to smooth out the random noise and tell you which direction your weight is trending, how fast it is going there, and how much of the change is lean or fat. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.7 2008/01/30 05:43:55 obache Exp $ @ 1.7 log @Update nut to 13.2. Should close PR 34466. Pkgsrc changes: Add DESTDIR support. Recent changes (cannot available changes from 10.18 to 12.6 anymore). 13.2: This release makes minor changes to the analysis reset and food suggestion functions. 13.1: This release changes some fatty acid defaults to allow more saturated fat when eating low-carb, and to raise the maximum amount of long-chain Omega-3. 13.0: This release introduces the new USDA Nutrient Database SR20 and allows current NUT installations to have their existing meal records reinterpreted with the new database. 12.7: This release uses a new food name abbreviation algorithm so that food names are more informative and less cryptic. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.6 2005/04/19 10:45:19 wiz Exp $ d3 1 a3 1 --- db.c.orig 2007-12-29 07:45:33.000000000 +0000 d13 1 a13 1 @@@@ -892,9 +893,22 @@@@ strcpy(subuser,sub); @ 1.6 log @Update to 10.18. Should fix PR 27404. 10.18: This release contains a fix for the floating point exception on NetBSD-2.0/alpha. 10.17: This release corrects the formatting of the man page and restores the correct alpha-linolenic acid reference value, which was too low in the last release. 10.16: This release fixes a segfault that occurs when analyzing added and subtracted foods that total zero calories. 10.15: This release completes the changing of all calculations to substitute user averages for program constants in the values of calories per gram of carb, fat, and protein, and of the percentage of total fat that is fatty acids. This means that personal options in terms of percentages and ratios will be more precise. @ text @d1 1 a1 1 $NetBSD: patch-ab,v 1.5 2004/08/15 12:06:34 wiz Exp $ d3 1 a3 1 --- db.c.orig 2005-04-16 18:08:41.000000000 +0200 d13 1 a13 1 @@@@ -881,9 +882,22 @@@@ strcpy(subuser,sub); @ 1.5 log @Update to 10.1: 10.1: This release adds a fix for zero values that display as no data. 10.0: This release updates the USDA Nutrient Database to version SR17, and allows current NUT installations to have their existing meal records reinterpreted with the new database. 9.20: This release optimizes the new code of the last release, the focus of which was distinguishing no data from zero in the USDA database. 9.19: The program now distinguishes between zero values and no data in the USDA database, and uses this information to produce a new screen that lists foods high in some nutrient while minimizing some other nutrient. 9.18: This release contains revisions to the polyunsaturated fatty acid reference values and how they scale up as fats increase and carbs decrease. 9.17: This release provides what may be more reasonable or optimal default settings for fat percentages when the user sets the program for low carb. 9.16: This release contains bugfixes for a segmentation fault which occurred when entering a control-D and a monounsaturated fat reference value that was too high. 9.15: This release makes serving sizes more consistent among food groups. It adds functions to change the default serving size, and to sort foods by nutrients per serving. 9.14: This release adds support for an optional database subdirectory, allowing the user to easily maintain multiple databases, for multiple family members, for instance. It also adds display of non-fiber carbohydrate grams ("net carbs") on the main analysis screen. 9.13: The program now allows commercial foods that have a nutrition label and an ordered ingredients statement to be added to the food database. An approximation to a food's recipe is found that best fits the criteria and the recipe is analyzed to provide information about the additional nutrients not stated on the nutrition label. 9.12: [unknown] @ text @d1 1 a1 1 $NetBSD$ d3 1 a3 1 --- db.c.orig 2004-08-07 05:03:16.000000000 +0200 d5 1 a5 1 @@@@ -29,6 +29,7 @@@@ d13 1 a13 1 @@@@ -739,9 +740,22 @@@@ strcpy(subuser,sub); @ 1.4 log @Update to 9.11: New in 9.11: Because the program uses the approximation of 4 calories per gram for carbohydrate and protein to analyze meals according to the "Daily Value" -- although real food has various values for calories per gram -- the program now refigures fat percentage values at each analysis so that when calories, carbs, and protein are each at exactly 100%, fat will be also. New in 9.10: This release fixes a buffer overflow in the food selection function which caused the program to not find certain foods even though they existed in the database. New in 9.9: A bug has been fixed in which during food selection, the program lost the value of the food name key. Also, some of the program's reference values for the essential fatty acids have been modified. New in 9.8: The program now defaults to either grams or ounces, depending on the weight unit the user enters to specify servings. A bug in handling customary meal names that are too long has been fixed. New in 9.7: The program computes essential fatty acid reference values based on the user's diet. Prior releases aimed toward a particular balance of Omega-6 and Omega-3. This release allows the user to specify the balance between Omega-6 and Omega-3 without having to determine the amount of the individual fatty acids. New in 9.6: The program is now capable of understanding food names in simple English, such as "fried chicken" and "mashed potatoes." This is accomplished by including the list of abbreviations the USDA uses and by successively searching for each tokenized term, whatever the order in the USDA name. @ text @d3 1 a3 1 --- db.c.orig 2004-02-15 22:36:00.000000000 +0100 d5 4 a8 10 @@@@ -23,11 +23,12 @@@@ #include "meal.h" #include "options.h" #include "util.h" -#ifndef DOS +#ifdef DOS #include #else #include #endif d10 5 a14 5 #include #include #include @@@@ -691,7 +692,13 @@@@ void make_filenames(void) sprintf(versionfile,"%s/%s","NUTDB",versionfile1); d19 14 a32 5 + if (errno != EEXIST) { + printf("Cannot create %s/%s: %s\n", getenv("HOME"), nutdir1, + strerror(errno)); + exit(1); + } @ 1.3 log @Update to 9.0. Changes: This release introduces the new USDA Nutrient Database, SR16, which has 6,661 foods and 125 nutrients, and includes an automatic conversion feature so that NUT 8.x installations can preserve existing meal records and have them interpreted with the latest USDA database. @ text @d3 1 a3 1 --- db.c.orig Sun Aug 10 22:12:44 2003 d5 1 a5 1 @@@@ -23,6 +23,7 @@@@ d9 6 d19 1 a19 1 @@@@ -683,7 +684,13 @@@@ void make_filenames(void) @ 1.2 log @Update to 8.10. Not sure what has changed since 4.x, but I'd guess rather much. @ text @d3 1 a3 1 --- db.c.orig Sun Jun 1 01:59:22 2003 d13 2 a14 2 @@@@ -729,7 +730,13 @@@@ void make_filenames(void) sprintf(optionsfile,"%s/%s","NUTDB",optionsfile1); @ 1.1 log @Initial revision @ text @d2 13 a14 3 --- db.c.orig Mon Jan 10 15:24:03 2000 +++ db.c Mon Jan 10 15:42:12 2000 @@@@ -32,6 +32,11 @@@@ d16 12 a27 19 char nutdir1[]=NUTDIR ; #endif +#ifndef DBDIR +char nutdir2[]=".nutdb"; +#else +char nutdir2[]=DBDIR ; +#endif char rawfoodfile1[] = "abbrev.txt"; char rawnutfoodfile1[] = "nutfood.txt"; @@@@ -454,7 +459,7 @@@@ void make_filenames(void) { -sprintf(rawfoodfile,"%s/%s/%s",getenv("HOME"),nutdir1,rawfoodfile1); +sprintf(rawfoodfile,"%s/%s",nutdir2,rawfoodfile1); sprintf(rawnutfoodfile,"%s/%s/%s",getenv("HOME"),nutdir1,rawnutfoodfile1); sprintf(foodfile,"%s/%s/%s",getenv("HOME"),nutdir1,foodfile1); sprintf(mealfile,"%s/%s/%s",getenv("HOME"),nutdir1,mealfile1); @ 1.1.1.1 log @Initial import of nut program. record what you eat and analyze your meals. @ text @@