mrss_new

To create a new feed RSS from scratch, use this function as the first.

` mrss_t *d; mrss_error_t err; char *string; int integer;

d=null; // ->this is important! If d!=null, mrss_new doesn't alloc memory. mrss_new(&d);

err=mrss_set (d, MRSS_FLAG_VERSION, MRSS_VERSION_0_92, MRSS_FLAG_TITLE, "the title!", MRSS_FLAG_TTL, 12, MRSS_FLAG_END);

if(err!=MRSS_OK) printf("%s\n",mrss_strerror(err));

err=mrss_get (d, MRSS_FLAG_TITLE, &string, MRSS_FLAG_TTL, &integer, MRSS_FLAG_END);

if(err!=MRSS_OK) printf("%s\n",mrss_strerror(err)); printf("The title is: '%s'\n", string); printf("The ttl is: '%d'\n", integer); free(string); `

?
extern (C) @system nothrow @nogc
mrss_new

Parameters

mrss
Type: mrss_t**

pointer to the new data struct

Return Value

the error code

Meta