File: getbaptism.li

package info (click to toggle)
lifelines 3.0.50-2etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 11,160 kB
  • ctags: 6,517
  • sloc: ansic: 57,468; xml: 8,014; sh: 4,489; makefile: 848; yacc: 601; perl: 170; sed: 16
file content (24 lines) | stat: -rw-r--r-- 644 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
/*
 * @progname       getbaptism.li
 * @version        none
 * @author         anon
 * @category       
 * @output         gedcom node function value
 * @description
 *
 * getbaptism(ind) -> NODE
 * The built-in baptism() function is limited to "CHR" records.
 * Many programs use the "BAPM" and LDS uses "BAPL" so this version
 * looks for all three in the order "CHR", "BAPM", "BAPL".
 *
 */
func getbaptism(ind)
{
     if (e, baptism(ind)) { return (e) }
     fornodes(root(ind), node) {
          set(t, tag(node))
          if (eqstr(t, "BAPM")) { return (node) }
          if (eqstr(t, "BAPL")) { return (node) }
     }
     return (0)
}