Changeset 1673 for trunk/dll/valid.c


Ignore:
Timestamp:
Dec 30, 2012, 7:51:01 PM (13 years ago)
Author:
Gregg Young
Message:

Update to Doxygen comment style Ticket 55. Also some minor code cleanup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/dll/valid.c

    r1672 r1673  
    9292APIRET MakeFullName(char *pszFileName)
    9393{
    94   /* pszFileName must be CCHMAXPATH long minimum! */
     94  // pszFileName must be CCHMAXPATH long minimum!
    9595
    9696  char szPathName[CCHMAXPATH];
     
    117117    p = (p) ? (pp) ? (p > pp) ? p : pp : p : pp;
    118118  }
    119   if (!p)                               /* name is itself a root */
     119  if (!p)                               // name is itself a root
    120120    p = filename;
    121   else                                  /* skip past backslash */
     121  else                                  // skip past backslash
    122122    p++;
    123123  return p;
     
    220220BOOL IsNewer(char *file1, char *file2)
    221221{
    222   /* return TRUE if file2 is newer than file1 */
     222  // return TRUE if file2 is newer than file1
    223223
    224224  return (TestFDates(file1, file2, NULL, NULL, NULL, NULL) > 0);
     
    319319                        (PFSQBUFFER2) pvBuffer, &clBufferSize);
    320320  if (rc) {
    321     /* can't get any info at all */
     321    // can't get any info at all
    322322    DosFreeMem(pvBuffer);
    323323    DosError(FERR_DISABLEHARDERR);
     
    411411  NonRemovable = 1;                     // Preset as non removable
    412412  DosError(FERR_DISABLEHARDERR);
    413   rc = DosDevIOCtl(hDev, IOCTL_DISK, DSK_BLOCKREMOVABLE, &parmPkt.Cmd,  /* Address of the command-specific argument list. */
    414                    sizeof(parmPkt.Cmd), /* Length, in bytes, of pParams. */
    415                    &clParmBytes,        /* Pointer to the length of parameters. */
    416                    &NonRemovable,       /* Address of the data area. */
    417                    sizeof(NonRemovable),        /* Length, in bytes, of pData. */
    418                    &clDataBytes);       /* Pointer to the length of data. */
     413  rc = DosDevIOCtl(hDev, IOCTL_DISK, DSK_BLOCKREMOVABLE, &parmPkt.Cmd, // Address of the command-specific argument list.
     414                   sizeof(parmPkt.Cmd), // Length, in bytes, of pParams.
     415                   &clParmBytes,        // Pointer to the length of parameters.
     416                   &NonRemovable,       // Address of the data area.
     417                   sizeof(NonRemovable),// Length, in bytes, of pData.
     418                   &clDataBytes);       // Pointer to the length of data.
    419419
    420420  if (!rc && NonRemovable) {
     
    424424    memset(&dataPkt, 0xff, sizeof(dataPkt));
    425425    DosError(FERR_DISABLEHARDERR);
    426     rc = DosDevIOCtl(hDev, IOCTL_DISK, DSK_GETDEVICEPARAMS, &parmPkt.Cmd,       /* Address of the command-specific argument list. */
    427                      sizeof(parmPkt.Cmd),       /* Length, in bytes, of pParams. */
    428                      &clParmBytes,      /* Pointer to the length of parameters. */
    429                      &dataPkt,          /* Address of the data area. */
    430                      sizeof(dataPkt),   /* Length, in bytes, of pData. */
    431                      &clDataBytes);     /* Pointer to the length of data. */
     426    rc = DosDevIOCtl(hDev, IOCTL_DISK, DSK_GETDEVICEPARAMS, &parmPkt.Cmd,// Address of the command-specific argument list.
     427                     sizeof(parmPkt.Cmd),       // Length, in bytes, of pParams.
     428                     &clParmBytes,              // Pointer to the length of parameters.
     429                     &dataPkt,                  // Address of the data area.
     430                     sizeof(dataPkt),           // Length, in bytes, of pData.
     431                     &clDataBytes);             // Pointer to the length of data.
    432432
    433433    if (!rc && (dataPkt.bpb.fsDeviceAttr & BPB_REMOVABLE_MEDIA))
     
    448448BOOL IsFileSame(CHAR * filename1, CHAR * filename2)
    449449{
    450   /* returns: -1 (error), 0 (is a directory), or 1 (is a file) */
     450  // returns: -1 (error), 0 (is a directory), or 1 (is a file)
    451451
    452452  FILESTATUS3L fsa1, fsa2;
     
    492492      return 0;
    493493  }
    494   return -1;                            /* error; doesn't exist or can't read or null filename */
     494  return -1;                            // error; doesn't exist or can't read or null filename
    495495}
    496496
     
    10801080  *objectpath = 0;
    10811081  if (OS2ver[0] > 20 || (OS2ver[0] == 20 && OS2ver[1] >= 30)) {
    1082     /*
     1082    /**
    10831083     * if running under warp, we can get the desktop name
    10841084     * this way...
Note: See TracChangeset for help on using the changeset viewer.