Changeset 1321


Ignore:
Timestamp:
Dec 7, 2008, 2:48:06 AM (17 years ago)
Author:
Steven Levine
Message:

Rework casts variable types for OpenWatcom 1.8 compatibility
Add more FORTIFY support

Location:
trunk/dll
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/arccnrs.c

    r1314 r1321  
    637637      fp = xfopen(arctemp, "w", pszSrcFile, __LINE__);
    638638      if (!fp) {
    639         xfree(arctemp, pszSrcFile, __LINE__);
    640         return 0;
     639        xfree(arctemp, pszSrcFile, __LINE__);
     640        return 0;
    641641      }
    642642      else {
     
    646646        if (rc) {
    647647          Dos_Error(MB_CANCEL, rc, hwndCnr, pszSrcFile, __LINE__,
    648                     "DosDupHandle");
    649           xfree(arctemp, pszSrcFile, __LINE__);
     648                    "DosDupHandle");
     649          xfree(arctemp, pszSrcFile, __LINE__);
    650650          return 0;
    651651        }
     
    657657            Dos_Error(MB_CANCEL, rc, hwndCnr, pszSrcFile, __LINE__,
    658658                      "DosDupHandle");
    659             xfree(arctemp, pszSrcFile, __LINE__);
    660             return 0;
     659            xfree(arctemp, pszSrcFile, __LINE__);
     660            return 0;
    661661          }
    662662          else {
     
    812812                pai->flags = ARCFLAGS_REALDIR;
    813813              pai->pszFileName = xstrdup(fname,pszSrcFile, __LINE__);
     814#             ifdef FORTIFY
     815              // Will be freed by WM_DESTROY
     816              Fortify_SetOwner(pai->pszFileName, 1);
     817              // Fortify_ChangeScope(pai->pszFileName, -1);
     818#             endif
     819
    814820              pai->pszDisplayName = pai->pszFileName;
    815821              pai->rc.pszIcon = pai->pszDisplayName;
     
    16561662
    16571663      if (li && li->list && li->list[0]) {
    1658         printf("%x/r", li->type); fflush(stdout);
     1664        // printf("%x/r", li->type); fflush(stdout);    // 24 Sep 08 SHL
    16591665        switch (li->type) {
    16601666        case IDM_ARCHIVE:
     
    37063712      }
    37073713      else {
     3714#       ifdef FORTIFY
     3715        // Will be freed by WM_DESTROY
     3716        Fortify_ChangeScope(dcd, -1);
     3717#       endif
    37083718        dcd->size = sizeof(DIRCNRDATA);
    37093719        dcd->id = id;
    37103720        dcd->type = ARC_FRAME;
    37113721        if (!pTmpDir)
    3712           strcpy(dcd->workdir, pFM2SaveDirectory);
    3713         MakeTempName(dcd->workdir, ArcTempRoot, 2);
    3714           /*if (dcd->workdir[strlen(dcd->workdir) - 1] != '\\')
     3722          strcpy(dcd->workdir, pFM2SaveDirectory);
     3723        MakeTempName(dcd->workdir, ArcTempRoot, 2);
     3724#if 0 // 06 Sep 08 SHL fixme to be gone
     3725        if (dcd->workdir[strlen(dcd->workdir) - 1] != '\\')
    37153726            strcat(dcd->workdir, "\\");
    37163727          sprintf(dcd->workdir + strlen(dcd->workdir), "%s.%03x",
     
    37183729        else
    37193730          sprintf(dcd->workdir, "%s.%03x",
    3720                   ArcTempRoot, (clock() & 4095));*/
     3731                  ArcTempRoot, (clock() & 4095));
     3732#endif // 06 Sep 08 SHL fixme to be gone
    37213733        strcpy(dcd->arcname, fullname);
    37223734        if (*extractpath) {
  • trunk/dll/assoc.c

    r1220 r1321  
    234234    PrfWriteProfileString(fmprof, FM3Str, temp->pszCmdLine, szEnviroment);
    235235  pszDisplayStr = xmallocz((CCHMAXPATH * 2) + MaxComLineStrg + 6,
    236                            pszSrcFile, __LINE__);
     236                           pszSrcFile, __LINE__);
    237237  if (pszDisplayStr) {
    238238    sprintf(pszDisplayStr, "%-12s \x1a %-24s %s%s%s", temp->mask,
    239             temp->pszCmdLine, (*temp->sig) ?
    240             "[" : NullStr, (*temp->sig) ? temp->sig : NullStr,
    241             (*temp->sig) ? "]" : NullStr);
     239            temp->pszCmdLine, (*temp->sig) ?
     240            "[" : NullStr, (*temp->sig) ? temp->sig : NullStr,
     241            (*temp->sig) ? "]" : NullStr);
    242242    x = (SHORT) WinSendDlgItemMsg(hwnd,
    243                                   ASS_LISTBOX,
    244                                   LM_INSERTITEM,
    245                                   MPFROM2SHORT(LIT_END, 0), MPFROMP(pszDisplayStr));
     243                                  ASS_LISTBOX,
     244                                  LM_INSERTITEM,
     245                                  MPFROM2SHORT(LIT_END, 0), MPFROMP(pszDisplayStr));
    246246    if (x >= 0) {
    247247      WinSendDlgItemMsg(hwnd,
    248                         ASS_LISTBOX,
    249                         LM_SETITEMHANDLE,
    250                         MPFROMSHORT(x), MPFROMP(info));
     248                        ASS_LISTBOX,
     249                        LM_SETITEMHANDLE,
     250                        MPFROMSHORT(x), MPFROMP(info));
    251251      WinSendDlgItemMsg(hwnd,
    252                         ASS_LISTBOX,
    253                         LM_SELECTITEM,
    254                         MPFROMSHORT(x), MPFROMSHORT(TRUE));
     252                        ASS_LISTBOX,
     253                        LM_SELECTITEM,
     254                        MPFROMSHORT(x), MPFROMSHORT(TRUE));
    255255    }
    256256    free(pszDisplayStr);
     
    297297              ";\n%0.*s\n%0.*s\n%0.*s\n%lu\n%lu\n",
    298298              CCHMAXPATH,
    299               info->mask,
    300               MaxComLineStrg,
     299              info->mask,
     300              MaxComLineStrg,
    301301              info->pszCmdLine,
    302302              CCHMAXPATH,
     
    422422      }
    423423      else
    424         exclude = FALSE;
    425         didmatch = wildcard((strchr(p, '\\') ||
    426                              strchr(p, ':')) ? datafile : file, p, FALSE);
     424        exclude = FALSE;
     425        didmatch = wildcard((strchr(p, '\\') ||
     426                             strchr(p, ':')) ? datafile : file, p, FALSE);
    427427      if (exclude && didmatch)
    428428        didmatch = FALSE;
     
    480480                        info->pszCmdLine,
    481481                        flags,
    482                         NULL, list, GetPString(IDS_EXECASSOCTITLETEXT),
    483                         pszSrcFile, __LINE__);
     482                        NULL, list, GetPString(IDS_EXECASSOCTITLETEXT),
     483                        pszSrcFile, __LINE__);
    484484        if (rc != -1 && dieafter)
    485485          PostMsg((HWND) 0, WM_QUIT, MPVOID, MPVOID);
     
    534534
    535535      pszDisplayStr = xmallocz((CCHMAXPATH * 2) + MaxComLineStrg + 6,
    536                                pszSrcFile, __LINE__);
     536                               pszSrcFile, __LINE__);
    537537      if (pszDisplayStr) {
    538         WinSendDlgItemMsg(hwnd, ASS_LISTBOX, LM_DELETEALL, MPVOID, MPVOID);
    539         info = asshead;
    540         while (info) {
    541           sprintf(pszDisplayStr,
    542                   "%-12s \x1a %-24s %s%s%s",
    543                   info->mask,
    544                   info->pszCmdLine,
    545                   (info->sig && *info->sig) ?
    546                   "[" : NullStr,
    547                   (info->sig && *info->sig) ? info->sig : NullStr,
    548                   (info->sig && *info->sig) ? "]" : NullStr);
    549           x = (SHORT) WinSendDlgItemMsg(hwnd,
    550                                         ASS_LISTBOX,
    551                                         LM_INSERTITEM,
    552                                         MPFROM2SHORT(LIT_END, 0), MPFROMP(pszDisplayStr));
    553           if (x >= 0)
    554             WinSendDlgItemMsg(hwnd,
    555                               ASS_LISTBOX,
    556                               LM_SETITEMHANDLE, MPFROMSHORT(x), MPFROMP(info));
    557           info = info->next;
    558         }
    559         WinSendDlgItemMsg(hwnd,
    560                           ASS_LISTBOX,
    561                           LM_SELECTITEM, MPFROMSHORT(0), MPFROMSHORT(TRUE));
    562         xfree(pszDisplayStr, pszSrcFile, __LINE__);
     538        WinSendDlgItemMsg(hwnd, ASS_LISTBOX, LM_DELETEALL, MPVOID, MPVOID);
     539        info = asshead;
     540        while (info) {
     541          sprintf(pszDisplayStr,
     542                  "%-12s \x1a %-24s %s%s%s",
     543                  info->mask,
     544                  info->pszCmdLine,
     545                  (info->sig && *info->sig) ?
     546                  "[" : NullStr,
     547                  (info->sig && *info->sig) ? info->sig : NullStr,
     548                  (info->sig && *info->sig) ? "]" : NullStr);
     549          x = (SHORT) WinSendDlgItemMsg(hwnd,
     550                                        ASS_LISTBOX,
     551                                        LM_INSERTITEM,
     552                                        MPFROM2SHORT(LIT_END, 0), MPFROMP(pszDisplayStr));
     553          if (x >= 0)
     554            WinSendDlgItemMsg(hwnd,
     555                              ASS_LISTBOX,
     556                              LM_SETITEMHANDLE, MPFROMSHORT(x), MPFROMP(info));
     557          info = info->next;
     558        }
     559        WinSendDlgItemMsg(hwnd,
     560                          ASS_LISTBOX,
     561                          LM_SELECTITEM, MPFROMSHORT(0), MPFROMSHORT(TRUE));
     562        xfree(pszDisplayStr, pszSrcFile, __LINE__);
    563563      }
    564564    }
     
    683683
    684684        *filename = 0;
    685         if (insert_filename(hwnd, filename, 2, FALSE) && *filename) {
    686           BldQuotedFileName(szfilename, filename);
     685        if (insert_filename(hwnd, filename, 2, FALSE) && *filename) {
     686          BldQuotedFileName(szfilename, filename);
    687687          strcat(szfilename, " %a");
    688688          WinSetDlgItemText(hwnd, ASS_CL, szfilename);
     
    694694      {
    695695        ASSOC temp;
    696         CHAR dummy[34];
    697         PSZ pszWorkBuf;
    698         replace = FALSE;
    699 
    700         memset(&temp, 0, sizeof(ASSOC));
    701         temp.pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
    702         if (!temp.pszCmdLine)
    703           break; //already complained
     696        CHAR dummy[34];
     697        PSZ pszWorkBuf;
     698        replace = FALSE;
     699
     700        memset(&temp, 0, sizeof(ASSOC));
     701        temp.pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
     702        if (!temp.pszCmdLine)
     703          break; //already complained
    704704
    705705        {
     
    712712                                          LM_SELECTITEM,
    713713                                          MPFROMSHORT(0), MPFROMSHORT(TRUE));
    714         }
    715         pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__);
    716         if (!pszWorkBuf) {
    717           free(temp.pszCmdLine);
    718           break; //already complained
    719         }
     714        }
     715        pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__);
     716        if (!pszWorkBuf) {
     717          free(temp.pszCmdLine);
     718          break; //already complained
     719        }
    720720        WinQueryDlgItemText(hwnd, ASS_MASK, sizeof(temp.mask), temp.mask);
    721         WinQueryDlgItemText(hwnd, ASS_CL, MaxComLineStrg, temp.pszCmdLine);
    722         if (strcmp(temp.pszCmdLine, "<>")) {
    723           NormalizeCmdLine(pszWorkBuf, temp.pszCmdLine);
    724           memcpy(temp.pszCmdLine, pszWorkBuf, strlen(pszWorkBuf) + 1);
    725         }
    726         free(pszWorkBuf);
     721        WinQueryDlgItemText(hwnd, ASS_CL, MaxComLineStrg, temp.pszCmdLine);
     722        if (strcmp(temp.pszCmdLine, "<>")) {
     723          NormalizeCmdLine(pszWorkBuf, temp.pszCmdLine);
     724          memcpy(temp.pszCmdLine, pszWorkBuf, strlen(pszWorkBuf) + 1);
     725        }
     726        free(pszWorkBuf);
    727727        WinQueryDlgItemText(hwnd, ASS_SIG, sizeof(temp.sig), temp.sig);
    728728        rstrip(temp.sig);
     
    748748          temp.flags |= DIEAFTER;
    749749        if (WinQueryButtonCheckstate(hwnd, ASS_PROMPT))
    750           temp.flags |= PROMPT;
    751         if (fCancelAction){
    752           fCancelAction = FALSE;
    753           free(temp.pszCmdLine);
    754           break;
    755         }
    756         else
     750          temp.flags |= PROMPT;
     751        if (fCancelAction){
     752          fCancelAction = FALSE;
     753          free(temp.pszCmdLine);
     754          break;
     755        }
     756        else
    757757        info = add_association(&temp);
    758758        if (!info)
    759759          WinDismissDlg(hwnd, 1);       /* Runtime_Error(pszSrcFile, __LINE__, "add_association"); */
    760         else {
    761           display_associations(hwnd, &temp, info);
     760        else {
     761          display_associations(hwnd, &temp, info);
    762762          save_associations();
    763         }
    764         free(temp.pszCmdLine);
     763        }
     764        free(temp.pszCmdLine);
    765765      }
    766766      WinDismissDlg(hwnd, 1);
     
    780780      {
    781781        ASSOC temp;
    782         CHAR dummy[34];
    783         PSZ pszWorkBuf;
    784         replace = FALSE;
    785 
    786         memset(&temp, 0, sizeof(ASSOC));
    787         temp.pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
    788         if (!temp.pszCmdLine)
    789           break; //already complained
    790         pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__);
    791         if (!pszWorkBuf) {
    792           free(temp.pszCmdLine);
    793           break; //already complained
    794         }
    795         WinQueryDlgItemText(hwnd, ASS_MASK, sizeof(temp.mask), temp.mask);
    796         WinQueryDlgItemText(hwnd, ASS_CL, MaxComLineStrg, temp.pszCmdLine);
    797         if (strcmp(temp.pszCmdLine, "<>")) {
    798           NormalizeCmdLine(pszWorkBuf, temp.pszCmdLine);
    799           memcpy(temp.pszCmdLine, pszWorkBuf, strlen(pszWorkBuf) + 1);
    800         }
    801         free(pszWorkBuf);
     782        CHAR dummy[34];
     783        PSZ pszWorkBuf;
     784        replace = FALSE;
     785
     786        memset(&temp, 0, sizeof(ASSOC));
     787        temp.pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
     788        if (!temp.pszCmdLine)
     789          break; //already complained
     790        pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__);
     791        if (!pszWorkBuf) {
     792          free(temp.pszCmdLine);
     793          break; //already complained
     794        }
     795        WinQueryDlgItemText(hwnd, ASS_MASK, sizeof(temp.mask), temp.mask);
     796        WinQueryDlgItemText(hwnd, ASS_CL, MaxComLineStrg, temp.pszCmdLine);
     797        if (strcmp(temp.pszCmdLine, "<>")) {
     798          NormalizeCmdLine(pszWorkBuf, temp.pszCmdLine);
     799          memcpy(temp.pszCmdLine, pszWorkBuf, strlen(pszWorkBuf) + 1);
     800        }
     801        free(pszWorkBuf);
    802802        WinQueryDlgItemText(hwnd, ASS_SIG, sizeof(temp.sig), temp.sig);
    803803        rstrip(temp.sig);
     
    823823          temp.flags |= DIEAFTER;
    824824        if (WinQueryButtonCheckstate(hwnd, ASS_PROMPT))
    825           temp.flags |= PROMPT;
    826         if (fCancelAction){
    827           fCancelAction = FALSE;
    828           free(temp.pszCmdLine);
    829           break;
    830         }
    831         else
    832           info = add_association(&temp);
     825          temp.flags |= PROMPT;
     826        if (fCancelAction){
     827          fCancelAction = FALSE;
     828          free(temp.pszCmdLine);
     829          break;
     830        }
     831        else
     832          info = add_association(&temp);
    833833        //Add will fail if mask is not changed
    834834        if (info) {
    835           display_associations(hwnd, &temp, info);
     835          display_associations(hwnd, &temp, info);
    836836          save_associations();
    837837        }
    838         free(temp.pszCmdLine);
     838        free(temp.pszCmdLine);
    839839      }
    840840      break;
     
    843843      {
    844844        ASSOC temp;
    845         CHAR dummy[34];
    846 
    847         memset(&temp, 0, sizeof(ASSOC));
    848         temp.pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
    849         if (!temp.pszCmdLine)
    850           break; //already complained
     845        CHAR dummy[34];
     846
     847        memset(&temp, 0, sizeof(ASSOC));
     848        temp.pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
     849        if (!temp.pszCmdLine)
     850          break; //already complained
    851851        WinQueryDlgItemText(hwnd, ASS_MASK, sizeof(temp.mask), temp.mask);
    852852        WinQueryDlgItemText(hwnd, ASS_SIG, sizeof(temp.sig), temp.sig);
     
    871871          }
    872872          save_associations();
    873         }
    874         free(temp.pszCmdLine);
     873        }
     874        free(temp.pszCmdLine);
    875875      }
    876876
     
    880880      {
    881881        ASSOC temp;
    882         CHAR dummy[34];
    883         PSZ pszWorkBuf;
    884         replace = TRUE;
    885 
    886         memset(&temp, 0, sizeof(ASSOC));
    887         temp.pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
    888         if (!temp.pszCmdLine)
    889           break; //already complained
     882        CHAR dummy[34];
     883        PSZ pszWorkBuf;
     884        replace = TRUE;
     885
     886        memset(&temp, 0, sizeof(ASSOC));
     887        temp.pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
     888        if (!temp.pszCmdLine)
     889          break; //already complained
    890890        y = (SHORT) WinSendDlgItemMsg(hwnd,
    891891                                      ASS_LISTBOX,
    892892                                      LM_QUERYSELECTION,
    893                                       MPFROMSHORT(LIT_CURSOR), MPVOID);
    894         pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__);
    895         if (!pszWorkBuf) {
    896           free(temp.pszCmdLine);
    897           break; //already complained
    898         }
     893                                      MPFROMSHORT(LIT_CURSOR), MPVOID);
     894        pszWorkBuf = xmalloc(MaxComLineStrg, pszSrcFile, __LINE__);
     895        if (!pszWorkBuf) {
     896          free(temp.pszCmdLine);
     897          break; //already complained
     898        }
    899899        WinQueryDlgItemText(hwnd, ASS_MASK, sizeof(temp.mask), temp.mask);
    900         WinQueryDlgItemText(hwnd, ASS_CL, MaxComLineStrg, temp.pszCmdLine);
    901         if (strcmp(temp.pszCmdLine, "<>")) {
    902           NormalizeCmdLine(pszWorkBuf, temp.pszCmdLine);
    903           memcpy(temp.pszCmdLine, pszWorkBuf, strlen(pszWorkBuf) + 1);
    904         }
    905         free(pszWorkBuf);
     900        WinQueryDlgItemText(hwnd, ASS_CL, MaxComLineStrg, temp.pszCmdLine);
     901        if (strcmp(temp.pszCmdLine, "<>")) {
     902          NormalizeCmdLine(pszWorkBuf, temp.pszCmdLine);
     903          memcpy(temp.pszCmdLine, pszWorkBuf, strlen(pszWorkBuf) + 1);
     904        }
     905        free(pszWorkBuf);
    906906        WinQueryDlgItemText(hwnd, ASS_SIG, sizeof(temp.sig), temp.sig);
    907907        rstrip(temp.sig);
     
    927927          temp.flags |= DIEAFTER;
    928928        if (WinQueryButtonCheckstate(hwnd, ASS_PROMPT))
    929           temp.flags |= PROMPT;
    930         if (fCancelAction){
    931           fCancelAction = FALSE;
    932           free(temp.pszCmdLine);
    933           break;
    934         }
    935         else
     929          temp.flags |= PROMPT;
     930        if (fCancelAction){
     931          fCancelAction = FALSE;
     932          free(temp.pszCmdLine);
     933          break;
     934        }
     935        else
    936936          info = add_association(&temp);
    937937        if (info) {
    938           display_associations(hwnd, &temp, info);
     938          display_associations(hwnd, &temp, info);
    939939          save_associations();
    940         }
    941         free(temp.pszCmdLine);
     940        }
     941        free(temp.pszCmdLine);
    942942      }
    943943      {
    944944        ASSOC temp;
    945         CHAR dummy[34];
    946 
    947         temp.pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
    948         if (!temp.pszCmdLine)
    949           break; //already complained
     945        CHAR dummy[34];
     946
     947        temp.pszCmdLine = xmallocz(MaxComLineStrg, pszSrcFile, __LINE__);
     948        if (!temp.pszCmdLine)
     949          break; //already complained
    950950        WinSendDlgItemMsg(hwnd,
    951951                          ASS_LISTBOX,
    952952                          LM_SELECTITEM, MPFROMSHORT(y), MPFROMSHORT(TRUE));
    953         memset(temp.sig, 0, sizeof(temp.sig));
    954         memset(temp.mask, 0, sizeof(temp.mask));
    955         temp.offset = 0;
     953        memset(temp.sig, 0, sizeof(temp.sig));
     954        memset(temp.mask, 0, sizeof(temp.mask));
     955        temp.offset = 0;
    956956        WinQueryDlgItemText(hwnd, ASS_MASK, sizeof(temp.mask), temp.mask);
    957957        WinQueryDlgItemText(hwnd, ASS_SIG, sizeof(temp.sig), temp.sig);
     
    975975          }
    976976          save_associations();
    977         }
    978         free(temp.pszCmdLine);
     977        }
     978        free(temp.pszCmdLine);
    979979      }
    980980      break;
  • trunk/dll/avl.h

    r1220 r1321  
    9090MRESULT EXPENTRY SBoxDlgProc(HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2);
    9191VOID free_arc_type(ARC_TYPE * pat);
     92# ifdef FORTIFY
    9293VOID free_archivers(VOID);
     94#endif
    9395
    9496// Data declarations
  • trunk/dll/copyf.c

    r1222 r1321  
    352352
    353353    CHAR srce[CCHMAXPATHCOMP], dest[CCHMAXPATHCOMP], result[CCHMAXPATHCOMP],
    354       *p;
     354        *p;
    355355
    356356    p = strrchr(newname, '\\');
     
    361361        strcpy(srce, p + 1);
    362362        DosError(FERR_DISABLEHARDERR);
    363         if (!DosEditName(1L, srce, dest, result, (ULONG) sizeof(result))) {
     363        if (!DosEditName(1L, srce, dest, (PBYTE)result, (ULONG)sizeof(result))) {
    364364          p = strrchr(newname, '\\');
    365365          p++;
  • trunk/dll/dirs.c

    r1206 r1321  
    4747APIRET save_dir(CHAR * curdir)
    4848{
    49 
    5049  APIRET ret;
    5150  ULONG curdirlen, curdrive, drivemap;
     
    5453  ret = DosQCurDisk(&curdrive, &drivemap);
    5554  curdirlen = CCHMAXPATH - 4;           /* NOTE!!!!!!!!! */
    56   ret += DosQCurDir(curdrive, &curdir[3], &curdirlen);
     55  ret += DosQCurDir(curdrive, (PBYTE)&curdir[3], &curdirlen);
    5756  *curdir = (CHAR) ('@' + (INT) curdrive);
    5857  curdir[1] = ':';
  • trunk/dll/dirsize.c

    r1222 r1321  
    10201020        if (pState->working) {
    10211021          pState->dying = TRUE;
    1022           pState->chStopFlag = (BYTE)0xff;
     1022          pState->chStopFlag = (CHAR)0xff;
    10231023          DosBeep(1000, 100);           // Complain?
    10241024        }
     
    10331033    pState = INSTDATA(hwnd);
    10341034    if (pState)
    1035       pState->chStopFlag = (BYTE)0xff;
     1035      pState->chStopFlag = (CHAR)0xff;
    10361036    DosSleep(1);
    10371037    break;
     
    10411041    EmptyCnr(hwnd);
    10421042    if (pState) {
    1043       pState->chStopFlag = (BYTE)0xff;
     1043      pState->chStopFlag = (CHAR)0xff;
    10441044      if (pState->hptr)
    10451045        WinDestroyPointer(pState->hptr);
  • trunk/dll/fm3res.rc

    r1289 r1321  
    724724  "{",         IDM_APPENDTOCLIPFILENAME, SHIFT,ALT
    725725  "[",         IDM_SAVETOCLIP,        CONTROL
    726   "[",         IDM_SAVETOCLIPFILENAME ALT
     726  "[",         IDM_SAVETOCLIPFILENAME, ALT
    727727  VK_F1,       IDM_HELP,              VIRTUALKEY
    728728  VK_F3,       SC_CLOSE,              SYSCOMMAND,VIRTUALKEY
  • trunk/dll/inis.c

    r1224 r1321  
    207207
    208208          PVOID pDataK, pData;
    209           PBYTE pCurrentK;
     209          PSZ pCurrentK;
    210210          ULONG ulSize = 0L;
    211211
     
    213213            if (!*inirec->key) {
    214214              if (inirec->confirm &&
    215                   PrfQueryProfileSize(hiniFrom, (PSZ) ((*inirec->app2) ?
    216                                                     inirec->app2 : inirec->
    217                                                     app), NULL,
    218                                       (PULONG) & ulSize) && ulSize) {
     215                  PrfQueryProfileSize(hiniFrom,
     216                                      (PSZ)((*inirec->app2) ?
     217                                        inirec->app2 : inirec-> app),
     218                                      NULL,
     219                                      &ulSize)
     220                  && ulSize) {
    219221                if (saymsg
    220222                    (MB_YESNOCANCEL, HWND_DESKTOP,
     
    239241                      if (PrfQueryProfileSize(hiniTo, inirec->app,
    240242                                              pCurrentK,
    241                                               (PULONG) & ulSize) && ulSize) {
     243                                              (PULONG)&ulSize) && ulSize) {
    242244                        pData = xmalloc(ulSize, pszSrcFile, __LINE__);
    243245                        if (pData) {
     
    370372  HINI new;
    371373  PVOID pDataA, pDataK, pData;
    372   PBYTE pCurrentA, pCurrentK;
     374  PSZ pCurrentA, pCurrentK;
    373375  ULONG ulSize;
    374376  PRFPROFILE cprfp;
  • trunk/dll/mainwnd.c

    r1318 r1321  
    29302930  if (!pszStateName || !*pszStateName) {
    29312931    Runtime_Error(pszSrcFile, __LINE__, "no data");
    2932       return -1;
     2932    return -1;
    29332933  }
    29342934  if (strlen(pszStateName) > sizeof(szPrefix) - 2) {
     
    65436543
    65446544  case WM_DESTROY:
     6545#   ifdef FORTIFY
     6546    DbgMsg(pszSrcFile, __LINE__, "WM_DESTROY hwnd %p TID %u", hwnd, GetTidForThread()); // 22 Jul 08 SHL fixme
     6547#   endif
    65456548    hwndMain = (HWND) 0;
    65466549    if (!PostMsg((HWND) 0, WM_QUIT, MPVOID, MPVOID))
  • trunk/dll/srchpath.c

    r1241 r1321  
    4848    rc = DosSearchPath(SEARCH_IGNORENETERRS |SEARCH_ENVIRONMENT |
    4949                       SEARCH_CUR_DIRECTORY,"PATH",
    50                        appname, fbuf, CCHMAXPATH - 1);
     50                       appname, (PBYTE)fbuf, CCHMAXPATH - 1);
    5151      if (rc != 0) {
    5252        if (rc != 2){
     
    5757        else {
    5858        rc = DosSearchPath(0, "UTILS;..\\FM2Utils",
    59                            appname, fbuf, CCHMAXPATH - 1);
     59                           appname, (PBYTE)fbuf, CCHMAXPATH - 1);
    6060            if (rc != 0 && rc != 2){
    6161              Dos_Error(MB_ENTER, rc, HWND_DESKTOP, pszSrcFile, __LINE__,
     
    121121  if (DosSearchPath(SEARCH_IGNORENETERRS | SEARCH_ENVIRONMENT |
    122122                    SEARCH_CUR_DIRECTORY,
    123                     pathvar, filename, fbuf, CCHMAXPATH - 1))
     123                    pathvar, filename, (PBYTE)fbuf, CCHMAXPATH - 1))
    124124    *fbuf = 0;
    125125  return fbuf;
  • trunk/dll/systemf.c

    r1274 r1321  
    11021102      sdata.PgmName = pszPgm;
    11031103      if (*pszArgs)
    1104         sdata.PgmInputs = pszArgs;
     1104        sdata.PgmInputs = (PBYTE)pszArgs;
    11051105      if (useTermQ)
    1106         sdata.TermQ = szTermQName;
    1107       sdata.Environment = pszEnvironment;
     1106        sdata.TermQ = (PBYTE)szTermQName;
     1107      sdata.Environment = (PBYTE)pszEnvironment;
    11081108      sdata.InheritOpt = SSF_INHERTOPT_PARENT;
    11091109      sdata.SessionType = ulAppType;
  • trunk/dll/walkem.c

    r1228 r1321  
    11171117        APIRET rc;
    11181118
    1119         rc = DosQCurDir(toupper(*szBuffer) - '@', &szBuff[3], &ulDirLen);
     1119        rc = DosQCurDir(toupper(*szBuffer) - '@', (PBYTE)&szBuff[3], &ulDirLen);
    11201120        if (!rc) {
    11211121          strcpy(wa->szCurrentPath, "C:\\");
     
    15151515        APIRET rc;
    15161516
    1517         rc = DosQCurDir(toupper(*szBuffer) - '@', &szBuff[3], &ulDirLen);
     1517        rc = DosQCurDir(toupper(*szBuffer) - '@', (PBYTE)&szBuff[3], &ulDirLen);
    15181518        if (!rc) {
    15191519          strcpy(wa->szCurrentPath1, "C:\\");
     
    15801580        APIRET rc;
    15811581
    1582         rc = DosQCurDir(toupper(*szBuffer) - '@', &szBuff[3], &ulDirLen);
     1582        rc = DosQCurDir(toupper(*szBuffer) - '@', (PBYTE)&szBuff[3], &ulDirLen);
    15831583        if (!rc) {
    15841584          strcpy(wa->szCurrentPath2, "C:\\");
  • trunk/dll/walkem.h

    r1228 r1321  
    6464
    6565#ifdef FORTIFY
     66VOID free_ldir(VOID);
    6667VOID free_setups(VOID);
    6768#endif
Note: See TracChangeset for help on using the changeset viewer.