hook_config_section(3alleg4) Allegro manual hook_config_section(3alleg4)NAME
hook_config_section - Hooks a configuration file section with custom handlers. Allegro game programming library.
SYNOPSIS
#include <allegro.h>
void hook_config_section(const char *section, int (*intgetter)(const char *name, int def), const char *(*stringgetter)(const char *name,
const char *def), void (*stringsetter)(const char *name, const char *value));
DESCRIPTION
Takes control of the specified config file section, so that your hook functions will be used to manipulate it instead of the normal disk
file access. If both the getter and setter functions are NULL, a currently present hook will be unhooked. Hooked functions have the highest
priority. If a section is hooked, the hook will always be called, so you can also hook a '#' section: even override_config_file() cannot
override a hooked section. Example:
int decode_encrypted_int(const char *name, int def)
{
...
}
const char *decode_encrypted_string(const char *name, const char *def)
{
...
}
void encode_plaintext_string(const char *name, const char *value)
{
...
}
int main(int argc, char *argv[])
{
...
/* Make it harder for users to tinker with the high scores. */
hook_config_section("high_scores", decode_encrypted_int,
decode_encrypted_string, encode_plaintext_string);
...
} END_OF_MAIN()
SEE ALSO config_is_hooked(3alleg4)Allegro version 4.4.2 hook_config_section(3alleg4)
Dear all
I declare like this in my program :
int main(int argc ,char **argv)
{
FILE *ft;
char* ini_file;
char fbuf;
char sendbuf;
char strbuf;
}
When I compile
this is the error :
cc: "send.c", line 28: error 1588: "ft" undefined. (1 Reply)
I have two string returning function in ESQL/C
char *segment_name(lbuffer)
char *lbuffer;
{.....
and
char *get_bpdvalue(f_name)
char *f_name;
{......
both declared above main()
char *get_bpdvalue();
char *segment_name();
my problem is segment_name works on sprintf and strcpy... (5 Replies)
Hi Pals,
I need some information related .def file in HP-Ux shell scripting. What actaully a .def file contains. It is having all definitions of some functions. But what is the relationship between a .def file and shell script. Can anyone give some examples.
Thanks in Advance.
Best... (1 Reply)
The below code throws the error, since the size of x = 19 is not passed to the cstrCopy function.
using namespace std;
static void cstrCopy(char *x, const char*y);
int main ()
{
char x;
const string y = "UNIX FORUM";
cstrCopy(x,y.c_str());
return 0;
}
void cstrCopy(char *x,... (3 Replies)
Hello everyone,
The following are my input files.
The following are my sequence of steps.
Can someone please let me know about how to make these bunch of steps into a single script so that I start the script with 1.txt and 2.txt, after execution gives me the final... (11 Replies)
I am working on klibc. I need to add a new command in kernel. klibc contains a SYSCALLS.def file which declares functions.
Where can I find definition of functions declared in .def file? (1 Reply)
Hi All,
I am trying to append time stamp to all file with wild character.
If you look above I want take all file with wild card *001* and append current time stamp to it.
I did below code. But not sure if there is any easy way that can be done in a single step
a=date +%s
for... (3 Replies)