*/
/*
- Copyright (C) 2000, 2001 Kern Sibbald and John Walker
+ Copyright (C) 2000-2004 Kern Sibbald and John Walker
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
*/
int r_first = R_FIRST;
int r_last = R_LAST;
+static RES *sres_head[R_LAST - R_FIRST];
+RES **res_head = sres_head;
/* Forward referenced subroutines */
* then move it to allocated memory when the resource
* scan is complete.
*/
+#if defined(HAVE_WIN32) && !defined(HAVE_CYGWIN) && !defined(HAVE_MINGW)
+extern "C" { // work around visual compiler mangling variables
+ URES res_all;
+ int res_all_size = sizeof(res_all);
+}
+#else
URES res_all;
int res_all_size = sizeof(res_all);
+#endif
/* Definition of records permitted within each
* resource with the routine to process the record
/* Dump contents of resource */
-void dump_resource(int type, RES *reshdr, void sendit(void *sock, char *fmt, ...), void *sock)
+void dump_resource(int type, RES *reshdr, void sendit(void *sock, const char *fmt, ...), void *sock)
{
URES *res = (URES *)reshdr;
- int recurse = 1;
+ bool recurse = true;
if (res == NULL) {
printf("No record for %d %s\n", type, res_to_str(type));
}
if (type < 0) { /* no recursion */
type = - type;
- recurse = 0;
+ recurse = false;
}
switch (type) {
case R_CONSOLE: