rem: WApplication *list = app->main_window_desc->screen_ptr->wapp_list; int index = 0; WWindow *wwin = app->main_window_desc;   while (list) { if (app == list) return index;  if (strcmp(wwin->wm_instance, list->main_window_desc->wm_instance) == 0 && strcmp(wwin->wm_class, list->main_window_desc->wm_class) == 0) index++;  list = list->next; }  puts("OH SHIT!?!?!? HOW THE FUCK DID WE GET HERE!?!?!?!?!");  return 0;
add: return app->index;
context: wApplicationIndexOfGroup(WApplication *app){    WApplication *list = app->main_window_desc->screen_ptr->wapp_list;    int index = 0;    WWindow *wwin = app->main_window_desc;/*    if (!WFLAGP(wwin, collapse_appicons))	return 0; */        while (list) {	if (app == list)	    return index;	if (strcmp(wwin->wm_instance,		   list->main_window_desc->wm_instance) == 0	    &&	    strcmp(wwin->wm_class,		   list->main_window_desc->wm_class) == 0)	    index++;	list = list->next;    }        puts("OH SHIT!?!?!? HOW THE FUCK DID WE GET HERE!?!?!?!?!");        return 0;}