UFO: Alien Invasion
Toggle main menu visibility
Loading...
Searching...
No Matches
infostring.h
Go to the documentation of this file.
1
5
6
/*
7
All original material Copyright (C) 2002-2025 UFO: Alien Invasion.
8
9
Copyright (C) 1997-2001 Id Software, Inc.
10
11
This program is free software; you can redistribute it and/or
12
modify it under the terms of the GNU General Public License
13
as published by the Free Software Foundation; either version 2
14
of the License, or (at your option) any later version.
15
16
This program is distributed in the hope that it will be useful,
17
but WITHOUT ANY WARRANTY; without even the implied warranty of
18
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19
20
See the GNU General Public License for more details.
21
22
You should have received a copy of the GNU General Public License
23
along with this program; if not, write to the Free Software
24
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25
26
*/
27
28
#pragma once
29
30
#include <stddef.h>
31
#include "
ufotypes.h
"
32
33
/* key / value info strings */
34
#define MAX_INFO_KEY 64
35
#define MAX_INFO_VALUE 64
36
#define MAX_INFO_STRING 512
37
38
const
char
*
Info_ValueForKey
(
const
char
* s,
const
char
*
key
);
39
const
char
*
Info_BoolForKey
(
const
char
* s,
const
char
*
key
);
40
int
Info_IntegerForKey
(
const
char
* s,
const
char
*
key
);
41
void
Info_RemoveKey
(
char
* s,
const
char
*
key
);
42
void
Info_SetValueForKey
(
char
* s,
const
size_t
size
,
const
char
*
key
,
const
char
* value);
43
void
Info_SetValueForKeyAsInteger
(
char
* s,
const
size_t
size
,
const
char
*
key
,
const
int
value);
44
void
Info_Print
(
const
char
* s);
45
bool
Info_Validate
(
const
char
* s);
key
unsigned int key
Definition
cl_input.cpp:64
Info_BoolForKey
const char * Info_BoolForKey(const char *s, const char *key)
Definition
infostring.cpp:76
Info_ValueForKey
const char * Info_ValueForKey(const char *s, const char *key)
Searches the string for the given key and returns the associated value, or an empty string.
Definition
infostring.cpp:39
Info_SetValueForKey
void Info_SetValueForKey(char *s, const size_t size, const char *key, const char *value)
Adds a new entry into string with given value.
Definition
infostring.cpp:169
Info_SetValueForKeyAsInteger
void Info_SetValueForKeyAsInteger(char *s, const size_t size, const char *key, const int value)
Definition
infostring.cpp:154
Info_Validate
bool Info_Validate(const char *s)
Some characters are illegal in info strings because they can mess up the server's parsing.
Definition
infostring.cpp:142
Info_Print
void Info_Print(const char *s)
Prints info strings (like userinfo or serverinfo - CVAR_USERINFO, CVAR_SERVERINFO).
Definition
infostring.cpp:209
Info_IntegerForKey
int Info_IntegerForKey(const char *s, const char *key)
Definition
infostring.cpp:84
Info_RemoveKey
void Info_RemoveKey(char *s, const char *key)
Searches through s for key and remove is.
Definition
infostring.cpp:95
size
voidpf void uLong size
Definition
ioapi.h:42
ufotypes.h
Cross-platform type definitions.
src
shared
infostring.h
Generated on __DATE__ __TIME__ for UFO: Alien Invasion by
1.17.0