~ubuntu-branches/ubuntu/saucy/haskell-hs-bibutils/saucy

« back to all changes in this revision

Viewing changes to bibutils/list.h

  • Committer: Package Import Robot
  • Author(s): Joachim Breitner
  • Date: 2011-09-26 17:57:15 UTC
  • Revision ID: package-import@ubuntu.com-20110926175715-muzp5giy0rzonss2
Tags: upstream-4.12
ImportĀ upstreamĀ versionĀ 4.12

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * list.h
 
3
 *
 
4
 * Copyright (c) Chris Putnam 2004-2009
 
5
 *
 
6
 * Source code released under the GPL
 
7
 *
 
8
 */
 
9
 
 
10
#ifndef LISTS_H
 
11
#define LISTS_H
 
12
 
 
13
#include <stdio.h>
 
14
#include <stdlib.h>
 
15
#include <string.h>
 
16
#include "newstr.h"
 
17
 
 
18
typedef struct list {
 
19
        int n, max;
 
20
        int sorted;
 
21
        newstr *str;
 
22
} list;
 
23
 
 
24
extern void    list_init( list *a );
 
25
extern int     list_add( list *a, char *value );
 
26
extern void    list_sort( list *a );
 
27
extern int     list_find( list *a, char *searchstr );
 
28
extern int     list_findnocase( list *a, char *searchstr );
 
29
extern int     list_find_or_add( list *a, char *searchstr );
 
30
extern void    list_free( list *a );
 
31
extern int     list_fill( list *a, char *filename );
 
32
extern newstr* list_getstr( list *a, int n );
 
33
extern char*   list_getstr_char( list *a, int n );
 
34
extern list*   list_dup( list *a );
 
35
extern void    list_copy( list *to, list *from );
 
36
 
 
37
#endif