1
0
Fork 0
mod-qos/tools/src/char.h
Daniel Baumann 24ecce9d56
Adding upstream version 11.74.
Signed-off-by: Daniel Baumann <daniel@debian.org>
2025-03-24 13:01:01 +01:00

539 lines
9.3 KiB
C

/**
* Utilities for the quality of service module mod_qos.
*
* See http://mod-qos.sourceforge.net/ for further
* details.
*
* Copyright (C) 2023 Pascal Buchbinder
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
#define S_W_MAX 6
#define S_H_MAX 7
static int s_0[S_H_MAX][S_W_MAX] = {
{ 0,1,1,1,0,0},
{ 1,0,0,0,1,0},
{ 1,0,0,0,1,0},
{ 1,0,0,0,1,0},
{ 1,0,0,0,1,0},
{ 0,1,1,1,0,0},
{ 0,0,0,0,0,0}
};
static int s_1[S_H_MAX][S_W_MAX] = {
{ 0,0,0,1,0,0},
{ 0,0,1,1,0,0},
{ 0,1,0,1,0,0},
{ 0,0,0,1,0,0},
{ 0,0,0,1,0,0},
{ 0,0,0,1,0,0},
{ 0,0,0,0,0,0}
};
static int s_2[S_H_MAX][S_W_MAX] = {
{ 0,1,1,1,0,0},
{ 1,0,0,0,1,0},
{ 0,0,0,1,0,0},
{ 0,0,1,0,0,0},
{ 0,1,0,0,0,0},
{ 1,1,1,1,1,0},
{ 0,0,0,0,0,0}
};
static int s_3[S_H_MAX][S_W_MAX] = {
{ 0,1,1,1,0,0},
{ 1,0,0,0,1,0},
{ 0,0,1,1,0,0},
{ 0,0,0,0,1,0},
{ 1,0,0,0,1,0},
{ 0,1,1,1,0,0},
{ 0,0,0,0,0,0}
};
static int s_4[S_H_MAX][S_W_MAX] = {
{ 0,0,0,1,0,0},
{ 0,0,1,0,0,0},
{ 0,1,0,0,0,0},
{ 1,0,0,1,0,0},
{ 1,1,1,1,1,0},
{ 0,0,0,1,0,0},
{ 0,0,0,0,0,0}
};
static int s_5[S_H_MAX][S_W_MAX] = {
{ 1,1,1,1,1,0},
{ 1,0,0,0,0,0},
{ 1,1,1,1,0,0},
{ 0,0,0,0,1,0},
{ 0,0,0,0,1,0},
{ 1,1,1,1,0,0},
{ 0,0,0,0,0,0}
};
static int s_6[S_H_MAX][S_W_MAX] = {
{ 0,1,1,1,0,0},
{ 1,0,0,0,0,0},
{ 1,0,1,1,0,0},
{ 1,1,0,0,1,0},
{ 1,0,0,0,1,0},
{ 0,1,1,1,0,0},
{ 0,0,0,0,0,0}
};
static int s_7[S_H_MAX][S_W_MAX] = {
{ 1,1,1,1,1,0},
{ 0,0,0,0,1,0},
{ 0,0,0,1,0,0},
{ 0,0,1,0,0,0},
{ 0,1,0,0,0,0},
{ 0,1,0,0,0,0},
{ 0,0,0,0,0,0}
};
static int s_8[S_H_MAX][S_W_MAX] = {
{ 0,1,1,1,0,0},
{ 1,0,0,0,1,0},
{ 0,1,1,1,0,0},
{ 1,0,0,0,1,0},
{ 1,0,0,0,1,0},
{ 0,1,1,1,0,0},
{ 0,0,0,0,0,0}
};
static int s_9[S_H_MAX][S_W_MAX] = {
{ 0,1,1,1,0,0},
{ 1,0,0,0,1,0},
{ 0,1,1,1,1,0},
{ 0,0,0,0,1,0},
{ 0,0,0,0,1,0},
{ 0,1,1,1,0,0},
{ 0,0,0,0,0,0}
};
/* ----------------------------------------------- */
static int s_a[S_H_MAX][S_W_MAX] = {
{ 0,0,0,0,0,0},
{ 0,1,1,1,0,0},
{ 0,0,0,0,1,0},
{ 0,1,1,1,1,0},
{ 1,0,0,0,1,0},
{ 0,1,1,1,1,0},
{ 0,0,0,0,0,0}
};
static int s_b[S_H_MAX][S_W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