head 1.4; access; symbols pkgsrc-2026Q1:1.4.0.160 pkgsrc-2026Q1-base:1.4 pkgsrc-2025Q4:1.4.0.158 pkgsrc-2025Q4-base:1.4 pkgsrc-2025Q3:1.4.0.156 pkgsrc-2025Q3-base:1.4 pkgsrc-2025Q2:1.4.0.154 pkgsrc-2025Q2-base:1.4 pkgsrc-2025Q1:1.4.0.152 pkgsrc-2025Q1-base:1.4 pkgsrc-2024Q4:1.4.0.150 pkgsrc-2024Q4-base:1.4 pkgsrc-2024Q3:1.4.0.148 pkgsrc-2024Q3-base:1.4 pkgsrc-2024Q2:1.4.0.146 pkgsrc-2024Q2-base:1.4 pkgsrc-2024Q1:1.4.0.144 pkgsrc-2024Q1-base:1.4 pkgsrc-2023Q4:1.4.0.142 pkgsrc-2023Q4-base:1.4 pkgsrc-2023Q3:1.4.0.140 pkgsrc-2023Q3-base:1.4 pkgsrc-2023Q2:1.4.0.138 pkgsrc-2023Q2-base:1.4 pkgsrc-2023Q1:1.4.0.136 pkgsrc-2023Q1-base:1.4 pkgsrc-2022Q4:1.4.0.134 pkgsrc-2022Q4-base:1.4 pkgsrc-2022Q3:1.4.0.132 pkgsrc-2022Q3-base:1.4 pkgsrc-2022Q2:1.4.0.130 pkgsrc-2022Q2-base:1.4 pkgsrc-2022Q1:1.4.0.128 pkgsrc-2022Q1-base:1.4 pkgsrc-2021Q4:1.4.0.126 pkgsrc-2021Q4-base:1.4 pkgsrc-2021Q3:1.4.0.124 pkgsrc-2021Q3-base:1.4 pkgsrc-2021Q2:1.4.0.122 pkgsrc-2021Q2-base:1.4 pkgsrc-2021Q1:1.4.0.120 pkgsrc-2021Q1-base:1.4 pkgsrc-2020Q4:1.4.0.118 pkgsrc-2020Q4-base:1.4 pkgsrc-2020Q3:1.4.0.116 pkgsrc-2020Q3-base:1.4 pkgsrc-2020Q2:1.4.0.112 pkgsrc-2020Q2-base:1.4 pkgsrc-2020Q1:1.4.0.92 pkgsrc-2020Q1-base:1.4 pkgsrc-2019Q4:1.4.0.114 pkgsrc-2019Q4-base:1.4 pkgsrc-2019Q3:1.4.0.110 pkgsrc-2019Q3-base:1.4 pkgsrc-2019Q2:1.4.0.108 pkgsrc-2019Q2-base:1.4 pkgsrc-2019Q1:1.4.0.106 pkgsrc-2019Q1-base:1.4 pkgsrc-2018Q4:1.4.0.104 pkgsrc-2018Q4-base:1.4 pkgsrc-2018Q3:1.4.0.102 pkgsrc-2018Q3-base:1.4 pkgsrc-2018Q2:1.4.0.100 pkgsrc-2018Q2-base:1.4 pkgsrc-2018Q1:1.4.0.98 pkgsrc-2018Q1-base:1.4 pkgsrc-2017Q4:1.4.0.96 pkgsrc-2017Q4-base:1.4 pkgsrc-2017Q3:1.4.0.94 pkgsrc-2017Q3-base:1.4 pkgsrc-2017Q2:1.4.0.90 pkgsrc-2017Q2-base:1.4 pkgsrc-2017Q1:1.4.0.88 pkgsrc-2017Q1-base:1.4 pkgsrc-2016Q4:1.4.0.86 pkgsrc-2016Q4-base:1.4 pkgsrc-2016Q3:1.4.0.84 pkgsrc-2016Q3-base:1.4 pkgsrc-2016Q2:1.4.0.82 pkgsrc-2016Q2-base:1.4 pkgsrc-2016Q1:1.4.0.80 pkgsrc-2016Q1-base:1.4 pkgsrc-2015Q4:1.4.0.78 pkgsrc-2015Q4-base:1.4 pkgsrc-2015Q3:1.4.0.76 pkgsrc-2015Q3-base:1.4 pkgsrc-2015Q2:1.4.0.74 pkgsrc-2015Q2-base:1.4 pkgsrc-2015Q1:1.4.0.72 pkgsrc-2015Q1-base:1.4 pkgsrc-2014Q4:1.4.0.70 pkgsrc-2014Q4-base:1.4 pkgsrc-2014Q3:1.4.0.68 pkgsrc-2014Q3-base:1.4 pkgsrc-2014Q2:1.4.0.66 pkgsrc-2014Q2-base:1.4 pkgsrc-2014Q1:1.4.0.64 pkgsrc-2014Q1-base:1.4 pkgsrc-2013Q4:1.4.0.62 pkgsrc-2013Q4-base:1.4 pkgsrc-2013Q3:1.4.0.60 pkgsrc-2013Q3-base:1.4 pkgsrc-2013Q2:1.4.0.58 pkgsrc-2013Q2-base:1.4 pkgsrc-2013Q1:1.4.0.56 pkgsrc-2013Q1-base:1.4 pkgsrc-2012Q4:1.4.0.54 pkgsrc-2012Q4-base:1.4 pkgsrc-2012Q3:1.4.0.52 pkgsrc-2012Q3-base:1.4 pkgsrc-2012Q2:1.4.0.50 pkgsrc-2012Q2-base:1.4 pkgsrc-2012Q1:1.4.0.48 pkgsrc-2012Q1-base:1.4 pkgsrc-2011Q4:1.4.0.46 pkgsrc-2011Q4-base:1.4 pkgsrc-2011Q3:1.4.0.44 pkgsrc-2011Q3-base:1.4 pkgsrc-2011Q2:1.4.0.42 pkgsrc-2011Q2-base:1.4 pkgsrc-2011Q1:1.4.0.40 pkgsrc-2011Q1-base:1.4 pkgsrc-2010Q4:1.4.0.38 pkgsrc-2010Q4-base:1.4 pkgsrc-2010Q3:1.4.0.36 pkgsrc-2010Q3-base:1.4 pkgsrc-2010Q2:1.4.0.34 pkgsrc-2010Q2-base:1.4 pkgsrc-2010Q1:1.4.0.32 pkgsrc-2010Q1-base:1.4 pkgsrc-2009Q4:1.4.0.30 pkgsrc-2009Q4-base:1.4 pkgsrc-2009Q3:1.4.0.28 pkgsrc-2009Q3-base:1.4 pkgsrc-2009Q2:1.4.0.26 pkgsrc-2009Q2-base:1.4 pkgsrc-2009Q1:1.4.0.24 pkgsrc-2009Q1-base:1.4 pkgsrc-2008Q4:1.4.0.22 pkgsrc-2008Q4-base:1.4 pkgsrc-2008Q3:1.4.0.20 pkgsrc-2008Q3-base:1.4 cube-native-xorg:1.4.0.18 cube-native-xorg-base:1.4 pkgsrc-2008Q2:1.4.0.16 pkgsrc-2008Q2-base:1.4 cwrapper:1.4.0.14 pkgsrc-2008Q1:1.4.0.12 pkgsrc-2008Q1-base:1.4 pkgsrc-2007Q4:1.4.0.10 pkgsrc-2007Q4-base:1.4 pkgsrc-2007Q3:1.4.0.8 pkgsrc-2007Q3-base:1.4 pkgsrc-2007Q2:1.4.0.6 pkgsrc-2007Q2-base:1.4 pkgsrc-2007Q1:1.4.0.4 pkgsrc-2007Q1-base:1.4 pkgsrc-2006Q4:1.4.0.2 pkgsrc-2006Q4-base:1.4 pkgsrc-2006Q3:1.3.0.30 pkgsrc-2006Q3-base:1.3 pkgsrc-2006Q2:1.3.0.28 pkgsrc-2006Q2-base:1.3 pkgsrc-2006Q1:1.3.0.26 pkgsrc-2006Q1-base:1.3 pkgsrc-2005Q4:1.3.0.24 pkgsrc-2005Q4-base:1.3 pkgsrc-2005Q3:1.3.0.22 pkgsrc-2005Q3-base:1.3 pkgsrc-2005Q2:1.3.0.20 pkgsrc-2005Q2-base:1.3 pkgsrc-2005Q1:1.3.0.18 pkgsrc-2005Q1-base:1.3 pkgsrc-2004Q4:1.3.0.16 pkgsrc-2004Q4-base:1.3 pkgsrc-2004Q3:1.3.0.14 pkgsrc-2004Q3-base:1.3 pkgsrc-2004Q2:1.3.0.12 pkgsrc-2004Q2-base:1.3 pkgsrc-2004Q1:1.3.0.10 pkgsrc-2004Q1-base:1.3 pkgsrc-2003Q4:1.3.0.8 pkgsrc-2003Q4-base:1.3 netbsd-1-6-1:1.3.0.4 netbsd-1-6-1-base:1.3 netbsd-1-6:1.3.0.6 netbsd-1-6-RELEASE-base:1.3 pkgviews:1.3.0.2 pkgviews-base:1.3 buildlink2:1.2.0.2 buildlink2-base:1.2 netbsd-1-5-PATCH003:1.2 netbsd-1-5-PATCH001:1.2 netbsd-1-5-RELEASE:1.2 netbsd-1-4-PATCH003:1.2 netbsd-1-4-PATCH002:1.2 comdex-fall-1999:1.2; locks; strict; comment @# @; 1.4 date 2006.10.14.19.33.45; author schwarz; state Exp; branches; next 1.3; 1.3 date 2002.07.08.02.21.20; author kim; state Exp; branches; next 1.2; 1.2 date 99.08.22.22.55.46; author kim; state Exp; branches; next 1.1; 1.1 date 99.07.26.21.19.28; author tron; state Exp; branches; next ; desc @@ 1.4 log @updated news/nn to 6.7.3. Changes from 6.6.5 according to nn's ChangeLog are various bug fixes and code cleanups. @ text @$NetBSD$ --- db.c.orig 2005-04-03 06:29:15.000000000 +0200 +++ db.c 2006-10-14 20:13:27.000000000 +0200 @@@@ -1139,7 +1139,7 @@@@ if (!db_sequential) fseek(master_file, - (off_t) (MASTER_FIELDS * sizeof(net_long) + DB_LOCK_MESSAGE + + (long) (MASTER_FIELDS * sizeof(net_long) + DB_LOCK_MESSAGE + GROUP_FIELDS * sizeof(net_long) * gh->group_num), 0); if (fread((char *) buf, sizeof(net_long), GROUP_FIELDS, master_file) != GROUP_FIELDS) @@@@ -1181,7 +1181,7 @@@@ if (!db_sequential) fseek(master_file, - (off_t) (MASTER_FIELDS * sizeof(net_long) + DB_LOCK_MESSAGE + + (long) (MASTER_FIELDS * sizeof(net_long) + DB_LOCK_MESSAGE + GROUP_FIELDS * sizeof(net_long) * gh->group_num), 0); buf[0] = gh->first_db_article; @@@@ -1386,10 +1386,10 @@@@ #ifndef NOV -off_t +long db_read_art(FILE * f) { - off_t bytes; + long bytes; #ifdef NETWORK_DATABASE net_long buf[ARTICLE_FIELDS]; @@@@ -1594,7 +1594,7 @@@@ * fill in db_hdr and db_data from the overview data for the next * article in this group. does weirdo nn encodings of header fields. */ -off_t +long db_read_art(FILE * f) { register data_header *dhp = &db_hdr; @@@@ -1820,9 +1820,9 @@@@ { #ifdef NETWORK_DATABASE - return (off_t) ((art_num - gh->first_db_article) * sizeof(net_long)); + return (long) ((art_num - gh->first_db_article) * sizeof(net_long)); #else /* NETWORK_DATABASE */ - return (off_t) ((art_num - gh->first_db_article) * sizeof(off_t)); + return (long) ((art_num - gh->first_db_article) * sizeof(long)); #endif /* NETWORK_DATABASE */ } @@@@ -1833,11 +1833,11 @@@@ long data_offset; if (gh->first_db_article == art_num) - return (off_t) 0; + return (long) 0; index = open_data_file(gh, 'x', OPEN_READ); if (index == NULL) - return (off_t) (-1); + return (long) (-1); fseek(index, get_index_offset(gh, art_num), 0); if (!db_read_offset(index, &data_offset)) @@@@ -1866,7 +1866,7 @@@@ *offset = temp; #else /* NETWORK_DATABASE */ - if (fread((char *) offset, sizeof(off_t), 1, f) != 1) + if (fread((char *) offset, sizeof(long), 1, f) != 1) return 0; #endif /* NETWORK_DATABASE */ @@@@ -1891,7 +1891,7 @@@@ #else /* NETWORK_DATABASE */ - if (fwrite((char *) offset, sizeof(off_t), 1, f) != 1) + if (fwrite((char *) offset, sizeof(long), 1, f) != 1) return 0; #endif /* NETWORK_DATABASE */ @ 1.3 log @Upgrade to 6.6.4, which does not depend on an external inews program anymore. This should avoid any vulnerability issues with INN. NOTE: The text files from lib/nn can now be found in share/nn instead. @ text @d3 3 a5 3 --- db.c.orig Thu Jan 31 23:10:27 2002 +++ db.c Sun Jul 7 21:33:09 2002 @@@@ -1103,7 +1103,7 @@@@ d9 3 a11 11 - (off_t)(MASTER_FIELDS * sizeof(net_long) + DB_LOCK_MESSAGE + + (long)(MASTER_FIELDS * sizeof(net_long) + DB_LOCK_MESSAGE + GROUP_FIELDS * sizeof(net_long) * gh->group_num), 0); if (fread((char *)buf, sizeof(net_long), GROUP_FIELDS, master_file) != GROUP_FIELDS) @@@@ -1123,7 +1123,7 @@@@ #else if (!db_sequential) fseek(master_file, - (off_t)(sizeof(master_header) + SAVED_GROUP_HEADER_SIZE(*gh) * gh->group_num), 0); + (long)(sizeof(master_header) + SAVED_GROUP_HEADER_SIZE(*gh) * gh->group_num), 0); d13 2 a14 3 if (fread((char *)gh, SAVED_GROUP_HEADER_SIZE(*gh), 1, master_file) != 1) goto err; @@@@ -1145,7 +1145,7 @@@@ d18 3 a20 3 - (off_t)(MASTER_FIELDS * sizeof(net_long) + DB_LOCK_MESSAGE + + (long)(MASTER_FIELDS * sizeof(net_long) + DB_LOCK_MESSAGE + GROUP_FIELDS * sizeof(net_long) * gh->group_num), 0); d23 1 a23 10 @@@@ -1163,7 +1163,7 @@@@ goto err; #else /* NETWORK_DATABASE */ if (!db_sequential) - fseek(master_file, (off_t)(sizeof(master_header) + SAVED_GROUP_HEADER_SIZE(*gh) * gh->group_num), 0); + fseek(master_file, (long)(sizeof(master_header) + SAVED_GROUP_HEADER_SIZE(*gh) * gh->group_num), 0); if (fwrite((char *)gh, SAVED_GROUP_HEADER_SIZE(*gh), 1, master_file) != 1) @@@@ -1348,10 +1348,10 @@@@ d27 3 a29 3 -off_t db_read_art(f) +long db_read_art(f) FILE *f; d31 2 a32 2 - off_t bytes; + long bytes; d35 2 a36 2 net_long buf[ARTICLE_FIELDS]; @@@@ -1556,7 +1556,7 @@@@ d42 4 a45 2 db_read_art(f) FILE *f; a46 3 @@@@ -1764,32 +1764,32 @@@@ } a47 5 -off_t get_index_offset(gh, art_num) +long get_index_offset(gh, art_num) group_header *gh; article_number art_num; { d49 6 a54 6 - return (off_t)((art_num - gh->first_db_article) * sizeof(net_long)); + return (long)((art_num - gh->first_db_article) * sizeof(net_long)); #else /* NETWORK_DATABASE */ - return (off_t)((art_num - gh->first_db_article) * sizeof(off_t)); + return (long)((art_num - gh->first_db_article) * sizeof(long)); #endif /* NETWORK_DATABASE */ d57 2 a58 8 -off_t get_data_offset(gh, art_num) +long get_data_offset(gh, art_num) group_header *gh; article_number art_num; { FILE *index; - off_t data_offset; + long data_offset; d60 3 a62 2 - if (gh->first_db_article == art_num) return (off_t)0; + if (gh->first_db_article == art_num) return (long)0; d65 3 a67 2 - if (index == NULL) return (off_t)(-1); + if (index == NULL) return (long)(-1); d71 3 a73 2 - data_offset = (off_t)(-1); + data_offset = (long)(-1); d75 4 a78 1 fclose(index); d80 1 a80 28 @@@@ -1800,7 +1800,7 @@@@ int db_read_offset(f, offset) FILE *f; -off_t *offset; +long *offset; { #ifdef NETWORK_DATABASE net_long temp; @@@@ -1813,7 +1813,7 @@@@ *offset = temp; #else /* NETWORK_DATABASE */ - if (fread((char *)offset, sizeof(off_t), 1, f) != 1) return 0; + if (fread((char *)offset, sizeof(long), 1, f) != 1) return 0; #endif /* NETWORK_DATABASE */ return 1; } @@@@ -1821,7 +1821,7 @@@@ int db_write_offset(f, offset) FILE *f; -off_t *offset; +long *offset; { #ifdef NETWORK_DATABASE net_long temp; @@@@ -1835,7 +1835,7 @@@@ d82 1 a82 1 #else /* NETWORK_DATABASE */ d84 4 a87 17 - if (fwrite((char *)offset, sizeof(off_t), 1, f) != 1) return 0; + if (fwrite((char *)offset, sizeof(long), 1, f) != 1) return 0; #endif /* NETWORK_DATABASE */ return 1; } @@@@ -1859,7 +1859,7 @@@@ int db_read_offset(f, offset) FILE *f; -off_t *offset; +long *offset; { nn_exitmsg(50, "STUB ROUTINE CALLED: db_read_offset\n"); return -1; @@@@ -1883,7 +1883,7 @@@@ return NULL; } a88 5 -off_t +long get_index_offset(gh, art_num) group_header *gh; article_number art_num; @ 1.2 log @Upgrade to nn 6.5.4. The main reason for the upgrade is to run completely over NNTP without any access to a news spool file system. NOV is accessed using the XOVER command (INN has this and it is available for nntpd too). @ text @d3 3 a5 3 --- db.c.orig Tue Jun 8 00:19:45 1999 +++ db.c Sun Aug 22 18:04:14 1999 @@@@ -1095,7 +1095,7 @@@@ d14 1 a14 1 @@@@ -1115,7 +1115,7 @@@@ d23 1 a23 1 @@@@ -1137,7 +1137,7 @@@@ d32 1 a32 1 @@@@ -1155,7 +1155,7 @@@@ d41 1 a41 1 @@@@ -1340,10 +1340,10 @@@@ d54 1 a54 1 @@@@ -1526,7 +1526,7 @@@@ d63 1 a63 1 @@@@ -1734,32 +1734,32 @@@@ d104 1 a104 1 @@@@ -1770,7 +1770,7 @@@@ d113 1 a113 1 @@@@ -1783,7 +1783,7 @@@@ d122 1 a122 1 @@@@ -1791,7 +1791,7 @@@@ d131 1 a131 1 @@@@ -1805,7 +1805,7 @@@@ d140 1 a140 1 @@@@ -1829,7 +1829,7 @@@@ d149 1 a149 1 @@@@ -1853,7 +1853,7 @@@@ @ 1.1 log @Split patches and convert to diff's unified output format. @ text @d3 3 a5 3 --- db.c.orig Thu Nov 25 10:39:33 1993 +++ db.c Mon Jul 26 23:11:38 1999 @@@@ -1055,7 +1055,7 @@@@ d14 1 a14 1 @@@@ -1075,7 +1075,7 @@@@ d17 1 a17 1 fseek(master_file, d23 1 a23 1 @@@@ -1097,7 +1097,7 @@@@ d32 1 a32 1 @@@@ -1115,7 +1115,7 @@@@ d34 1 a34 1 #else d41 1 a41 1 @@@@ -1188,10 +1188,10 @@@@ d54 1 a54 1 @@@@ -1368,7 +1368,7 @@@@ d63 1 a63 1 @@@@ -1564,32 +1564,32 @@@@ d75 1 a75 1 #else d78 1 a78 1 #endif d104 1 a104 1 @@@@ -1600,7 +1600,7 @@@@ d113 1 a113 1 @@@@ -1613,7 +1613,7 @@@@ d115 1 a115 1 #else d119 1 a119 1 #endif d122 1 a122 1 @@@@ -1621,7 +1621,7 @@@@ d131 1 a131 1 @@@@ -1635,7 +1635,7 @@@@ d133 1 a133 1 #else d137 1 a137 1 #endif d140 1 a140 1 @@@@ -1659,7 +1659,7 @@@@ d149 1 a149 1 @@@@ -1683,7 +1683,7 @@@@ @