- int lp = strlen(LOCALEPATH), lc = strlen(locale),
- ct = strlen(catalog), len = lp + lc + ct + 3;
- catalog_filename = new char[len];
-
- strncpy(catalog_filename, LOCALEPATH, lp);
- *(catalog_filename + lp) = '/';
- strncpy(catalog_filename + lp + 1, locale, lc);
- *(catalog_filename + lp + lc + 1) = '/';
- strncpy(catalog_filename + lp + lc + 2, catalog, ct + 1);
+ string catalog_filename = LOCALEPATH;
+ catalog_filename += '/';
+ catalog_filename += locale;
+ catalog_filename += '/';
+ catalog_filename += catalog;