-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/master' into mam
- Loading branch information
Showing
451 changed files
with
45,126 additions
and
34,785 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
BasedOnStyle: WebKit | ||
BreakConstructorInitializers: AfterColon | ||
PointerAlignment: Right | ||
AlignAfterOpenBracket: Align | ||
AlignConsecutiveAssignments: true | ||
AlignConsecutiveDeclarations: true | ||
AlignTrailingComments: true | ||
ColumnLimit: 120 | ||
CompactNamespaces: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: CI | ||
on: | ||
- push | ||
- pull_request | ||
- workflow_dispatch | ||
|
||
jobs: | ||
test-linux: | ||
runs-on: ubuntu-latest | ||
env: | ||
CCACHE_DIR: ${{github.workspace}}/ccache | ||
CCACHE_MAXSIZE: 100M | ||
strategy: | ||
matrix: | ||
tag: | ||
- minimal | ||
- system-libs | ||
- bundled-libs | ||
include: | ||
- tag: minimal | ||
deps: | | ||
libb2-dev | ||
libqca-qt5-2-dev | ||
options: -DIRIS_ENABLE_JINGLE_SCTP=OFF | ||
- tag: system-libs | ||
deps: | | ||
libb2-dev | ||
libqca-qt5-2-dev | ||
libusrsctp-dev | ||
options: -DIRIS_BUNDLED_QCA=OFF -DIRIS_BUNDLED_USRSCTP=OFF | ||
- tag: bundled-libs | ||
deps: null | ||
options: -DIRIS_BUNDLED_QCA=ON -DIRIS_BUNDLED_USRSCTP=ON | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
- name: Install dependencies | ||
uses: awalsh128/cache-apt-pkgs-action@latest | ||
with: | ||
packages: | | ||
${{matrix.deps}} | ||
ccache | ||
ninja-build | ||
qtbase5-dev | ||
version: ${{matrix.tag}} | ||
- name: Configure | ||
run: | | ||
cmake -B ${{github.workspace}}/build -G Ninja \ | ||
-DCMAKE_C_COMPILER_LAUNCHER=ccache \ | ||
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \ | ||
${{matrix.options}} | ||
- name: Restore cache | ||
uses: actions/cache/restore@v3 | ||
with: | ||
key: ccache-linux-${{matrix.tag}} | ||
path: ${{github.workspace}}/ccache | ||
- name: Build | ||
run: | | ||
cmake --build ${{github.workspace}}/build -v -j $(nproc) | ||
- name: Save cache | ||
uses: actions/cache@v3 | ||
with: | ||
key: ccache-linux-${{matrix.tag}} | ||
path: ${{github.workspace}}/ccache |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -18,3 +18,5 @@ object_script.* | |
/lib | ||
/plugins | ||
*.user* | ||
build-* | ||
3rdparty/qca |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# See https://pre-commit.com for more information | ||
# See https://pre-commit.com/hooks.html for more hooks | ||
|
||
exclude: '^3rdparty|COPYING.*|src/jdns' | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.5.0 | ||
hooks: | ||
- id: trailing-whitespace | ||
- id: end-of-file-fixer | ||
- id: check-added-large-files | ||
- id: check-merge-conflict | ||
- repo: https://github.com/doublify/pre-commit-clang-format | ||
# for clang-tidy we can take github.com/pocc/pre-commit-hooks | ||
rev: f4c4ac5948aff384af2b439bfabb2bdd65d2b3ac | ||
hooks: | ||
- id: clang-format | ||
- repo: https://github.com/Lucas-C/pre-commit-hooks | ||
rev: v1.1.7 | ||
hooks: | ||
- id: forbid-crlf | ||
- id: remove-crlf | ||
- id: forbid-tabs | ||
- id: remove-tabs | ||
- repo: https://github.com/openstack-dev/bashate | ||
rev: 2.0.0 | ||
hooks: | ||
- id: bashate | ||
args: ['--ignore', 'E006'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
cmake_minimum_required(VERSION 3.10.0) | ||
|
||
project(stringprep | ||
LANGUAGES CXX | ||
) | ||
|
||
set(CMAKE_AUTOMOC ON) | ||
set(CMAKE_AUTORCC ON) | ||
set(CMAKE_AUTOUIC ON) | ||
|
||
if(QT_DEFAULT_MAJOR_VERSION LESS 6) | ||
find_package(Qt5 5.10 REQUIRED COMPONENTS Core) | ||
else() | ||
find_package(Qt6 REQUIRED COMPONENTS Core) | ||
endif() | ||
|
||
add_library(stringprep STATIC | ||
stringprep.cpp | ||
profiles.cpp | ||
rfc3454.cpp | ||
qstringprep.h | ||
) | ||
|
||
target_compile_definitions(stringprep PRIVATE QSTRINGPREP_BUILDING) | ||
|
||
if(MSVC) | ||
target_compile_definitions(stringprep PRIVATE _CRT_SECURE_NO_WARNINGS _GENERATED_STDINT_H) | ||
endif() | ||
|
||
if(QT_DEFAULT_MAJOR_VERSION LESS 6) | ||
target_link_libraries(stringprep PUBLIC Qt5::Core) | ||
else() | ||
target_link_libraries(stringprep PUBLIC Qt6::Core) | ||
endif() | ||
target_include_directories(stringprep PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
Libidn COPYING -- Explanation of licensing conditions. | ||
Copyright (C) 2002-2015 Simon Josefsson | ||
See the end for copying conditions. | ||
|
||
The source code for the C library (libidn.a or libidn.so), the C# | ||
library (Libidn.dll) and the Java library (libidn-*.jar) are licensed | ||
under the terms of either the GNU General Public License version 2.0 | ||
or later (see the file COPYINGv2) or the GNU Lesser General Public | ||
License version 3.0 or later (see the file COPYING.LESSERv3), or both | ||
in parallel as here. | ||
|
||
The author of the Java library has agreed to also distribute it under | ||
the Apache License Version 2.0 (see the file java/LICENSE-2.0). | ||
|
||
The manual is licensed under the GNU Free Documentation License, | ||
Version 1.3 or any later. | ||
|
||
The command line tool, self tests, examples, and other auxilliary | ||
files, are licensed under the GNU General Public License version 3.0 | ||
or later. | ||
|
||
Other files are licensed as indicated in each file. | ||
|
||
There may be exceptions to these general rules, see each file for | ||
precise information. | ||
|
||
---------------------------------------------------------------------- | ||
Copying and distribution of this file, with or without modification, | ||
are permitted in any medium without royalty provided the copyright | ||
notice and this notice are preserved. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
This is a stringprep library extracted from LibIDN and slightly rewritten to use Qt's unicode support instead glib's one. | ||
|
||
The current version corresponds to 86e84739c5186faf3722a0f42e1e2db27870b3a5 commit of git://git.savannah.gnu.org/libidn.git | ||
|
||
The necessity of usage of separate stringprep library is described here: https://gitlab.com/libidn/libidn2/-/issues/28 | ||
|
||
Note this directory contains generated rfc3454 files from rfc3454.txt. It's very unlikely these files will ever be regenerated but just in case the directory also contains both rfc3454.txt and a perl script to generate the files. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
#! /usr/bin/perl -w | ||
|
||
# Copyright (C) 2002-2016 Simon Josefsson | ||
|
||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# This program is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
|
||
# I consider the output of this program to be unrestricted. Use it as | ||
# you will. | ||
|
||
use strict; | ||
|
||
my ($tab) = 59; | ||
my ($intable) = 0; | ||
my ($entries) = 0; | ||
my ($tablename); | ||
my ($varname); | ||
my ($starheader, $header); | ||
my ($profile) = "rfc3454"; | ||
my ($filename) = "$profile.c"; | ||
my ($headername) = "$profile.h"; | ||
my ($line, $start, $end, @map); | ||
|
||
open(FH, ">$filename") or die "cannot open $filename for writing"; | ||
|
||
print FH "/* This file is automatically generated. DO NOT EDIT!\n"; | ||
print FH " Instead, edit gen-stringprep-tables.pl and re-run. */\n\n"; | ||
|
||
print FH "#include <config.h>\n"; | ||
print FH "#include \"stringprep.h\"\n"; | ||
|
||
open(FHH, ">$headername") or die "cannot open $headername for writing"; | ||
print FHH "/* This file is automatically generated. DO NOT EDIT!\n"; | ||
print FHH " Instead, edit gen-stringprep-tables.pl and re-run. */\n\n"; | ||
|
||
while(<>) { | ||
s/^ (.*)/$1/g; # for rfc | ||
$line = $_; | ||
|
||
die "already in table" if $intable && m,^----- Start Table (.*) -----,; | ||
die "not in table" if !$intable && m,^----- End Table (.*) -----,; | ||
|
||
if ($intable && m,^----- End Table (.*) -----,) { | ||
die "table error" unless $1 eq $tablename || | ||
($1 eq "C.1.2" && $tablename eq "C.1.1"); # Typo in draft | ||
print FH " { 0 },\n"; | ||
print FH "};\n\n"; | ||
print FHH "#define N_STRINGPREP_${profile}_${varname} ${entries}\n"; | ||
$intable = 0; | ||
$entries = 0; | ||
} | ||
|
||
if (m,^[A-Z],) { | ||
$header = $line; | ||
} elsif (!m,^[ -],) { | ||
$header .= $line; | ||
} | ||
|
||
next unless ($intable || m,^----- Start Table (.*) -----,); | ||
|
||
if ($intable) { | ||
$_ = $line; | ||
chop $line; | ||
|
||
next if m,^$,; | ||
next if m,^Hoffman & Blanchet Standards Track \[Page [0-9]+\]$,; | ||
next if m,^$,; | ||
next if m,RFC 3454 Preparation of Internationalized Strings December 2002,; | ||
|
||
die "regexp failed on line: $line" unless | ||
m,^([0-9A-F]+)(-([0-9A-F]+))?(; ([0-9A-F]+)( ([0-9A-F]+))?( ([0-9A-F]+))?( ([0-9A-F]+))?;)?,; | ||
|
||
die "too many mapping targets on line: $line" if $12; | ||
|
||
$start = $1; | ||
$end = $3; | ||
$map[0] = $5; | ||
$map[1] = $7; | ||
$map[2] = $9; | ||
$map[3] = $11; | ||
|
||
die "tables tried to map a range" if $end && $map[0]; | ||
|
||
if ($map[3]) { | ||
printf FH " { 0x%06s, 0x%06s, { 0x%06s,%*s/* %s */\n 0x%06s, 0x%06s, 0x%06s }},\n", | ||
$start, $start, $map[0], $tab-length($line)-13, " ", $line, | ||
$map[1], $map[2], $map[3]; | ||
} elsif ($map[2]) { | ||
printf FH " { 0x%06s, 0x%06s, { 0x%06s,%*s/* %s */\n 0x%06s, 0x%06s }},\n", | ||
$start, $start, $map[0], $tab-length($line)-14, " ", $line, | ||
$map[1], $map[2]; | ||
} elsif ($map[1]) { | ||
printf FH " { 0x%06s, 0x%06s, { 0x%06s,%*s/* %s */\n 0x%06s }},\n", | ||
$start, $start, $map[0], $tab-length($line)-14, " ", $line, | ||
$map[1]; | ||
} elsif ($map[0]) { | ||
printf FH " { 0x%06s, 0x%06s, { 0x%06s }},%*s/* %s */\n", | ||
$start, $start, $map[0], $tab-length($line)-17, " ", $line; | ||
} elsif ($end) { | ||
printf FH " { 0x%06s, 0x%06s },%*s/* %s */\n", | ||
$start, $end, $tab-length($line)-11, " ", $line; | ||
} else { | ||
printf FH " { 0x%06s, 0x%06s },%*s/* %s */\n", | ||
$start, $start, $tab-length($line)-11, " ", $line; | ||
} | ||
$entries++; | ||
} else { | ||
$intable = 1 if !$intable; | ||
$tablename = $1; | ||
|
||
($varname = $tablename) =~ tr/./_/; | ||
$header =~ s/\n/\n * /s; | ||
|
||
print FH "\n/*\n * $header */\n\n"; | ||
print FH "const Stringprep_table_element stringprep_${profile}_${varname}\[\] = {\n"; | ||
} | ||
} | ||
|
||
close FHH or die "cannot close $headername"; | ||
close FH or die "cannot close $filename"; |
Oops, something went wrong.