LCOV - code coverage report
Current view: top level - src/interfaces/ecpg/preproc - ecpg_kwlist_d.h (source / functions) Hit Total Coverage
Test: PostgreSQL 17devel Lines: 9 9 100.0 %
Date: 2024-04-25 00:11:39 Functions: 1 1 100.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /*-------------------------------------------------------------------------
       2             :  *
       3             :  * ecpg_kwlist_d.h
       4             :  *    List of keywords represented as a ScanKeywordList.
       5             :  *
       6             :  * Portions Copyright (c) 1996-2024, PostgreSQL Global Development Group
       7             :  * Portions Copyright (c) 1994, Regents of the University of California
       8             :  *
       9             :  * NOTES
      10             :  *  ******************************
      11             :  *  *** DO NOT EDIT THIS FILE! ***
      12             :  *  ******************************
      13             :  *
      14             :  *  It has been GENERATED by src/tools/gen_keywordlist.pl
      15             :  *
      16             :  *-------------------------------------------------------------------------
      17             :  */
      18             : 
      19             : #ifndef ECPG_KWLIST_D_H
      20             : #define ECPG_KWLIST_D_H
      21             : 
      22             : #include "common/kwlookup.h"
      23             : 
      24             : static const char ScanECPGKeywords_kw_string[] =
      25             :     "allocate\0"
      26             :     "autocommit\0"
      27             :     "bool\0"
      28             :     "break\0"
      29             :     "cardinality\0"
      30             :     "connect\0"
      31             :     "count\0"
      32             :     "datetime_interval_code\0"
      33             :     "datetime_interval_precision\0"
      34             :     "describe\0"
      35             :     "descriptor\0"
      36             :     "disconnect\0"
      37             :     "found\0"
      38             :     "free\0"
      39             :     "get\0"
      40             :     "go\0"
      41             :     "goto\0"
      42             :     "identified\0"
      43             :     "indicator\0"
      44             :     "key_member\0"
      45             :     "length\0"
      46             :     "long\0"
      47             :     "nullable\0"
      48             :     "octet_length\0"
      49             :     "open\0"
      50             :     "output\0"
      51             :     "reference\0"
      52             :     "returned_length\0"
      53             :     "returned_octet_length\0"
      54             :     "scale\0"
      55             :     "section\0"
      56             :     "short\0"
      57             :     "signed\0"
      58             :     "sqlerror\0"
      59             :     "sqlprint\0"
      60             :     "sqlwarning\0"
      61             :     "stop\0"
      62             :     "struct\0"
      63             :     "unsigned\0"
      64             :     "var\0"
      65             :     "whenever";
      66             : 
      67             : static const uint16 ScanECPGKeywords_kw_offsets[] = {
      68             :     0,
      69             :     9,
      70             :     20,
      71             :     25,
      72             :     31,
      73             :     43,
      74             :     51,
      75             :     57,
      76             :     80,
      77             :     108,
      78             :     117,
      79             :     128,
      80             :     139,
      81             :     145,
      82             :     150,
      83             :     154,
      84             :     157,
      85             :     162,
      86             :     173,
      87             :     183,
      88             :     194,
      89             :     201,
      90             :     206,
      91             :     215,
      92             :     228,
      93             :     233,
      94             :     240,
      95             :     250,
      96             :     266,
      97             :     288,
      98             :     294,
      99             :     302,
     100             :     308,
     101             :     315,
     102             :     324,
     103             :     333,
     104             :     344,
     105             :     349,
     106             :     356,
     107             :     365,
     108             :     369,
     109             : };
     110             : 
     111             : #define SCANECPGKEYWORDS_NUM_KEYWORDS 41
     112             : 
     113             : static int
     114        5006 : ScanECPGKeywords_hash_func(const void *key, size_t keylen)
     115             : {
     116             :     static const int8 h[83] = {
     117             :         0,     24,    127,   127,   3,     13,    -21,   127,
     118             :         0,     20,    2,     18,    24,    32,    127,   0,
     119             :         127,   127,   22,    127,   127,   127,   -23,   127,
     120             :         127,   0,     127,   127,   127,   -8,    22,    1,
     121             :         0,     7,     0,     6,     16,    34,    127,   127,
     122             :         16,    0,     44,    127,   127,   127,   -12,   127,
     123             :         21,    18,    0,     127,   -9,    28,    7,     4,
     124             :         127,   26,    127,   14,    127,   -8,    127,   29,
     125             :         127,   0,     0,     38,    127,   9,     25,    0,
     126             :         0,     127,   15,    20,    127,   7,     -1,    5,
     127             :         19,    127,   11
     128             :     };
     129             : 
     130        5006 :     const unsigned char *k = (const unsigned char *) key;
     131        5006 :     uint32      a = 0;
     132        5006 :     uint32      b = 0;
     133             : 
     134       36340 :     while (keylen--)
     135             :     {
     136       31334 :         unsigned char c = *k++ | 0x20;
     137             : 
     138       31334 :         a = a * 257 + c;
     139       31334 :         b = b * 31 + c;
     140             :     }
     141        5006 :     return h[a % 83] + h[b % 83];
     142             : }
     143             : 
     144             : static const ScanKeywordList ScanECPGKeywords = {
     145             :     ScanECPGKeywords_kw_string,
     146             :     ScanECPGKeywords_kw_offsets,
     147             :     ScanECPGKeywords_hash_func,
     148             :     SCANECPGKEYWORDS_NUM_KEYWORDS,
     149             :     27
     150             : };
     151             : 
     152             : #endif                          /* ECPG_KWLIST_D_H */

Generated by: LCOV version 1.14