Skip to content
Snippets Groups Projects
Select Git revision
  • 8b7d66b923f31805f792b378b0021c8b0db958ab
  • collabora/staging default
  • aptly-docker
  • collabora/production
  • ci-perl
  • always-tag-staging-production
  • wip/bookworm-backend
  • master
  • wip/refi64/aptly-tests
  • wip/sjoerd/aptly-in-own-container
  • relax-liveness-check
  • wip/integration-test
  • wip/collabora/emulated-builds
  • collabora/master/rebase
  • wip/docker-stuff
  • allow-build-deps
  • 2.10
  • 2.9
  • 2.8
  • 2.7
  • 2.6
  • 2.10.23
  • 2.10.22
  • 2.10.21
  • 2.10.20
  • 2.10.19
  • 2.10.18
  • 2.10.17
  • 2.10.16
  • 2.10.15
  • 2.10.14
  • 2.10.13
  • 2.10.12
  • 2.10.11
  • 2.10.10
  • 2.10.9
  • 2.10.7
  • 2.10.6
  • 2.10.5
  • 2.10.4
  • 2.10.3
41 results

backend-docker-entrypoint.sh

Blame
  • conmakehash.c 5.98 KiB
    /*
     * conmakehash.c
     *
     * Create arrays for initializing the kernel folded tables (using a hash
     * table turned out to be to limiting...)  Unfortunately we can't simply
     * preinitialize the tables at compile time since kfree() cannot accept
     * memory not allocated by kmalloc(), and doing our own memory management
     * just for this seems like massive overkill.
     *
     * Copyright (C) 1995-1997 H. Peter Anvin
     *
     * This program is a part of the Linux kernel, and may be freely
     * copied under the terms of the GNU General Public License (GPL),
     * version 2, or at your option any later version.
     */
    
    #include <stdio.h>
    #include <stdlib.h>
    #include <sysexits.h>
    #include <string.h>
    #include <ctype.h>
    
    #define MAX_FONTLEN 256
    
    typedef unsigned short unicode;
    
    static void usage(char *argv0)
    {
      fprintf(stderr, "Usage: \n"
             "        %s chartable [hashsize] [hashstep] [maxhashlevel]\n", argv0);
      exit(EX_USAGE);
    }
    
    static int getunicode(char **p0)
    {
      char *p = *p0;
    
      while (*p == ' ' || *p == '\t')
        p++;
      if (*p != 'U' || p[1] != '+' ||
          !isxdigit(p[2]) || !isxdigit(p[3]) || !isxdigit(p[4]) ||
          !isxdigit(p[5]) || isxdigit(p[6]))
        return -1;
      *p0 = p+6;
      return strtol(p+2,0,16);
    }
    
    unicode unitable[MAX_FONTLEN][255];
    				/* Massive overkill, but who cares? */
    int unicount[MAX_FONTLEN];
    
    static void addpair(int fp, int un)
    {
      int i;
    
      if ( un <= 0xfffe )
        {
          /* Check it isn't a duplicate */
    
          for ( i = 0 ; i < unicount[fp] ; i++ )
    	if ( unitable[fp][i] == un )
    	  return;
    
          /* Add to list */
    
          if ( unicount[fp] > 254 )
    	{
    	  fprintf(stderr, "ERROR: Only 255 unicodes/glyph permitted!\n");
    	  exit(EX_DATAERR);
    	}