]> cygwin.com Git - cygwin-apps/setup.git/blame - ini.h
Remove .cvsignore
[cygwin-apps/setup.git] / ini.h
CommitLineData
23c9e63c 1/*
eb20d728 2 * Copyright (c) 2000,2007 Red Hat, Inc.
23c9e63c
DD
3 *
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.
8 *
9 * A copy of the GNU General Public License can be found at
10 * http://www.gnu.org/
11 *
12 * Written by DJ Delorie <dj@cygnus.com>
13 *
14 */
15
c93bc6d0
MB
16#ifndef SETUP_INI_H
17#define SETUP_INI_H
8f53e82a 18
341988b9 19class io_stream;
fd93eff9 20#include <string>
296c4272
AG
21#include <vector>
22
23typedef std::vector <std::string> IniList;
24extern IniList found_ini_list, setup_ext_list;
c9641752 25const std::string setup_exts[] = { "zst", "xz", "bz2", "ini" };
296c4272 26extern bool is_64bit;
903087fe 27extern bool is_new_install;
296c4272
AG
28extern std::string SetupArch;
29extern std::string SetupIniDir;
30extern std::string SetupBaseName;
31
b92028a4 32class IniState;
618bd457 33class IniDBBuilderPackage;
aa1e3b4d 34class IniParseFeedback;
618bd457 35void ini_init (io_stream *, IniDBBuilderPackage *, IniParseFeedback &);
d0fa1c4e
RC
36#define YYSTYPE char *
37
23c9e63c
DD
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. */
44
c46a33a9
CF
45typedef enum
46{
47 EXCLUDE_NONE = 0,
48 EXCLUDE_BY_SETUP,
49 EXCLUDE_NOT_FOUND
4ea94dbb 50} excludes;
c46a33a9 51
eb20d728
BD
52/* The following three vars are used to facilitate error handling between the
53 parser/lexer and its callers, namely ini.cc:do_remote_ini() and
54 IniParseFindVisitor::visitFile(). */
55
56extern std::string current_ini_name; /* current filename/URL being parsed */
dbfe3c19 57extern std::string current_ini_sig_name; /* current filename/URL for sig file */
eb20d728
BD
58extern std::string yyerror_messages; /* textual parse error messages */
59extern int yyerror_count; /* number of parse errors */
8f53e82a 60
3ce2ac31
AG
61/* The following definitions are used in the parser implementation */
62
159763b2
AG
63#define hexnibble(val) ('\xff' & (val > '9') ? val - 'a' + 10 : val - '0')
64#define nibbled1(v1,v2) ('\xff' & ((v1 << 4) | v2))
3ce2ac31 65#define b64url(val) \
159763b2
AG
66 ('\x3f' & (( val == '_') ? '\x3f' \
67 : (val == '-') ? '\x3e' \
68 : (val >= 'a') ? val - 'a' + '\x1a' \
69 : (val >= 'A') ? val - 'A' + '\x00' \
70 : val - '0' + '\x34'))
71#define b64d1(v1,v2,v3,v4) ('\xff' & ((v1 << 2) | (v2 >> 4)))
72#define b64d2(v1,v2,v3,v4) ('\xff' & ((v2 << 4) | (v3 >> 2)))
73#define b64d3(v1,v2,v3,v4) ('\xff' & ((v3 << 6) | v4))
3ce2ac31 74
c93bc6d0 75#endif /* SETUP_INI_H */
This page took 0.103244 seconds and 5 git commands to generate.