diff options
author | Werner Koch <[email protected]> | 1998-02-11 23:22:09 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 1998-02-11 23:22:09 +0000 |
commit | bc5789665ae8c9f8fc3d02841cd6c9ade447a12a (patch) | |
tree | a98aa9fdf58eaffecb38ce481606ee8536280fc8 /util/strgutil.c | |
parent | a couple of changes; but some parts are now broken (diff) | |
download | gnupg-bc5789665ae8c9f8fc3d02841cd6c9ade447a12a.tar.gz gnupg-bc5789665ae8c9f8fc3d02841cd6c9ade447a12a.zip |
bug fixes
Diffstat (limited to '')
-rw-r--r-- | util/strgutil.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/util/strgutil.c b/util/strgutil.c index a687d0af3..e04367a7e 100644 --- a/util/strgutil.c +++ b/util/strgutil.c @@ -50,6 +50,28 @@ add_to_strlist( STRLIST *list, const char *string ) *list = sl; } + + +STRLIST +strlist_prev( STRLIST head, STRLIST node ) +{ + STRLIST n; + + for(n=NULL; head && head != node; head = head->next ) + n = head; + return n; +} + +STRLIST +strlist_last( STRLIST node ) +{ + if( node ) + for( ; node->next ; node = node->next ) + ; + return node; +} + + /**************** * look for the substring SUB in buffer and return a pointer to that * substring in BUF or NULL if not found. |