(linenum→info "unix/slp.c:2238")

glibc/2.7/locale/locarchive.h

    1: /* Definitions for locale archive handling.
    2:    Copyright (C) 2002 Free Software Foundation, Inc.
    3:    This file is part of the GNU C Library.
    4: 
    5:    The GNU C Library is free software; you can redistribute it and/or
    6:    modify it under the terms of the GNU Lesser General Public
    7:    License as published by the Free Software Foundation; either
    8:    version 2.1 of the License, or (at your option) any later version.
    9: 
   10:    The GNU C Library is distributed in the hope that it will be useful,
   11:    but WITHOUT ANY WARRANTY; without even the implied warranty of
   12:    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
   13:    Lesser General Public License for more details.
   14: 
   15:    You should have received a copy of the GNU Lesser General Public
   16:    License along with the GNU C Library; if not, write to the Free
   17:    Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
   18:    02111-1307 USA.  */
   19: 
   20: #ifndef _LOCARCHIVE_H
   21: #define _LOCARCHIVE_H 1
   22: 
   23: #include <stdint.h>
   24: 
   25: 
   26: #define AR_MAGIC 0xde020109
   27: 
   28: struct locarhead
   29: {
   30:   uint32_t magic;
   31:   /* Serial number.  */
   32:   uint32_t serial;
   33:   /* Name hash table.  */
   34:   uint32_t namehash_offset;
   35:   uint32_t namehash_used;
   36:   uint32_t namehash_size;
   37:   /* String table.  */
   38:   uint32_t string_offset;
   39:   uint32_t string_used;
   40:   uint32_t string_size;
   41:   /* Table with locale records.  */
   42:   uint32_t locrectab_offset;
   43:   uint32_t locrectab_used;
   44:   uint32_t locrectab_size;
   45:   /* MD5 sum hash table.  */
   46:   uint32_t sumhash_offset;
   47:   uint32_t sumhash_used;
   48:   uint32_t sumhash_size;
   49: };
   50: 
   51: 
   52: struct namehashent
   53: {
   54:   /* Hash value of the name.  */
   55:   uint32_t hashval;
   56:   /* Offset of the name in the string table.  */
   57:   uint32_t name_offset;
   58:   /* Offset of the locale record.  */
   59:   uint32_t locrec_offset;
   60: };
   61: 
   62: 
   63: struct sumhashent
   64: {
   65:   /* MD5 sum.  */
   66:   char sum[16];
   67:   /* Offset of the file in the archive.  */
   68:   uint32_t file_offset;
   69: };
   70: 
   71: struct locrecent
   72: {
   73:   uint32_t refs;                /* # of namehashent records that point here */
   74:   struct
   75:   {
   76:     uint32_t offset;
   77:     uint32_t len;
   78:   } record[__LC_LAST];
   79: };
   80: 
   81: 
   82: struct locarhandle
   83: {
   84:   int fd;
   85:   void *addr;
   86:   size_t len;
   87: };
   88: 
   89: 
   90: /* In memory data for the locales with their checksums.  */
   91: typedef struct locale_category_data
   92: {
   93:   off64_t size;
   94:   void *addr;
   95:   char sum[16];
   96: } locale_data_t[__LC_LAST];
   97: 
   98: #endif  /* locarchive.h */
Syntax (Markdown)