Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 68 lines (58 sloc) 1.294 kB
29252b6 More refactoring; chopping up quirc.c. '#pragma once'-ing headers
Sound and Fury authored
1 #pragma once
2
fcf9495 Refactored .quirc and cmdline parsing; other refactoring
Sound and Fury authored
3 /*
7cb81a2 start_buffer, catches messages produced before bufs initialised
ec429 authored
4 quIRC - simple terminal-based IRC client
1bd8f39 Nudge copyright year (to "2010-12")
ec429 authored
5 Copyright (C) 2010-12 Edward Cree
7cb81a2 start_buffer, catches messages produced before bufs initialised
ec429 authored
6
fcf9495 Refactored .quirc and cmdline parsing; other refactoring
Sound and Fury authored
7 See quirc.c for license information
8 config: rc file and option parsing
9 */
10
11 #include <stdio.h>
12 #include <stdbool.h>
29252b6 More refactoring; chopping up quirc.c. '#pragma once'-ing headers
Sound and Fury authored
13 #include <string.h>
e515989 Allow multiple automatic connects and joins in .quirc
Sound and Fury authored
14
977e366 Configure logging in rc file with ">log $type $file" lines
ec429 authored
15 #include "types.h"
16
e515989 Allow multiple automatic connects and joins in .quirc
Sound and Fury authored
17 typedef struct _chanlist
18 {
19 char *name;
20 char *key;
977e366 Configure logging in rc file with ">log $type $file" lines
ec429 authored
21 FILE *logf;
22 logtype logt;
e515989 Allow multiple automatic connects and joins in .quirc
Sound and Fury authored
23 struct _chanlist *next;
a21b9dd Add /ignores in .quirc
Sound and Fury authored
24 struct _name *igns;
e515989 Allow multiple automatic connects and joins in .quirc
Sound and Fury authored
25 }
26 chanlist;
27
28 typedef struct _servlist
29 {
30 char *name;
31 char *portno;
32 char *nick;
b5829d6 PASS (--pass) and related stuff, also call termsize() at startup
ec429 authored
33 char *pass;
e515989 Allow multiple automatic connects and joins in .quirc
Sound and Fury authored
34 bool join;
35 chanlist *chans;
36 struct _servlist *next;
a21b9dd Add /ignores in .quirc
Sound and Fury authored
37 struct _name *igns;
e515989 Allow multiple automatic connects and joins in .quirc
Sound and Fury authored
38 }
39 servlist;
40
a21b9dd Add /ignores in .quirc
Sound and Fury authored
41 #include "names.h"
fcf9495 Refactored .quirc and cmdline parsing; other refactoring
Sound and Fury authored
42 #include "bits.h"
43 #include "colour.h"
44 #include "text.h"
45 #include "version.h"
7cb81a2 start_buffer, catches messages produced before bufs initialised
ec429 authored
46 #include "buffer.h"
62617ff Configurable keymapping
ec429 authored
47 #include "keymod.h"
fcf9495 Refactored .quirc and cmdline parsing; other refactoring
Sound and Fury authored
48
29252b6 More refactoring; chopping up quirc.c. '#pragma once'-ing headers
Sound and Fury authored
49 // global settings & state
de4ae60 config: generate much of the config code from a concise descriptions …
ec429 authored
50 #include "config_globals.h"
e515989 Allow multiple automatic connects and joins in .quirc
Sound and Fury authored
51 bool autojoin;
b5829d6 PASS (--pass) and related stuff, also call termsize() at startup
ec429 authored
52 char *username, *fname, *nick, *pass, *portno;
44b847a If --uname then use it instead of username for default nick
ec429 authored
53 bool defnick;
e515989 Allow multiple automatic connects and joins in .quirc
Sound and Fury authored
54 servlist *servs;
a21b9dd Add /ignores in .quirc
Sound and Fury authored
55 name *igns;
ac2ac2c Backport fixes from openSUSE (pbleser)
ec429 authored
56 char *version;
62617ff Configurable keymapping
ec429 authored
57 int nkeys;
58 keymod *kmap;
29252b6 More refactoring; chopping up quirc.c. '#pragma once'-ing headers
Sound and Fury authored
59
62617ff Configurable keymapping
ec429 authored
60 int initkeys(void);
61 void loadkeys(FILE *);
de4ae60 config: generate much of the config code from a concise descriptions …
ec429 authored
62 int conf_check(void); // writes diagnostics to start-buffer
29252b6 More refactoring; chopping up quirc.c. '#pragma once'-ing headers
Sound and Fury authored
63 int def_config(void); // set these to their defaults
64 int rcread(FILE *rcfp); // read & parse the rc file.
65 signed int pargs(int argc, char *argv[]); // parse the cmdline args. If return is >=0, main should return it also
977e366 Configure logging in rc file with ">log $type $file" lines
ec429 authored
66 void freeservlist(servlist *serv);
67 void freechanlist(chanlist *chan);
Something went wrong with that request. Please try again.