示例#1
0
//      清空NameList内存,将toplev,current复置为NULL
void CreateNameList(void)
{
	if (toplev)
		FreeNameList();
	toplev = NULL;
	current = NULL;
}
示例#2
0
void    STPurge( void ) {
//=================

// Free up the entire symbol table.

    FreeNameList( GList );
    GList = NULL;
    FreeLocalLists();
    // SubProgId is used by Error() to report subprogram name. In case
    // we are purging as a result of "out of memory" error, set SubProgId
    // to NULL.
    SubProgId = NULL;
}
示例#3
0
void    FreeLocalLists( void ) {
//========================

// Free symbol tables associated with subprograms (local).

    FreeNameList( NList );
    FreeNameList( BList );
    FreeList( CList );
    FreeList( SList );
    FreeList( LList );
    FreeMList( MList );
    FreeRList( RList );
    FreeNmList( NmList );
    FreeNameList( IFList );
    BList = NULL;
    SList = NULL;
    NList = NULL;
    LList = NULL;
    CList = NULL;
    MList = NULL;
    RList = NULL;
    NmList = NULL;
    IFList = NULL;
}
示例#4
0
文件: thunk.c 项目: mingpen/OpenNT
VOID
FreeNameList (PNAME_LIST  List)
{
    PNAME_LIST  p1;

    while (List) {
        if (List->ChildList)
            FreeNameList (List->ChildList);

        p1 = List->Next;
        free (List->Name);
        free (List);
        List = p1;
    }
}
示例#5
0
void            TDProgFini( void ) {
//============================

// Finish off compilation of file.

    if( ProgSw & PS_DONT_GENERATE ) {
        // at the end of pass 1
        if( ProgSw & PS_PROGRAM_DONE ) {
            CGFlags = CG_HAS_PROGRAM;
        }
        DefaultLibInfo();
    }
    if( ( Options & OPT_SYNTAX ) || ( ( ProgSw & PS_DONT_GENERATE ) == 0 ) ) {
        FreeNameList( GList );
        GList = NULL;
    }
}
示例#6
0
int
money_cop()
{
    int ch, quit = 0;
    char uident[IDLEN + 1], buf[256];

    if (!(myInfo->GetLetter == 1)) {
        clear();
        showAt(5, 4, "你已经关闭了金融中心游戏功能,请开启后再来。",
               YEA);
        return 0;
    }

    while (!quit) {
        sprintf(buf, "%s警署", CENTER_NAME);
        nomoney_show_stat(buf);
        move(8, 16);
        prints("打击犯罪,维持治安!");
        move(10, 4);
        prints("近期犯罪活动大大增加,刑警们也开始日以继夜的加班。");
        move(t_lines - 1, 0);
        prints("\033[1;44m 选单 \033[1;46m [1]报案 [2]通缉榜"
               " [3]刑警队 [4]署长办公室 [Q]离开\033[m");
        ch = igetkey();
        switch (ch) {
        case '1':
            nomoney_show_stat("警署接待厅");
            cop_accuse();
            break;
        case '2':
            clear();
            move(1, 0);
            prints("%s警署当前通缉的犯罪嫌疑人:", CENTER_NAME);
            listfilecontent(DIR_MC "criminals_list");
            FreeNameList();
            pressanykey();
            break;
        case '3':
            cop_police();
            break;
        case '4':
            nomoney_show_stat("署长办公室");
            whoTakeCharge(8, uident);
            if (strcmp(currentuser->userid, uident))
                break;
            showAt(6, 0, "    请选择操作代号:\n"
                   "        1. 任命警员         2. 解职警员\n"
                   "        3. 警员名单         4. 保释罪犯\n"
                   "        5. 查询             Q. 退出", NA);
            ch = igetkey();
            switch (ch) {
            case '1':
            case '2':
                cop_arrange(ch - '0');
                break;
            case '3':
                clear();
                move(1, 0);
                prints("目前%s警署警员名单:", CENTER_NAME);
                listfilecontent(DIR_MC "policemen");
                FreeNameList();
                pressanykey();
                break;
            case '4':
                break;
            case '5':
                SearchCrime();
            }
            break;
        case 'q':
        case 'Q':
            quit = 1;
            break;
        }
        limit_cpu();
    }
    return 0;
}
示例#7
0
文件: thunk.c 项目: mingpen/OpenNT
BOOL
APIENTRY ThunkDlgProc(
   HWND hDlg,
   unsigned message,
   DWORD wParam,
   LONG lParam
   )
{
    PNAME_LIST      Item;

    switch (message) {
    case WM_INITDIALOG:
        SourceModule = NULL;
        ImportModule = NULL;
        ThunkCreateDriverList ();
        NameList2ComboBox (hDlg, IDM_THUNK_SOURCE, DriverList);
        NameList2ListBox (hDlg, IDM_THUNK_LIST, ActiveThunks);
        return (TRUE);

    case WM_COMMAND:
        switch(wParam) {

               //
               // end function
               //

           case COMBOCMD (CBN_SELCHANGE, IDM_THUNK_SOURCE):
           case COMBOCMD (CBN_SELCHANGE, IDM_THUNK_IMPORT):
                Item = GetComboSelection (hDlg, IDM_THUNK_SOURCE);
                if (Item  &&  Item != SourceModule) {
                    SourceModule = Item;
                    NameList2ComboBox (hDlg, IDM_THUNK_IMPORT, Item->ChildList);
                }

                Item = GetComboSelection (hDlg, IDM_THUNK_IMPORT);
                if (Item  &&  Item != ImportModule) {
                    ImportModule = Item;
                    NameList2ComboBox (hDlg, IDM_THUNK_FUNCTION, Item->ChildList);
                }

                break;

           case IDM_THUNK_REMOVE:
                RemoveHook (hDlg);
                break;

           case IDM_THUNK_CLEAR_ALL:
                ClearAllHooks (hDlg);
                break;

           case IDM_THUNK_ADD:
                AddThunk (hDlg);
                break;

           case IDOK:
           case IDCANCEL:
                //DlgThunkData (hDlg);
                FreeNameList (DriverList);
                DriverList = NULL;
                EndDialog(hDlg, DIALOG_SUCCESS);
                return (TRUE);
        }

    }
    return (FALSE);
}