Conquest 1.4.16 beta released

  • Hi Marcel,


    Better than that, I can send the warning free version, I just about done with it.


    As for requires global construction, I think the problem is that the global class are constructed outside of main. Maybe they should be changed to pointers and allocated in main().


    Bruce

  • Hi Marcel,


    Almost done. 2 warnings left in 32bit LE, BE and 64bit LE. I'm just not sure of the code used here in dgate.cpp:


    static ExtendedPDU_Service ForwardPDU[MAXExportConverters][MAXExportConverters]; // max 20*20 with remaining association
    // This looks like a 2 dimensional array of ExtendedPDU_Service or a ***ForwardPDU handle


    *q = new_queue(QueueSize, 1536, 100, exportprocessN, N>=MAXExportConverters ? NULL : ForwardPDU[N], 0);
    // Here it is used as a 1 dimensional array ExtendedPDU_Service or a **ForwardPDU handle


    struct conquest_queue *new_queue(int num, int size, int delay, BOOL (*process)(char *, ExtendedPDU_Service *PDU, char *), ExtendedPDU_Service *PDU, int maxfails)
    // And here it is ExtendedPDU_Service pointer *PDU or used as called.


    Is it one or two dimensional?
    I'm I missing the obvious?


    Also we are creating 400 "ExtendedPDU_Service" classes as a global each time dgate is run. It is only used in export_queueN(), Could it be a local static or a global pointer made when needed?


    When I am done, I would like to do the merge with your current version and send it back to you for you to look at. There are a lot of changes in code, but almost none in function. For example, OperatorConsole is changed from a global Debug to a *Debug and constructed in main. This changes OperatorConsole.printf() to OperatorConsolePtr->printf(), no real change in function, but a lot of change in code (thanks to find and replace). I also added strnlen(const char*, max), strlen32(const char*) and strlen32u(const char*) as very safe versions with the correct return sizes in 64 bit.


    Bruce

  • Hi Marcel,


    I did miss the obvious, in c++ ,Array[a][b] is the same as Array[a*b] in memory and is *Array type. In libjpeg, it makes a Java style array, where Array[a][b] is not Array[a*b], but **Array and *Array.


    But the question is still why MAXExportConverters * MAXExportConverters when N from ForwardPDU[N] is limited to MAXExportConverters?


    Bruce

  • Hi,


    these PDU's need to be static as they manage ForwardAssociationLevel for each of the possible "forward" exportconverters. The 2D array allows 20 forward statements per exportconverter line (of which there and maximum 20). That you mentioned many changes in the code does not look like a nice prospect. I will have to review all of them......


    Marcel

  • Hi Marcel,


    Static, yes, but do they need to be global? You can look at my code, the change would now be easy. Well, I fixed all of the warnings and that made the 64 bit code much safer. I replaced a lot of the strlen()'s with a 32 bit signed (strlen32()) and unsigned (strlen32u()) versions. For example, VRs are always shorter than UINT32 so I would use strlen32u() with them. The other change was to make global classes in to pointers (Ex: Debug) and create them in main, and to test all returned file lengths for > int lengths. Even though the changes are minor, they change a lot of code.


    Is your current version the last one posted? If not, can you send me the newest, I think it would be easier for me to merge your's into mine than you to merge mine.


    Bruce

  • Hi Marcel,


    I believe a have a much safer 64 bit version.


    A recommendation on how I would check for the changes. Before comparing the new files to your files, I would replace all OperatorConsole. with OperatorConsolePtr-> and SystemDebug. with SystemDebugPtr-> in the originals. After that, I would do the file compare. Those are the biggest changes that effect the most files, yet have no real change in the program other than the allocations are done after the program starts.


    The other big changes are with strlen and file functions, both can return 64 bit values, even on some 32 bit systems off_t is 64 (mine). VRs are limited to 32 bit length, so they must be checked. I also don't like strlen because many strings in DICOM are not null terminated. For this reason I add strnlen (found on many systems, if not found (mine), I create it). One day I would like to eliminate strlen completely, but not today (unless you want to). I did make strlen32 and strlen32u to limit and return the correct sizes. Again this is almost no change in function, done in a lot of places.


    If you have any problems or questions, I will respond quickly. Do you have skype? (bitsltd)


    Well here are the files:http://www.bitsltd.net/images/…416releasecandidate64.zip


    Bruce

  • Hi Bruce,


    it does not compile on windows with hundreds of error messages. BOOL and SQLHWND are not defined. Must be something with the order of the include files but trivial shuffling does not work.... :(


    dgate.cpp
    e:\quirt\comps\exe\dgate2\nkiqrsop.hpp(47) : error C2146: syntax error : missing ';' before identifier 'bNkiCompressed'
    e:\quirt\comps\exe\dgate2\nkiqrsop.hpp(47) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    e:\quirt\comps\exe\dgate2\nkiqrsop.hpp(47) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
    e:\quirt\comps\exe\dgate2\nkiqrsop.hpp(53) : error C2146: syntax error : missing ';' before identifier 'bRtImagePosOK'


    and so on....


    Marcel

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!