rem: if (scr->root_menu && scr->root_menu->flags.buttoned) { sprintf(buffer, "%i,%i", scr->root_menu->frame_x, scr->root_menu->frame_y); key = PLMakeString("RootMenu"); value = PLMakeString(buffer); PLInsertDictionaryEntry(menus, key, value); PLRelease(key); PLRelease(value); save_menus = 1; }
context: wMenuSaveState(WScreen *scr){    proplist_t menus, key, value;    int save_menus = 0;    char buffer[256];    menus = PLMakeDictionaryFromEntries(NULL, NULL, NULL);#ifndef LITE    if (scr->root_menu && scr->root_menu->flags.buttoned) {        sprintf(buffer, "%i,%i", scr->root_menu->frame_x,                                 scr->root_menu->frame_y);        key = PLMakeString("RootMenu");        value = PLMakeString(buffer);        PLInsertDictionaryEntry(menus, key, value);        PLRelease(key);        PLRelease(value);        save_menus = 1;    }    if (scr->switch_menu && scr->switch_menu->flags.buttoned) {        sprintf(buffer, "%i,%i", scr->switch_menu->frame_x,                                 scr->switch_menu->frame_y);        key = PLMakeString("SwitchMenu");        value = PLMakeString(buffer);        PLInsertDictionaryEntry(menus, key, value);        PLRelease(key);        PLRelease(value);        save_menus = 1;    }#endif /* !LITE */    if (scr->workspace_menu && scr->workspace_menu->flags.buttoned) {        sprintf(buffer, "%i,%i", scr->workspace_menu->frame_x,                                 scr->workspace_menu->frame_y);        key = PLMakeString("WorkspaceMenu");        value = PLMakeString(buffer);        PLInsertDictionaryEntry(menus, key, value);        PLRelease(key);        PLRelease(value);        save_menus = 1;    }        if (save_menus) {        key = PLMakeString("Menus");        PLInsertDictionaryEntry(scr->session_state, key, menus);        PLRelease(key);    }    PLRelease(menus);}