[sword-devel] Linking in SWORD

Troy A. Griffitts scribe at crosswire.org
Sat Feb 25 03:06:04 MST 2006

	I haven't forgotten you on your question about how to tell if a verse 
is linked.  There is no real good answer right now.  Linking in SWORD is 
equivalent to hard linking in UNIX.  No one directory entry is the 
'main' entry.  They all just point to the same inode.  We don't do 
reference counting so I couldn't tell you if other links exists.  In 
some driver implementations it's possible to know this, but in general 
it is not.  The way we handle this in frontends I've worked with is, as 
we're iterating, we keep an SWBuf previousEntry.  If 
module->RenderText() == previousEntry then we guess we're in a 
sequencial link.  I wish I had a better answer for you.  We could keep 
more official data to determine number of linking entries for the 
current entry and stuff like that, but we really never need to know 
about this, more than just the above check, so it hasn't really been 
worth the effort.  Let me know if you have ideas.


More information about the sword-devel mailing list