Added translation using Weblate (Italian)
[cygwin-setup.git] / ini.h
blobecc4b78e2072d3f95d91a28d136170bed8117980
1 /*
2 * Copyright (c) 2000,2007 Red Hat, Inc.
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
12 * Written by DJ Delorie <dj@cygnus.com>
16 #ifndef SETUP_INI_H
17 #define SETUP_INI_H
19 class io_stream;
20 #include <string>
21 #include <vector>
23 typedef std::vector <std::string> IniList;
24 extern IniList found_ini_list, setup_ext_list;
25 const std::string setup_exts[] = { "zst", "xz", "bz2", "ini" };
26 extern bool is_64bit;
27 extern bool is_new_install;
28 extern std::string SetupArch;
29 extern std::string SetupIniDir;
30 extern std::string SetupBaseName;
32 class IniState;
33 class IniDBBuilder;
34 class IniParseFeedback;
35 void ini_init (io_stream *, IniDBBuilder *, IniParseFeedback &);
36 #define YYSTYPE char *
38 /* When setup.ini is parsed, the information is stored according to
39 the declarations here. ini.cc (via inilex and iniparse)
40 initializes these structures. choose.cc sets the action and trust
41 fields. download.cc downloads any needed files for selected
42 packages (the chosen "install" field). install.cc installs
43 selected packages. */
45 extern int yyparse ();
47 /* The following definitions are used in the parser implementation */
49 #define hexnibble(val) ('\xff' & (val > '9') ? val - 'a' + 10 : val - '0')
50 #define nibbled1(v1,v2) ('\xff' & ((v1 << 4) | v2))
51 #define b64url(val) \
52 ('\x3f' & (( val == '_') ? '\x3f' \
53 : (val == '-') ? '\x3e' \
54 : (val >= 'a') ? val - 'a' + '\x1a' \
55 : (val >= 'A') ? val - 'A' + '\x00' \
56 : val - '0' + '\x34'))
57 #define b64d1(v1,v2,v3,v4) ('\xff' & ((v1 << 2) | (v2 >> 4)))
58 #define b64d2(v1,v2,v3,v4) ('\xff' & ((v2 << 4) | (v3 >> 2)))
59 #define b64d3(v1,v2,v3,v4) ('\xff' & ((v3 << 6) | v4))
61 #endif /* SETUP_INI_H */