bin im handbuch kurz über structs stöber gewesen.
nun mache ich es mal so wie es dort gezeigt wird.
ahh ja das mit dem struct string klammern hab ich vergessen ! thx!
COLORSTYLES * mycol = malloc(sizeof(COLORSTYLES)); // creates a new SPOT struct at runtime
memset(mycol,0,sizeof(COLORSTYLES)); // set the struct content to zero (it's undefined after malloc)
COLORSTYLES* colstyles = malloc(colorstyles_summe*sizeof(COLORSTYLES)); // creates an array of colorstyles_summe SPOT structs
jetzt stürzt nichts mehr ab =)
jetzt kann ich auch den string im struct erstellen
(colstyles[i]).str = sys_malloc( sizeof(STRING*) * colstyles[i].len );
und dann füllen und bearbeiten
((colstyles[0]).str)[0] = str_create("");
str_cpy(((colstyles[0]).str)[0], zeilen[0]);
geilo thx