Changeset 350 for trunk/dll/extract.c


Ignore:
Timestamp:
Jul 26, 2006, 9:01:20 PM (19 years ago)
Author:
root
Message:

Use Runtime_Error

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/extract.c

    r186 r350  
    55
    66  Copyright (c) 1993-98 M. Kimes
    7   Copyright (c) 2004, 2005 Steven H. Levine
     7  Copyright (c) 2004, 2006 Steven H. Levine
    88
    99  01 Aug 04 SHL Rework lstrip/rstrip usage
    1010  05 Jun 05 SHL Use QWL_USER
     11  17 Jul 06 SHL Use Runtime_Error
    1112
    1213***********************************************************************/
     
    1415#define INCL_WIN
    1516#define INCL_DOS
    16 
    1717#include <os2.h>
     18
    1819#include <stdlib.h>
    1920#include <stdio.h>
     
    2122#include <time.h>
    2223#include <ctype.h>
     24
    2325#include "fm3dll.h"
    2426#include "fm3dlg.h"
     
    2628
    2729#pragma data_seg(DATA1)
     30
    2831#pragma alloc_text(FMEXTRACT,ExtractTextProc,ExtractDlgProc)
    2932
    30 
    31 MRESULT EXPENTRY ExtractTextProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) {
    32 
     33static PSZ pszSrcFile = __FILE__;
     34
     35MRESULT EXPENTRY ExtractTextProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2)
     36{
    3337  PFNWP        oldproc = (PFNWP)WinQueryWindowPtr(hwnd,0);
    3438  static BOOL  emphasized = FALSE;
     
    7680
    7781
    78 MRESULT EXPENTRY ExtractDlgProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2) {
    79 
     82MRESULT EXPENTRY ExtractDlgProc (HWND hwnd,ULONG msg,MPARAM mp1,MPARAM mp2)
     83{
    8084  EXTRDATA    *arcdata = NULL;
    8185
     
    314318            }
    315319          }
    316           DosBeep(50,100);
     320          DosBeep(50,100);              // Complain a refuse to quit
    317321          break;
    318322
     
    347351            WinQueryDlgItemText(hwnd,EXT_COMMAND,256,s);
    348352            lstrip(s);
    349             if(*s) {
     353            if (!*s)
     354              Runtime_Error(pszSrcFile, __LINE__, "no command");
     355            else {
    350356              p = strchr(s,' ');
    351               if(p)
    352                 *p = 0;
     357              if (p)
     358                *p = 0;                 // Drop options
    353359              memset(&ex,0,sizeof(EXECARGS));
    354360              ex.commandline = s;
     
    363369                           MPFROMP(&ex)) &&
    364370                 *s)
     371              {
    365372                runemf2(ex.flags,
    366373                        hwnd,
     
    369376                        "%s",
    370377                        s);
    371             }
    372             else
    373               DosBeep(50,100);
     378              }
     379            }
    374380          }
    375381          break;
Note: See TracChangeset for help on using the changeset viewer.