| Last change
 on this file since 71 was             10, checked in by Gregg Young, 8 years ago | 
        
          | 
The changes in these files were made to fix Open Watcom compiler, WRC and wipfc errors and warning. There are several more in the next commit.
 | 
        
          | 
              
Property                 svn:eol-style
 set to                 native | 
        
          | File size:
            1.2 KB | 
      
      
| Rev | Line |  | 
|---|
| [2] | 1 | /*** | 
|---|
|  | 2 | This file belongs to the Gotcha! distribution. | 
|---|
|  | 3 | Copyright (C) 1998-2002 Thorsten Thielen <thth@c2226.de> | 
|---|
|  | 4 |  | 
|---|
|  | 5 | This program is free software; you can redistribute it and/or modify | 
|---|
|  | 6 | it under the terms of the GNU General Public License as published by | 
|---|
|  | 7 | the Free Software Foundation; either version 2 of the License, or | 
|---|
|  | 8 | (at your option) any later version. | 
|---|
|  | 9 |  | 
|---|
|  | 10 | This program is distributed in the hope that it will be useful, | 
|---|
|  | 11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | 
|---|
|  | 12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the | 
|---|
|  | 13 | GNU General Public License for more details. | 
|---|
|  | 14 |  | 
|---|
|  | 15 | You should have received a copy of the GNU General Public License | 
|---|
|  | 16 | along with this program; if not, write to the Free Software | 
|---|
|  | 17 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA | 
|---|
|  | 18 | ***/ | 
|---|
| [10] | 19 | #define INCL_DOS | 
|---|
|  | 20 | #include <os2.h> | 
|---|
| [2] | 21 | #include "rstring.h" | 
|---|
|  | 22 |  | 
|---|
|  | 23 | HMODULE  ResourceString :: hmod = NULLHANDLE; | 
|---|
|  | 24 |  | 
|---|
|  | 25 | ResourceString :: ResourceString (ULONG Id) : psz ("(string load error)") | 
|---|
|  | 26 | { | 
|---|
|  | 27 | SavedId = Id; | 
|---|
|  | 28 |  | 
|---|
|  | 29 | if (DosGetResource (Module(), RT_STRING, Id/16+1, &BlockPointer)) | 
|---|
|  | 30 | return; | 
|---|
|  | 31 |  | 
|---|
|  | 32 | psz = PSZ (BlockPointer) + sizeof(USHORT); | 
|---|
|  | 33 |  | 
|---|
|  | 34 | USHORT Index = USHORT (Id % 16); | 
|---|
|  | 35 | while (Index--) | 
|---|
|  | 36 | { | 
|---|
|  | 37 | psz += * PUCHAR (psz); | 
|---|
|  | 38 | psz ++; | 
|---|
|  | 39 | } | 
|---|
|  | 40 |  | 
|---|
|  | 41 | psz ++; | 
|---|
|  | 42 | } | 
|---|
       
      
  Note:
 See   
TracBrowser
 for help on using the repository browser.