[BACK]Return to man_hash.c CVS log [TXT][DIR] Up to [cvsweb.bsd.lv] / mandoc

Annotation of mandoc/man_hash.c, Revision 1.4

1.4     ! kristaps    1: /* $Id: man_hash.c,v 1.3 2009/03/26 09:55:39 kristaps Exp $ */
1.1       kristaps    2: /*
                      3:  * Copyright (c) 2008, 2009 Kristaps Dzonsons <kristaps@openbsd.org>
                      4:  *
                      5:  * Permission to use, copy, modify, and distribute this software for any
                      6:  * purpose with or without fee is hereby granted, provided that the
                      7:  * above copyright notice and this permission notice appear in all
                      8:  * copies.
                      9:  *
                     10:  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL
                     11:  * WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED
                     12:  * WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE
                     13:  * AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
                     14:  * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
                     15:  * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
                     16:  * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
                     17:  * PERFORMANCE OF THIS SOFTWARE.
                     18:  */
                     19: #include <stdlib.h>
                     20: #include <string.h>
                     21:
                     22: #include "libman.h"
                     23:
                     24: /* ARGUSED */
                     25: void
                     26: man_hash_free(void *htab)
                     27: {
                     28:
                     29:        /* Do nothing. */
                     30: }
                     31:
                     32:
                     33: /* ARGUSED */
                     34: void *
                     35: man_hash_alloc(void)
                     36: {
                     37:
                     38:        /* Do nothing. */
                     39:        return(NULL);
                     40: }
                     41:
                     42:
                     43: int
                     44: man_hash_find(const void *arg, const char *tmp)
                     45: {
                     46:        int              i;
                     47:
1.2       kristaps   48:        /* TODO */
                     49:
1.1       kristaps   50:        for (i = 0; i < MAN_MAX; i++)
1.3       kristaps   51:                if (0 == strcmp(tmp, man_macronames[i]))
1.1       kristaps   52:                        return(i);
                     53:
                     54:        return(MAN_MAX);
                     55: }
                     56:

CVSweb