Changeset 900 in MondoRescue for trunk/mondo/src/test/test-string.c


Ignore:
Timestamp:
Oct 24, 2006, 8:49:18 AM (17 years ago)
Author:
Bruno Cornec
Message:

Huge patch to introduce low level functions that will bw used everywhere (mr_free, mr_asprintf, ...)
Nearly linking now due to that.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/mondo/src/test/test-string.c

    r768 r900  
    1212
    1313#include "my-stuff.h"
    14 #include "mr_string.h"
     14#include "mr_str.h"
     15#include "mr_mem.h"
    1516
    1617main() {
     
    2122    char *string = NULL;
    2223
    23     asprintf(&string, "%s", "md0 : active raid10 hda1[0] hda12[3] hda6[2] hda5[1]\n");
     24    mr_asprintf(&string, "%s", "md0 : active raid10 hda1[0] hda12[3] hda6[2] hda5[1]\n");
    2425    fprintf(stdout, "string=|%s|\n", string);
    2526    token = mr_strtok(string, delims, &lastpos);
    2627    while (lastpos > 0) {
    2728        fprintf(stdout, "token=|%s|, lastpos=%d\n", token, lastpos);
    28         paranoid_free(token);
     29        mr_free(token);
    2930        token = mr_strtok(string, delims, &lastpos);
    3031    }
    31     paranoid_free(string);
     32    mr_free(string);
    3233    exit(0);
    3334}
Note: See TracChangeset for help on using the changeset viewer.