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

  if (...)
  {
    char array[STR_MAXLEN] = "";
    ...

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

    ...

  }
}