Kern,
Here is my problem. I have been looking through the code deciding how best
to approach this task and I have decided to convert src/tray-monitor/tray-
monitor.c such that the win32 and unix tray-monitor use as much as the
common functionality as they can. I initially used ifdef to not compile the
gtk stuff in the win32 build so that I eventually as able to build a win32
bacula-tray-monitor.exe that executed (although it had no output). So now I
have begun to port the parts of the code that I disabled. The first thing I
see is that if I get rid of GString and replace it with a dlist of
dlistString that would be a big start to the port. The problem is that the
functions create the string list from inside and pass it back to the caller
using the ** convention.
Basically I would like to convert

int docmd(monitoritem* item, const char* command, GSList** list);

to

int docmd(monitoritem* item, const char* command, dlist** list)


So the question is how does one create and initialize a dlist* that contains
dlistStrings. Being that I am a C++ programmer I would use new as I have
done thousands of times but I see that the bacula code is using New() which
basically allocates the memory in using c calls and then initializes it. So
now the problem is I believe want to do the following:

  dlistString *strType = NULL;

   *list = New(dlist(strType,&strType->m_link));

However m_link is private.

I could easily change the header to fix this problem but I wanted to ask you
first.


John
-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Bacula-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-devel

Reply via email to