looking for an old post by Steve
looking for an old post by Steve
I am looking for a post Steve gave a couple years ago (at the latest) on a believer marrying an unbeliever. My brother is considering marrying a woman who no longer is a Christian, and Steve gave some pretty powerful advice on 2 Corinthians 6:14. Could someone please find it for me asap?
Thanks.
Thanks.
- darinhouston
- Posts: 3114
- Joined: Tue Aug 26, 2008 7:45 am
Re: looking for an old post by Steve
Thanks to user "thrombomodulin", try these from the "old site" (indexed at http://haliku.merseine.nu/thenarrowpath ... index.html):
http://www.wvss.com/forumc/viewtopic.ph ... 6%3a14#315
http://www.wvss.com/forumc/viewtopic.ph ... 6%3a14#333
http://www.wvss.com/forumc/viewtopic.ph ... 3a14#12638
http://www.wvss.com/forumc/viewtopic.ph ... 3a14#16635
http://www.wvss.com/forumc/viewtopic.ph ... a14%20#884
http://www.wvss.com/forumc/viewtopic.ph ... e6%3a14#39
http://www.wvss.com/forumc/viewtopic.ph ... %3a14#1825
I wish we had a similar index of this site -- this was a very valuable resource for the old site.
http://www.wvss.com/forumc/viewtopic.ph ... 6%3a14#315
http://www.wvss.com/forumc/viewtopic.ph ... 6%3a14#333
http://www.wvss.com/forumc/viewtopic.ph ... 3a14#12638
http://www.wvss.com/forumc/viewtopic.ph ... 3a14#16635
http://www.wvss.com/forumc/viewtopic.ph ... a14%20#884
http://www.wvss.com/forumc/viewtopic.ph ... e6%3a14#39
http://www.wvss.com/forumc/viewtopic.ph ... %3a14#1825
I wish we had a similar index of this site -- this was a very valuable resource for the old site.
Re: looking for an old post by Steve
Hi Troy,
Here is another thread on the same topic:
http://www.theos.org/forum/viewtopic.ph ... 926#p25524
Here is another thread on the same topic:
http://www.theos.org/forum/viewtopic.ph ... 926#p25524
Suzana
_________________________
If a man cannot be a Christian in the place he is, he cannot be a Christian anywhere. - Henry Ward Beecher
_________________________
If a man cannot be a Christian in the place he is, he cannot be a Christian anywhere. - Henry Ward Beecher
-
- Posts: 431
- Joined: Sun Aug 24, 2008 6:59 am
Re: looking for an old post by Steve
I've been offline for more than a month now... I'm just finally getting time to get back to the forum today. My wife and I moved from Michigan to Indiana around thanksgiving, and so our Nov/Dec was fully occupied with moving, selling the home, and usual Christmas time shopping, etc,.
The site haliku.merseine.nu has been offline for a while now due to the move. When I boxed up my computer, it was the end of the site. I should be able to re-establish it again, now that its out of the box. However, it will probably require the IT support of my employer. I now work from home, and they control my router. However, it would be better to modify it so that it becomes a feature of this forum. I'll have to work with Jarrod on this.
Peter
The site haliku.merseine.nu has been offline for a while now due to the move. When I boxed up my computer, it was the end of the site. I should be able to re-establish it again, now that its out of the box. However, it will probably require the IT support of my employer. I now work from home, and they control my router. However, it would be better to modify it so that it becomes a feature of this forum. I'll have to work with Jarrod on this.
Peter
- darinhouston
- Posts: 3114
- Joined: Tue Aug 26, 2008 7:45 am
Re: looking for an old post by Steve
I sure miss that index -- is it available somewhere else? How's it configured? It's a pretty low-bandwidth thing - I could probably get it working on my end.thrombomodulin wrote:I've been offline for more than a month now... I'm just finally getting time to get back to the forum today. My wife and I moved from Michigan to Indiana around thanksgiving, and so our Nov/Dec was fully occupied with moving, selling the home, and usual Christmas time shopping, etc,.
The site haliku.merseine.nu has been offline for a while now due to the move. When I boxed up my computer, it was the end of the site. I should be able to re-establish it again, now that its out of the box. However, it will probably require the IT support of my employer. I now work from home, and they control my router. However, it would be better to modify it so that it becomes a feature of this forum. I'll have to work with Jarrod on this.
Peter
-
- Posts: 431
- Joined: Sun Aug 24, 2008 6:59 am
Re: looking for an old post by Steve
I sent a message to Jarrod last week to ask about setting it up server side. I haven't gotten a reply from him yet.
There are two main parts of the code that are important, and the rest is just bookkeeping.
First, the code is simply to match the following patterns against post texts, then output a list of the matches in as suitable format - I did so as HTML pages, with cells being the matched text, the author, and post title, with "a href" link back to the appropriate place on the forum.
I could send the whole of the code, but it is in some ways specific to the old forum at http://www.wvss.com/forumc
Second part is as follows to parse a list of numbers (e.g. "Isaiah 22:1-5,7 ; 23:7 ; 45:9-11" would add four references to the index).
With a little knowledge of the C programming language (or not) anyone can take it from here to adapt the code for use on the current forum. I'm glad to help in the implementation. We should also get worked out the reason why word searches are omitting the oldest posts.
There are two main parts of the code that are important, and the rest is just bookkeeping.
First, the code is simply to match the following patterns against post texts, then output a list of the matches in as suitable format - I did so as HTML pages, with cells being the matched text, the author, and post title, with "a href" link back to the appropriate place on the forum.
I could send the whole of the code, but it is in some ways specific to the old forum at http://www.wvss.com/forumc
Code: Select all
struct regex_s {
char *pattern ;
int book_id ;
#define MODE_BOOK 0x001
#define MODE_CHAPTER 0x002
#define MODE_VERSE 0x004
int mode_submatch ;
regex_t preg[1] ;
} books[] = {
{"\[^0-9a-zA-Z]revelation *([0-9]+)" , BOOK_REVELATION , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]rev\\.* *([0-9]+)" , BOOK_REVELATION , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]jude *([0-9]+)" , BOOK_JUDE , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]iii *john *([0-9]+)" , BOOK_3JOHN , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]3 *john *([0-9]+)" , BOOK_3JOHN , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *john *([0-9]+)" , BOOK_2JOHN , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *john *([0-9]+)" , BOOK_2JOHN , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *john *([0-9]+)" , BOOK_1JOHN , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *john *([0-9]+)" , BOOK_1JOHN , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *peter *([0-9]+)" , BOOK_2PETER , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *peter *([0-9]+)" , BOOK_2PETER , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *peter *([0-9]+)" , BOOK_1PETER , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *peter *([0-9]+)" , BOOK_1PETER , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]james *([0-9]+)" , BOOK_JAMES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]hebrews *([0-9]+)" , BOOK_HEBREWS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]heb\\.* *([0-9]+)" , BOOK_HEBREWS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]philemon *([0-9]+)" , BOOK_PHILEMON , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]phil\\.* *([0-9]+)" , BOOK_PHILEMON , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]phil\\.* *([0-9]+)" , BOOK_PHILEMON , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]titus *([0-9]+)" , BOOK_TITUS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *timothy *([0-9]+)" , BOOK_2TIMOTHY , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *tim\\.* *([0-9]+)" , BOOK_2TIMOTHY , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *timothy *([0-9]+)" , BOOK_2TIMOTHY , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *tim\\.* *([0-9]+)" , BOOK_2TIMOTHY , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *timothy *([0-9]+)" , BOOK_1TIMOTHY , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *tim\\.* *([0-9]+)" , BOOK_1TIMOTHY , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *timothy *([0-9]+)" , BOOK_1TIMOTHY , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *tim\\.* *([0-9]+)" , BOOK_1TIMOTHY , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *thessalonians *([0-9]+)" , BOOK_2THESSALONIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *thess\\.* *([0-9]+)" , BOOK_2THESSALONIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *thes\\.* *([0-9]+)" , BOOK_2THESSALONIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *thessalonians *([0-9]+)" , BOOK_2THESSALONIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *thes\\.* *([0-9]+)" , BOOK_2THESSALONIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *thessalonians *([0-9]+)" , BOOK_1THESSALONIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *thes\\.* *([0-9]+)" , BOOK_1THESSALONIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *thessalonians *([0-9]+)" , BOOK_1THESSALONIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *thes\\.* *([0-9]+)" , BOOK_1THESSALONIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]colossians *([0-9]+)" , BOOK_COLOSSIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]col\\.* *([0-9]+)" , BOOK_COLOSSIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]philippians *([0-9]+)" , BOOK_PHILIPPIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]phil\\.* *([0-9]+)" , BOOK_PHILIPPIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ephesians *([0-9]+)" , BOOK_EPHESIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]eph\\.* *([0-9]+)" , BOOK_EPHESIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]galatians *([0-9]+)" , BOOK_GALATIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]gal\\.* *([0-9]+)" , BOOK_GALATIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *corinthians *([0-9]+)" , BOOK_2CORINTHIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *cor\\.* *([0-9]+)" , BOOK_2CORINTHIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *corinthians *([0-9]+)" , BOOK_2CORINTHIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *cor\\.* *([0-9]+)" , BOOK_2CORINTHIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *corinthians *([0-9]+)" , BOOK_1CORINTHIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *cor\\.* *([0-9]+)" , BOOK_1CORINTHIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *corinthians *([0-9]+)" , BOOK_1CORINTHIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *cor\\.* *([0-9]+)" , BOOK_1CORINTHIANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]romans *([0-9]+)" , BOOK_ROMANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]rom\\.* *([0-9]+)" , BOOK_ROMANS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]acts *([0-9]+)" , BOOK_ACTS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]john *([0-9]+)" , BOOK_JOHN , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]luke *([0-9]+)" , BOOK_LUKE , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]mark *([0-9]+)" , BOOK_MARK , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]matthew *([0-9]+)" , BOOK_MATTHEW , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]matt\\.* *([0-9]+)" , BOOK_MATTHEW , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]malachi *([0-9]+)" , BOOK_MALACHI , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]mal\\.* *([0-9]+)" , BOOK_MALACHI , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]zechariah *([0-9]+)" , BOOK_ZECHARIAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]zech\\.* *([0-9]+)" , BOOK_ZECHARIAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]haggai *([0-9]+)" , BOOK_HAGGAI , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]hag\\.* *([0-9]+)" , BOOK_HAGGAI , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]zephaniah *([0-9]+)" , BOOK_ZEPHANIAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]zeph\\.* *([0-9]+)" , BOOK_ZEPHANIAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]habakkuk *([0-9]+)" , BOOK_HABAKKUK , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]hab\\.* *([0-9]+)" , BOOK_HABAKKUK , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]nahum *([0-9]+)" , BOOK_NAHUM , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]micah *([0-9]+)" , BOOK_MICAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]jonah *([0-9]+)" , BOOK_JONAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]jon\\.* *([0-9]+)" , BOOK_JONAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]obadiah *([0-9]+)" , BOOK_OBADIAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]amos *([0-9]+)" , BOOK_AMOS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]joel *([0-9]+)" , BOOK_JOEL , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]hosea *([0-9]+)" , BOOK_HOSEA , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]daniel *([0-9]+)" , BOOK_DANIEL , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ezekiel *([0-9]+)" , BOOK_EZEKIEL , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]eze\\.* *([0-9]+)" , BOOK_EZEKIEL , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]lamentations *([0-9]+)" , BOOK_LAMENTATIONS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]lam\\.* *([0-9]+)" , BOOK_LAMENTATIONS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]jeremiah *([0-9]+)" , BOOK_JEREMIAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]jer\\.* *([0-9]+)" , BOOK_JEREMIAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]isaiah *([0-9]+)" , BOOK_ISAIAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]isa\\.* *([0-9]+)" , BOOK_ISAIAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]songofsolomon *([0-9]+)" , BOOK_SONGOFSOLOMON , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]sos\\.* *([0-9]+)" , BOOK_SONGOFSOLOMON , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ecclesiastes *([0-9]+)" , BOOK_ECCLESIASTES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ecc\\.* *([0-9]+)" , BOOK_ECCLESIASTES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]proverbs *([0-9]+)" , BOOK_PROVERBS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]prov\\.* *([0-9]+)" , BOOK_PROVERBS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]psalm *([0-9]+)" , BOOK_PSALM , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ps\\.* *([0-9]+)" , BOOK_PSALM , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]job *([0-9]+)" , BOOK_JOB , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]esther *([0-9]+)" , BOOK_ESTHER , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]est\\.* *([0-9]+)" , BOOK_ESTHER , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]nehemiah *([0-9]+)" , BOOK_NEHEMIAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]neh\\.* *([0-9]+)" , BOOK_NEHEMIAH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ezra *([0-9]+)" , BOOK_EZRA , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *chronicles *([0-9]+)" , BOOK_2CHRONICLES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *chr\\.* *([0-9]+)" , BOOK_2CHRONICLES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *chronicles *([0-9]+)" , BOOK_2CHRONICLES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *chr\\.* *([0-9]+)" , BOOK_2CHRONICLES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *chronicles *([0-9]+)" , BOOK_1CHRONICLES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *chr\\.* *([0-9]+)" , BOOK_1CHRONICLES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *chronicles *([0-9]+)" , BOOK_1CHRONICLES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *chr\\.* *([0-9]+)" , BOOK_1CHRONICLES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *kings *([0-9]+)" , BOOK_2KINGS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *kings *([0-9]+)" , BOOK_2KINGS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *kings *([0-9]+)" , BOOK_1KINGS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *kings *([0-9]+)" , BOOK_1KINGS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *samuel *([0-9]+)" , BOOK_2SAMUEL , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ii *sam\\.* *([0-9]+)" , BOOK_2SAMUEL , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *samuel *([0-9]+)" , BOOK_2SAMUEL , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]2 *sam\\.* *([0-9]+)" , BOOK_2SAMUEL , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *samuel *([0-9]+)" , BOOK_1SAMUEL , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]i *sam\\.* *([0-9]+)" , BOOK_1SAMUEL , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *samuel *([0-9]+)" , BOOK_1SAMUEL , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]1 *sam\\.* *([0-9]+)" , BOOK_1SAMUEL , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]ruth *([0-9]+)" , BOOK_RUTH , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]judges *([0-9]+)" , BOOK_JUDGES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]jud\\.* *([0-9]+)" , BOOK_JUDGES , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]joshua *([0-9]+)" , BOOK_JOSHUA , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]josh\\.* *([0-9]+)" , BOOK_JOSHUA , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]deuteronomy *([0-9]+)" , BOOK_DEUTERONOMY , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]deut\\.* *([0-9]+)" , BOOK_DEUTERONOMY , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]numbers *([0-9]+)" , BOOK_NUMBERS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]num\\.* *([0-9]+)" , BOOK_NUMBERS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]leviticus *([0-9]+)" , BOOK_LEVITICUS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]lev\\.* *([0-9]+)" , BOOK_LEVITICUS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]exodus *([0-9]+)" , BOOK_EXODUS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]exe\\.* *([0-9]+)" , BOOK_EXODUS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]genesis *([0-9]+)" , BOOK_GENESIS , MODE_BOOK|MODE_CHAPTER ,},
{"\[^0-9a-zA-Z]gen\\.* *([0-9]+)" , BOOK_GENESIS , MODE_BOOK|MODE_CHAPTER ,},
};
int regex_compile( void )
{
int j;
for(j=0;j<sizeof(books)/sizeof(struct regex_s);j++)
if ( 0 != regcomp( (books+j)->preg , (books+j)->pattern , REG_EXTENDED) )
{
fprintf(stderr,"FATAL ERROR: pattern %d failed to compile, string='%s'\n",j+1,(books+j)->pattern);
exit(1);
}
return(0);
};
Code: Select all
int parse_numeric_list ( struct ref_list_s * ref_list , int book_id , char * numeric_string ,
char * original_string , char * username , char * anchorname , char * forumname , char *topicname ,
char * sourceurl , int page )
{
/* this function accepts a string which is chapter/verse reference and returns parsed data */
struct reference_s * ref ;
int j;
int strt_chapter = 0,stop_chapter = 0;
int strt_verse = 0,stop_verse = 0;
int seen_colon = 0;
int seen_dash = 0;
int count = ref_list->cnt ;
fprintf(stderr,"%s\n",original_string);
if ( strcmp(original_string,"I Cor 5,;") ) debug = 1;
original_string = strdup(original_string);
username = strdup(username );
anchorname = strdup(anchorname );
forumname = strdup(forumname );
topicname = strdup(topicname );
sourceurl = strdup(sourceurl );
/* before remove all white space from numeric_string, make sure '[0-9][ \t]*[0-9]' references are not corrupted */
{
char *dptr,*sptr;
for(sptr=numeric_string+1;*sptr;sptr++)
if (( (' ' == *sptr || '\t' == *sptr) && '0' <= *(sptr-1) && *(sptr-1) <= '9' ) )
{
for(dptr=sptr;' '==*dptr||'\t'==*dptr;dptr++);
if ( '0' <= *dptr && *dptr <= '9' )
*sptr = ',';
}
}
/* remove all white space from numeric_string */
{
char *dptr,*sptr;
for(dptr=sptr=numeric_string;(*dptr = *sptr);sptr++)
if ( ( ' ' != *dptr ) && ( '\t' != *dptr ) )
dptr++;
}
if ( debug )
{
fprintf(stderr," parse_numeric_list(\"%s\")\n",numeric_string);
fprintf(stderr," Book: '%s'\n",book_names[book_id] );
fprintf(stderr," Line: '%s'\n",original_string);
}
for(j=0;*(numeric_string+j);j++)
{
char *ns = numeric_string+j;
#define RESET_CHAPTER 0x0002
#define RESET_VERSE 0x0004
int check_in = 0;
if ( '0' <= *ns && *ns <= '9' )
{
int num = atoi(ns);
if ( debug )
fprintf(stderr," pre number %d -- %d:%d,%d:%d\n",num,strt_chapter,strt_verse,stop_chapter,stop_verse);
if ( !strt_chapter ) strt_chapter = num;
else if (!seen_dash && seen_colon && !strt_verse ) strt_verse = num;
else if ( seen_dash && upcoming_char(ns,':') && !stop_chapter ) stop_chapter = num;
else if ( seen_dash && !upcoming_char(ns,':') && !strt_verse && !stop_chapter ) stop_chapter = num;
else if ( seen_dash && seen_colon && !stop_verse ) { stop_verse = num; if ( 0==stop_chapter ) stop_chapter = strt_chapter ; }
else
{
fprintf(stderr," REJECTING: at '%s' in %s at line %d\n",ns,__FUNCTION__,__LINE__);
}
if ( debug )
fprintf(stderr," post number %d -- %d:%d,%d:%d\n",num,strt_chapter,strt_verse,stop_chapter,stop_verse);
for( ;( '0' <= *(numeric_string+j+1) && *(numeric_string+j+1) <= '9' );j++); /* advance through the numbers */
ns = numeric_string+j;
}
else if ( '-' == *ns )
{
seen_dash++;
stop_verse = 0;
stop_chapter = 0;
}
else if ( ':' == *ns )
seen_colon = 1;
else if ( ',' == *ns || ';' == *ns )
{
if ( !strt_verse || upcoming_char(ns+1,':') )
check_in |= RESET_CHAPTER|RESET_VERSE; else
check_in |= RESET_VERSE ;
seen_dash = 0;
}
else
{
fprintf(stderr,"FATAL EXCEPTION: at '%s' in %s at line %d\n",ns,__FUNCTION__,__LINE__);
exit(1);
}
if ( check_in || '\0' == *(ns+1))
{
ref = add_reference( ref_list );
ref->book_id = book_id ;
ref->strt_chapter = strt_chapter ;
ref->strt_verse = strt_verse ;
ref->stop_chapter = stop_chapter ;
ref->stop_verse = stop_verse ;
ref->original_string = original_string ;
ref->username = username ;
ref->anchorname = anchorname ;
ref->forumname = forumname ;
ref->topicname = topicname ;
ref->sourceurl = sourceurl ;
ref->page = page ;
if ( RESET_CHAPTER & check_in )
strt_chapter = stop_chapter = 0 ;
if ( RESET_VERSE & check_in )
strt_verse = stop_verse = 0 ;
if ( debug )
fprintf(stderr," new entry %d:%d - %d:%d\n",ref->strt_chapter,ref->strt_verse,ref->stop_chapter,ref->stop_verse);
}
}
if ( count == ref_list->cnt )
{
fprintf(stderr,"FATAL EXCEPTION: parsing failed in %s at line %d\n",__FUNCTION__,__LINE__);
exit(1);
}
return(0);
};
- darinhouston
- Posts: 3114
- Joined: Tue Aug 26, 2008 7:45 am
Re: looking for an old post by Steve
I don't know enough about the new forum, but I might be able to get the code from the old site running again - there are a lot of things there that I'd like to find from time to time based on verses. (in this instance Luke 16 on the unjust steward -- surely, we've discussed that, but I can't find anything).