Changeset 360


Ignore:
Timestamp:
Jun 18, 2009, 8:55:46 PM (16 years ago)
Author:
RBRi
Message:

warning fixes

Location:
trunk/hlpmgr
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/hlpmgr/globalfilelist.h

    r26 r360  
    1313typedef TOpenFileEntry* TPOpenFileEntry;
    1414
    15 typedef struct 
     15typedef struct
    1616{
    1717  TSubAllocatedSharedMemory FMem;
     
    2424void CloseGlobalFilelist( TGlobalFilelist* pList );
    2525
    26 HWND FindFileInGlobalFilelist( TGlobalFilelist* pList,
    27                                char* FilePath );
     26HWND FindFileInGlobalFilelist( TGlobalFilelist* pList, char* FilePath );
    2827
    2928#endif
     29
  • trunk/hlpmgr/helpinstance.c

    r26 r360  
    1717  if ( ! pHelpInstance -> FViewerStarted )
    1818  {
    19     // get focus frame 
     19    // get focus frame
    2020    FocusFrame = GetTopLevelWindow( WinQueryFocus( HWND_DESKTOP ) );
    2121    // associate viewer with that.
     
    7777                   mp2 );
    7878  if ( ok )
    79     LogEvent( "  Posted OK" ); 
     79    LogEvent( "  Posted OK" );
    8080  else
    8181    LogEvent( "  WinPostMsg failed" );
     
    8686//--------------------------------------------------------------------------------
    8787void PostQueuedViewerMessages( TPHelpInstance pHelpInstance )
    88 { 
     88{
    8989  int i;
    9090  TQueuedViewerMessage ViewerMessage;
     
    119119//--------------------------------------------------------------------------------
    120120
    121 // Add the given window to the list of associated 
     121// Add the given window to the list of associated
    122122// windows for this help instance
    123123//--------------------------------------------------------------------------------
     
    129129            pHelpInstance );
    130130
    131   if ( IsWindowAssociated( pHelpInstance, hwnd ) ) 
    132   { 
     131  if ( IsWindowAssociated( pHelpInstance, hwnd ) )
     132  {
    133133    LogEvent( "Already associated" );
    134134    return;
     
    151151
    152152  // see if it will fit.
    153   if (    pHelpInstance -> FNumApplicationWindows 
     153  if (    pHelpInstance -> FNumApplicationWindows
    154154       >= pHelpInstance -> FMaxApplicationWindows )
    155155  {
     
    160160    else
    161161      // double space
    162       pHelpInstance -> FMaxApplicationWindows *= 2; 
     162      pHelpInstance -> FMaxApplicationWindows *= 2;
    163163
    164164    LogEvent( "AssociateWIndow: allocating list space to %d",
     
    166166
    167167    // reallocate memory.
    168     pHelpInstance -> FApplicationWindows 
    169       = (HWND*) realloc( pHelpInstance -> FApplicationWindows, 
    170                          pHelpInstance -> FMaxApplicationWindows 
     168    pHelpInstance -> FApplicationWindows
     169      = (HWND*) realloc( pHelpInstance -> FApplicationWindows,
     170                         pHelpInstance -> FMaxApplicationWindows
    171171                         * sizeof( HWND ) );
    172172  }
    173  
     173
    174174  pHelpInstance ->
    175175    FApplicationWindows[ pHelpInstance -> FNumApplicationWindows ]
     
    180180  LogEvent( "AssociateWindow: Now have %d windows associated",
    181181            pHelpInstance -> FNumApplicationWindows );
    182 } 
    183 
    184 // Removes the given window from the list of associated 
     182}
     183
     184// Removes the given window from the list of associated
    185185// windows for this help instance (if present)
    186186//--------------------------------------------------------------------------------
     
    199199      j = i;
    200200      while( j < pHelpInstance -> FNumApplicationWindows - 1 )
    201       { 
     201      {
    202202        pHelpInstance -> FApplicationWindows[ j ]
    203203          = pHelpInstance -> FApplicationWindows[ j + 1 ];
     
    245245  ulMagicNumber = WinQueryWindowULong( hwnd, QWL_HELPINSTANCEMAGICNUMBER );
    246246
    247   if ( ulMagicNumber != HELPINSTANCEMAGICNUMBER ) 
     247  if ( ulMagicNumber != HELPINSTANCEMAGICNUMBER )
    248248    return NULL;
    249249
     
    263263    // free copy of resource
    264264    FreeHelpTable( & ( pHelpInstance -> pHelpTable ) );
    265 }   
     265}
    266266
    267267//--------------------------------------------------------------------------------
     
    276276  pHelpInstance -> FNumApplicationWindows = 0;
    277277  pHelpInstance -> FMaxApplicationWindows = 0;
    278   pHelpInstance -> FApplicationWindows = NULL; 
    279    
    280   pHelpInstance -> FActiveWindow = NULLHANDLE; 
     278  pHelpInstance -> FApplicationWindows = NULL;
     279
     280  pHelpInstance -> FActiveWindow = NULLHANDLE;
    281281
    282282  return pHelpInstance;
    283283}
    284 
     284
  • trunk/hlpmgr/misc.c

    r26 r360  
    55#include "misc.h"
    66
    7 USHORT APIENTRY NHMSearchMIndex( PVOID pInstance, 
    8                                  HWND hwnd, 
     7USHORT APIENTRY NHMSearchMIndex( PVOID pInstance,
     8                                 HWND hwnd,
    99                                 PSZ pchText )
    1010{
     
    1313}
    1414
    15 // e.g.   p = DBMstrtok2(EnvStr, "; \0");   
     15// e.g.   p = DBMstrtok2(EnvStr, "; \0");
    1616// probably just use strtok unless you really want to support dbcs
    1717PCH APIENTRY NHMDBMstrtok2( PCH s1, PCH s2 )
     
    2828}
    2929
    30 // e.g. 
    31 // pCountry = (PVOID)WinSendMsg ( _hwndMIndexInstance, 
    32 //                                HM_QPSTRUCT, 
    33 //                                MPFROMSHORT(STRUCT_COUNTRY_INFO), 
     30// e.g.
     31// pCountry = (PVOID)WinSendMsg ( _hwndMIndexInstance,
     32//                                HM_QPSTRUCT,
     33//                                MPFROMSHORT(STRUCT_COUNTRY_INFO),
    3434//                                NULL );
    3535// if ( MscStriCmp( TabText.pString, szBuf1, pCountry ) )
     
    4444
    4545// Attempt to see if we can get OpenChat running (not with help tho)
    46 BOOL APIENTRY NHM32SetHelpDatabase(PINSTANCE pInstance, PSZ DatabaseName, USHORT usObtimizeType) 
     46BOOL APIENTRY NHM32SetHelpDatabase(PINSTANCE pInstance, PSZ DatabaseName, USHORT usObtimizeType)
    4747{
    4848  // Jolly good, whatever you say...
     
    7171  return TRUE;
    7272}
    73 
     73
  • trunk/hlpmgr/sharedmemory.c

    r26 r360  
    1717  char FullName[ 260 ];
    1818
    19   pSharedMemory -> FFirst = TRUE; 
     19  pSharedMemory -> FFirst = TRUE;
    2020
    2121  strcpy( FullName, "\\SHAREMEM\\" );
     
    3131  {
    3232    LogEvent( "  Unable to create shared mem: %d", rc );
    33     if ( rc == ERROR_ALREADY_EXISTS ) 
     33    if ( rc == ERROR_ALREADY_EXISTS )
    3434    {
    3535      LogEvent( "  - Already exists, open" );
     
    5555  while( TRUE )
    5656  {
    57     rc = DosOpenMutexSem( pszName, 
    58                           phmtx ); 
     57    rc = DosOpenMutexSem( pszName,
     58                          phmtx );
    5959
    6060    if ( rc != ERROR_SEM_NOT_FOUND )
     
    6262      break;
    6363
    64     rc = DosCreateMutexSem( pszName, 
     64    rc = DosCreateMutexSem( pszName,
    6565                            phmtx,
    66                             0, 
    67                             FALSE ); 
     66                            0,
     67                            FALSE );
    6868    if ( rc != ERROR_DUPLICATE_NAME )
    6969      // ok, or some error
     
    9191                                    ULONG Size,
    9292                                    ULONG ReserveSize, // size to reserve at start of memory
    93                                     TSubAllocatedSharedMemory* pSharedMemory ) 
     93                                    TSubAllocatedSharedMemory* pSharedMemory )
    9494{
    9595  APIRET rc;
     
    113113  LogEvent( "  semaphore name: %s", SemaphoreName );
    114114
    115   rc = OpenOrCreateMutex( SemaphoreName, 
     115  rc = OpenOrCreateMutex( SemaphoreName,
    116116                          & StartupSemaphore );
    117117  if ( rc != 0 )
     
    151151  }
    152152
    153   pSharedMemory -> FAllocationArea = 
     153  pSharedMemory -> FAllocationArea =
    154154    (PBYTE) pSharedMemory -> FMem.FPointer
    155155    + ActualReserveSize;
     
    207207                    void** p )
    208208{
    209   APIRET rc; 
     209  APIRET rc;
    210210  PULONG pSize;
    211211  ULONG Size;
     
    221221
    222222  *p = NULL;
    223 }   
     223}
    224224
    225225void ReleaseSubAllocatedSharedMemory( TSubAllocatedSharedMemory* pSharedMemory )
     
    232232  ReleaseSharedMemory( & pSharedMemory -> FMem );
    233233}
    234 
     234
  • trunk/hlpmgr/sharedmemory.h

    r26 r360  
    77// in the memory.
    88
    9 typedef struct 
     9typedef struct
    1010{
    1111  void* FPointer;
     
    2525// Otherwise the Data property should not be used.
    2626
    27 typedef struct 
     27typedef struct
    2828{
    2929  TSharedMemory FMem;
    30   void* FAllocationArea; 
     30  void* FAllocationArea;
    3131} TSubAllocatedSharedMemory;
    3232
     
    3434                                    ULONG Size,
    3535                                    ULONG ReserveSize, // size to reserve at start of memory
    36                                     TSubAllocatedSharedMemory* pSharedMemory ); 
     36                                    TSubAllocatedSharedMemory* pSharedMemory );
    3737
    3838// suballocate space of the given size
     
    5151
    5252#endif
     53
  • trunk/hlpmgr/utility.c

    r26 r360  
    1 #include <stdlib.h> 
     1#include <stdlib.h>
    22#include <string.h>
    33
     
    88{
    99  ULONG buffer;
    10   DosQuerySysInfo( QSV_BOOT_DRIVE, 
     10  DosQuerySysInfo( QSV_BOOT_DRIVE,
    1111                   QSV_BOOT_DRIVE,
    1212                   & buffer,
     
    4040  while( TRUE )
    4141  {
    42     parent = WinQueryWindow( hwnd, QW_PARENT );   
     42    parent = WinQueryWindow( hwnd, QW_PARENT );
    4343    if (    parent == hDesktopWindow
    4444         || parent == NULLHANDLE )
    4545      // this is a frame (top level) window
    4646      break;
    47     hwnd = parent; 
     47    hwnd = parent;
    4848  }
    4949
     
    6161  LogEvent( "IsStandardWindowClass" );
    6262
    63   if ( WinQueryClassName( hwnd, 
     63  if ( WinQueryClassName( hwnd,
    6464                          sizeof( szClassName ),
    6565                          szClassName ) == 0 )
     
    8787                  char* source )
    8888{
    89   if ( *dest != NULL ) 
     89  if ( *dest != NULL )
    9090  {
    9191    free( *dest );
    9292    *dest = NULL;
    9393  }
    94  
    95   if ( source == NULL ) 
     94
     95  if ( source == NULL )
    9696    return;
    9797
     
    9999  strcpy( *dest, source );
    100100}
    101 
     101
  • trunk/hlpmgr/utility.h

    r26 r360  
    3232BOOL IsStandardWindowClass( HWND hwnd, PSZ ClassID );
    3333
    34 // make a memory copy of the given source string into 
     34// make a memory copy of the given source string into
    3535// dest. Accepts NULLs for either parameter.
    3636void StoreString( char** dest,
     
    3838
    3939#endif
     40
Note: See TracChangeset for help on using the changeset viewer.