$ od -c -N 50000 [qv]<notecards>RELEASE1.2>LIBRARY>nchacks.ted!6
0000000 T h e N C H A C K S L i b r
0000020 a r y P a c k a g e \r \r X e r
0000040 o x C o r p o r a t i o n \r \r
0000060 R a n d y T r i g g \r \r \r \r [
0000100 L o c a t i o n : { q v } < n
0000120 o t e c a r d s > r e l e a s e
0000140 1 . 2 > l i b r a r y > n c h a
0000160 c k s . d c o m ] \r [ F i r s t
0000200 w r i t t e n : 8 / 2 3 / 8
0000220 5 R a n d y T r i g g ] \r [
0000240 L a s t u p d a t e d : ] \r \r
0000260 T h i s d o c u m e n t d e
0000300 s c r i b e s a l i b r a r
0000320 y p a c k a g e c o n t a i
0000340 n i n g m i s c e l l a n e o
0000360 u s h a n d y f u n c t i o
0000400 n s w r i t t e n u s i n g
0000420 t h e p r o g r a m m e r '
0000440 s i n t e r f a c e . I t
0000460 i s h o p e d t h a t y
0000500 o u w i l l f i n d t h e
0000520 s e u s e f u l n o t o n
0000540 l y f o r t h e i r f u n
0000560 c t i o n a l i t y , b u t
0000600 a l s o a s e x a m p l e s
0000620 o f t h e s o r t o f
0000640 c o d e t h a t c a n b e
0000660 w r i t t e n u s i n g t
0000700 h e p r o g r a m m e r ' s
0000720 i n t e r f a c e . \r \r I e n
0000740 c o u r a g e a n y r e a d
0000760 e r s w h o h a v e c r e
0001000 a t e d s u c h f u n c t i
0001020 o n s t h e m s e l v e s t
0001040 o s e n d m e t h e c o
0001060 d e a n d a s h o r t d
0001100 e s c r i p t i o n a n d I
0001120 ' l l i n c o r p o r a t e
0001140 i n t o t h i s p a c k a g
0001160 e . \r \r T h e f o l l o w i n
0001200 g f u n c t i o n s a r e
0001220 a p p l i c a b l e t o s e
0001240 t s o f c a r d s a n d
0001260 a l l o w g l o b a l s e a
0001300 r c h i n g , r e p l a c i n
0001320 g , a n d c h a i n c r e
0001340 a t i o n . A l l t h e s
0001360 e f u n c t i o n s e x p e
0001400 c t t h e r e t o b e a
0001420 n o p e n n o t e f i l e .
0001440 I n a d d i t i o n , e
0001460 a c h o f t h e s e t a k
0001500 e s a C a r d s a r g u m
0001520 e n t . T h i s s h o u l
0001540 d b e b o u n d t o e i
0001560 t h e r a s i n g l e c a
0001600 r d I D o r a l i s t
0001620 o f c a r d I D s . T o
0001640 r u n t h e f u n c t i o
0001660 n o v e r a l l c a r d s
0001700 i n t h e n o t e f i l e
0001720 , p a s s t h e v a l u e
0001740 o f ( N C P . A l l C a r d
0001760 s ) a s t h e C a r d s
0002000 a r g u m e n t . T o a l
0002020 l o w u s e r s e l e c t i
0002040 o n o f c a r d s , p a s
0002060 s t h e v a l u e o f (
0002100 N C P . S e l e c t C a r d s )
0002120 . \r \r N C H A C K S . T e x t S
0002140 e a r c h ( S t r i n g W i
0002160 l d C a r d s ? C a r d s R
0002200 e t u r n L o c s F l g ) \r \r T
0002220 h i s g o e s t h r o u g h
0002240 t h e C a r d s l i s t
0002260 l o o k i n g f o r o c c u
0002300 r r e n c e s o f t e x t
0002320 s t r i n g S t r i n g .
0002340 W i l d C a r d s ? b e i n g
0002360 n o n - n i l m e a n s w
0002400 i l d c a r d c h a r a c t
0002420 e r s m a y a p p e a r i
0002440 n S t r i n g . T h e p
0002460 o u n d s i g n c h a r a c
0002500 t e r ' # ' m a t c h e s
0002520 a n y s i n g l e c h a r a
0002540 c t e r , a s t e r i s k '
0002560 * ' m a t c h e s a n y s
0002600 e q u e n c e o f c h a r a
0002620 c t e r s , a n d s i n g l
0002640 e q u o t e , " ' " c a n
0002660 b e u s e d t o q u o t
0002700 e o n e o f t h e w i l
0002720 d c a r d c h a r a c t e r s
0002740 . \r \r I f R e t u r n L o
0002760 c s F l g i s n i l , t h
0003000 e n t h i s j u s t r e t
0003020 u r n s a l i s t o f c
0003040 a r d s c o n t a i n i n g
0003060 a t l e a s t o n e o c c
0003100 u r r e n c e o f S t r i n
0003120 g . I f R e t u r n L o c
0003140 s F l g i s n o n - n i l ,
0003160 t h e n t h i s r e t u r
0003200 n s a l i s t o f l i s
0003220 t s . E a c h s u b l i s
0003240 t h a s a s f i r s t e
0003260 l e m e n t a c a r d I D
0003300 f o l l o w e d b y t h e
0003320 l o c a t i o n s o f o c
0003340 c u r e n c e s o f S t r i
0003360 n g . T h e s e a r e s
0003400 i n g l e i n t e g e r s i
0003420 f W i l d C a r d s ? i s
0003440 n i l a n d c o r r e s p o
0003460 n d t o t h e l o c a t i
0003500 o n o f t h e f i r s t
0003520 c h a r a c t e r o f S t r
0003540 i n g i n t h e t e x t .
0003560 I f W i l d C a r d s ?
0003600 i s n o n - n i l , t h e n
0003620 t h e s e a r e t w o e
0003640 l e m e n t l i s t s o f
0003660 s t a r t a n d e n d l o
0003700 c a t i o n s o f t h e m
0003720 a t c h i n g s t r i n g . \r
0003740 \r A n y c a r d s i n C a
0003760 r d s t h a t a r e n o t
0004000 t e x t c a r d s a r e
0004020 i g n o r e d ( i . e . t h
0004040 e i r c a r d t y p e m u
0004060 s t h a v e T E X T s u b
0004100 s t a n c e ) . \r \r N C H A C K
0004120 S . G l o b a l T e x t R e p l
0004140 a c e ( S t r i n g 1 S t r
0004160 i n g 2 W i l d C a r d s ?
0004200 C a r d s ) \r \r T h i s g o e
0004220 s t h r o u g h t h e C a
0004240 r d s l i s t r e p l a c i
0004260 n g e v e r y o c c u r r e
0004300 n c e o f t e x t s t r i
0004320 n g S t r i n g 1 b y S t
0004340 r i n g 2 . W i l d C a r d
0004360 s ? b e i n g n o n - n i l
0004400 m e a n s w i l d c a r d
0004420 c h a r a c t e r s m a y
0004440 a p p e a r i n S t r i n g
0004460 1 . T h e p o u n d s i
0004500 g n c h a r a c t e r ' # '
0004520 m a t c h e s a n y s i n
0004540 g l e c h a r a c t e r , a
0004560 s t e r i s k ' * ' m a t c
0004600 h e s a n y s e q u e n c e
0004620 o f c h a r a c t e r s ,
0004640 a n d s i n g l e q u o t e
0004660 , " ' " c a n b e u s e
0004700 d t o q u o t e o n e o
0004720 f t h e w i l d c a r d c
0004740 h a r a c t e r s . \r \r A n y
0004760 c a r d s i n C a r d s t
0005000 h a t a r e n o t t e x t
0005020 c a r d s a r e i g n o r
0005040 e d ( i . e . t h e i r c
0005060 a r d t y p e m u s t h a
0005100 v e T E X T s u b s t a n c
0005120 e ) . \r \r N C H A C K S . D a t
0005140 e S e a r c h ( D a t e S t r
0005160 i n g 1 D a t e S t r i n g 2
0005200 C a r d s ) \r \r T h i s g o
0005220 e s t h r o u g h t h e C
0005240 a r d s l i s t l o o k i n
0005260 g f o r o c c u r r e n c e
0005300 s o f c a r d p a r t s
0005320 m o d i f i e d b e t w e e n
0005340 t h e d a t e s D a t e S
0005360 t r i n g 1 a n d D a t e S
0005400 t r i n g 2 . I f D a t e
0005420 S t r i n g 1 i s N I L ,
0005440 t h e n i t d e f a u l t s
0005460 t o a v e r y e a r l y
0005500 d a t e . I f D a t e S
0005520 t r i n g 2 i s N I L , t
0005540 h e n i t d e f a u l t s
0005560 t o c u r r e n t d a t e .
0005600 I f y o u p r o v i d e
0005620 v a l u e s f o r e i t h
0005640 e r D a t e S t r i n g 1 o
0005660 r D a t e S t r i n g 2 , t
0005700 h e y s h o u l d b e s t
0005720 r i n g s i n t h e s a m
0005740 e f o r m a t a s t h a t
0005760 r e t u r n e d b y t h e
0006000 ( D A T E ) f o r m a t ,
0006020 i . e . " 1 - J a n - 8 5
0006040 0 0 : 0 0 : 0 0 " . \r \r T h i s
0006060 r e t u r n s a l i s t
0006100 o f l i s t s , o n e s u
0006120 b l i s t f o r e a c h c
0006140 a r d m o d i f i e d b e t
0006160 w e e n t h e g i v e n d
0006200 a t e s . T h i s s u b l
0006220 i s t c o n s i s t s o f
0006240 t h e c a r d I D f o l l
0006260 o w e d b y t w o - e l e m
0006300 e n t l i s t s c o n t a i
0006320 n i n g t h e c a r d p a
0006340 r t n a m e t h a t w a s
0006360 m o d i f i e d a n d t h
0006400 e d a t e o f l a s t m
0006420 o d i f i c a t i o n . F o
0006440 r e x a m p l e , i f t h
0006460 e r e w e r e t w o h i t
0006500 s , y o u m i g h t g e t
0006520 s o m e t h i n g l i k e
0006540 ( ( N C 0 0 0 0 1 ( S U B S T
0006560 A N C E D A T E " 2 3 - A u g
0006600 - 8 5 1 9 : 1 5 : 2 7 " ) (
0006620 T I T L E D A T E " 2 3 - A u
0006640 g - 8 5 1 9 : 1 5 : 4 4 " ) )
0006660 ( N C 0 0 0 2 3 ( L I N K S D
0006700 A T E " 2 3 - A u g - 8 5 1
0006720 9 : 1 6 : 1 6 " ) ) ) \r \r N C H
0006740 A C K S . M a k e C h a i n (
0006760 L i n k T y p e C a r d s P
0007000 o s i t i o n A d d C R F l g
0007020 ) \r \r T h i s c r e a t e s
0007040 l i n k s b e t w e e n s u
0007060 c c e s s i v e c a r d s i
0007100 n C a r d s e a c h o f
0007120 t y p e L i n k T y p e p o
0007140 s i t i o n e d a t P o s i
0007160 t i o n . T h u s t h e
0007200 f i r s t c a r d i n C a
0007220 r d s w i l l b e l i n k
0007240 e d t o t h e s e c o n d
0007260 , t h e s e c o n d t o
0007300 t h e t h i r d , e t c .
0007320 ( N o l i n k w i l l b
0007340 e b u i l t f r o m t h e
0007360 l a s t c a r d i n C a
0007400 r d s . ) P o s i t i o n
0007420 s h o u l d b e i n t h e
0007440 s a m e f o r m a s t h
0007460 a t a c c e p t e d b y N
0007500 C P . C a r d A d d T e x t ,
0007520 i . e . e i t h e r a n i
0007540 n t e g e r l o c a t i o n
0007560 o r o n e o f t h e l i
0007600 t a t o m s S T A R T o r
0007620 E N D . I f t h e A d d
0007640 C R F l g i s n o n - n i l
0007660 a n d P o s i t i o n i s
0007700 o n e o f S T A R T o r
0007720 E N D , t h e n a c a r
0007740 r i a g e r e t u r n i s
0007760 i n s e r t e d a f t e r t
0010000 h e l i n k i c o n i n
0010020 t h e c a s e o f S T A R
0010040 T o r b e f o r e t h e
0010060 l i n k i c o n i n t h e
0010100 c a s e o f E N D . \r \r A
0010120 n y c a r d s i n C a r d
0010140 s t h a t a r e n o t t
0010160 e x t c a r d s a r e i g
0010200 n o r e d ( i . e . t h e i
0010220 r c a r d t y p e m u s t
0010240 h a v e T E X T s u b s t
0010260 a n c e ) . \r \r N C H A C K S .
0010300 R e m o v e D e l e t e d I c o
0010320 n s F r o m T e x t C a r d s
0010340 ( C a r d s ) \r \r T h i s r e
0010360 m o v e s a l l d e l e t e
0010400 d l i n k i c o n s f r o
0010420 m t h e t e x t o f t h
0010440 o s e c a r d s i n C a r
0010460 d s h a v i n g T E X T s
0010500 u b s t a n c e . \r \0 \0 \0 \0 \0 005
0010520 \0 003 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 002 001
0010540 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0010560 \0 \0 \0 \0 \0 \0 002 034 \0 \0 \0 \0 \0 \0 002 001
0010600 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0010620 \0 \0 \0 \0 \0 \0 002 034 \0 \0 \0 \0 \0 \0 002 003
0010640 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0 \0
0010660 \0 \0 \0 \0 \0 \0 \0 004 \0 004 \0 \n T I M E
0010700 S R O M A N \0 \f \0 \0 \0 \0 \0 \0 002 \0
0010720 \0 \n T I M E S R O M A N \0 \n \0 \0
0010740 \0 \0 \0 \0 \0 \0 \0 \n T I M E S R O M
0010760 A N \0 \f \0 \0 \0 \0 \0 \0 \0 \0 \0 \n T I
0011000 M E S R O M A N \0 016 \0 \0 \0 \0 \0 \0
0011020 002 \0 \0 \0 \0 \0 \0 002 \0 003 \0 \0 \0 033 \0 \0
0011040 \0 \0 004 \0 \0 \0 001 \0 \0 \0 \0 003 \0 \0 \0 \0
0011060 \0 002 \0 003 \0 \0 \0 001 \0 \0 \0 \0 003 \0 \0 \0
0011100 \0 \0 002 \0 003 \0 \0 \0 022 \0 \0 \0 \0 003 \0 \0
0011120 \0 \0 \0 002 \0 003 \0 \0 \0 001 \0 \0 \0 \0 003 \0
0011140 \0 \0 \0 \0 002 \0 003 \0 \0 \0 \f \0 \0 \0 \0 003
0011160 \0 \0 \0 \0 \0 002 \0 003 \0 \0 \0 001 \0 \0 \0 \0
0011200 003 \0 \0 \0 \0 \0 002 \0 003 \0 \0 \0 001 \0 \0 \0
0011220 \0 003 \0 \0 \0 \0 \0 002 \0 003 \0 \0 \0 001 \0 \0
0011240 \0 \0 003 \0 \0 \0 \0 \0 002 \0 002 \0 \0 \0 ; \0
0011260 \0 \0 \0 002 \0 \0 \0 \0 \0 002 \0 002 \0 \0 \0 %
0011300 \0 \0 \0 \0 002 \0 \0 \0 \0 \0 002 \0 002 \0 \0 \0
0011320 017 \0 \0 \0 \0 002 \0 \0 \0 001 \0 \0 \0 \0 003 \0
0011340 \0 \0 \0 \0 002 \0 002 \0 \0 \0 001 \0 \0 \0 \0 003
0011360 \0 \0 \0 \0 \0 002 \0 001 \0 \0 001 + \0 \0 \0 \0
0011400 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0 \0 001 \0 \0 \0
0011420 \0 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0 \0 227 \0 \0
0011440 \0 \0 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0 \0 001 \0
0011460 \0 \0 \0 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0 001 336
0011500 \0 \0 \0 \0 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0 \0
0011520 001 \0 \0 \0 \0 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0
0011540 \0 ; \0 \0 \0 \0 001 \0 \0 \0 \0 \0 002 \0 001 \0
0011560 \0 \0 001 \0 \0 \0 \0 003 \0 \0 \0 \0 \0 002 \0 001
0011600 \0 \0 001 U \0 \0 \0 \0 003 \0 \0 \0 \0 \0 002 \0
0011620 001 \0 \0 \0 001 \0 \0 \0 \0 003 \0 \0 \0 \0 \0 002
0011640 \0 001 \0 \0 001 373 \0 \0 \0 \0 003 \0 \0 \0 \0 \0
0011660 002 \0 001 \0 \0 \0 001 \0 \0 \0 \0 003 \0 \0 \0 \0
0011700 \0 002 \0 001 \0 \0 \0 h \0 \0 \0 \0 003 \0 \0 \0
0011720 \0 \0 002 \0 001 \0 \0 \0 001 \0 \0 \0 \0 003 \0 \0
0011740 \0 \0 \0 002 \0 001 \0 \0 \0 = \0 \0 \0 \0 001 \0
0011760 \0 \0 \0 \0 002 \0 001 \0 \0 \0 001 \0 \0 \0 \0 003
0012000 \0 \0 \0 \0 \0 002 \0 001 \0 \0 001 c \0 \0 \0 \0
0012020 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0 \0 001 \0 \0 \0
0012040 \0 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0 \0 h \0 \0
0012060 \0 \0 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0 \0 001 \0
0012100 \0 \0 \0 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0 \0 3
0012120 \0 \0 \0 \0 001 \0 \0 \0 \0 \0 002 \0 001 \0 \0 \0
0012140 001 \0 \0 \0 \0 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0
0012160 001 242 \0 \0 \0 \0 003 \0 \0 \0 \0 \0 002 \0 001 \0
0012200 \0 \0 001 \0 \0 \0 \0 003 \0 \0 \0 \0 \0 002 \0 001
0012220 \0 \0 001 260 \0 \0 \0 \0 003 \0 \0 \0 \0 \0 002 \0
0012240 001 \0 \0 \0 001 \0 \0 \0 \0 003 \0 \0 \0 \0 \0 002
0012260 \0 001 \0 \0 \0 5 \0 \0 \0 \0 001 \0 \0 \0 \0 \0
0012300 002 \0 001 \0 \0 \0 001 \0 \0 \0 \0 003 \0 \0 \0 \0
0012320 \0 002 \0 001 \0 \0 002 ; \0 \0 \0 \0 003 \0 \0 \0
0012340 \0 \0 002 \0 001 \0 \0 \0 001 \0 \0 \0 \0 003 \0 \0
0012360 \0 \0 \0 002 \0 001 \0 \0 \0 h \0 \0 \0 \0 003 \0
0012400 \0 \0 \0 \0 002 \0 001 \0 \0 \0 001 \0 \0 \0 \0 003
0012420 \0 \0 \0 \0 \0 002 \0 001 \0 \0 \0 0 \0 \0 \0 \0
0012440 001 \0 \0 \0 \0 \0 002 \0 001 \0 \0 \0 001 \0 \0 \0
0012460 \0 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0 \0 a \0 \0
0012500 \0 \0 003 \0 \0 \0 \0 \0 002 \0 001 \0 \0 021 J \0
0012520 a z 271
0012523