transform (pchar -w target, int max_length, pchar source, int length)
{
  pchar ptr = .;
  ...

  while (!ptr)
  {
    char array[STR_MAXLEN] = "";
    ...

    ptr = &array[i];                                                           /*  "target pointer is out of the scope" */

    ...

  }
}