rewrite of parse_name in apps/apps.c