Listing 5 Displaying Dates in Spanish

void handle_dates()
{
      char *ploc_str;
      char *ploc_save;

/*1*/  ploc_str = setlocale(LC_TIME, NULL);
/*2*/  ploc_save = malloc(strlen(ploc_str) + 1);
/*3*/  strcpy(ploc_save, ploc_str);
      printf("Saved current LC_TIME\n");

/*4*/  setlocale(LC_TIME, LOC_Spanish);
      printf("Established %s LC_TIME\n", STR(LOC_Spanish));

      printf("Doing %s-specific date/time processing\n", STR(LOC_Spanish));

/*5*/  setlocale(LC_TIME, ploc_save);
      printf("Restored saved LC_TIME\n");
      free(ploc_save);
}