]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/console/console_conf.c
Sort Scheduled Jobs list
[bacula/bacula] / bacula / src / console / console_conf.c
index 48e460b5819d69c20b2bb806473824b0fee42de4..5893a4f9689cddc3231713770fdbeb5334b7804a 100644 (file)
@@ -47,6 +47,8 @@
  */
 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 */
 
@@ -56,8 +58,15 @@ int r_last  = R_LAST;
  * 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 
@@ -99,10 +108,10 @@ RES_TABLE resources[] = {
 
 
 /* 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));
@@ -110,7 +119,7 @@ void dump_resource(int type, RES *reshdr, void sendit(void *sock, char *fmt, ...
    }
    if (type < 0) {                   /* no recursion */
       type = - type;
-      recurse = 0;
+      recurse = false;
    }
    switch (type) {
       case R_CONSOLE: