I know, i know... It not possible, but part of the C code we can to convert to the D.
Show me, please, solutions, projects, tools, scripts, docs.
Can you give the link ?

Examples of what the wanted:

        // C
        typedef struct {
            uint32_t version; /* 0x5000 */
            uint16_t num_glyphs;
        } MaxProTable;
        // D
        struct MaxProTable {
            uint32_t version; /* 0x5000 */
            uint16_t num_glyphs;
        }


        // C
        #define ENABLE_SUBDIV 0
        // D
        enum ENABLE_SUBDIV = 0;


        // C
        #include "triangulate.h"
        // D
        import triangulate;


        // C
        #include <string.h>
        // D
        import core.stdc.string;


        // C
        #define cross2(a,b) ((a)[0]*(b)[1]-(a)[1]*(b)[0])
        // D
        pragma( inline, true )
auto cross2( T1, T2 )( T1 a, T2 b ) { return ((a)[0]*(b)[1]-(a)[1]*(b)[0]); }


        // C
        double ab[2];
        // D
        double[2] ab;

        // C
        trgu = calloc( 1, sizeof(*trgu) );
        // D
        trgu = calloc( 1, (*trgu).sizeof );


        // C
        PointFlag *point_flags = gt->flags;
        // D
        PointFlag *point_flags = gt.flags;

`htod` is 1.
Any more ?

Reply via email to