RETVAL CheckFSString(RDWRHandle handle) { char label[8]; char* correct, *p; if (!GetBPBFileSystemString(handle, label)) return ERROR; correct = GetCorrectFSString(handle); if (!correct) return ERROR; if (memcmp(correct, label, 8) != 0) { sprintf(GetMessageBuffer(), "The file system string does not indicate %s\n", correct); strcat(GetMessageBuffer(), "This is generally not an error,\nbut some low level disk " "utilities may not handle this correctly\n"); ReportFileSysWarning(GetMessageBuffer(), 0, &p, 0, FALSE); return FAILED; } else return SUCCESS; }
void MakeBinaryString(THREAD *pstThd,WORD wLength,BYTE xStart) { BYTE xIndex = xStart; WORD wIndex; CONFIG *pCfg = &pstThd->stCfg; if (GetMessageBuffer((PPVOID)&pstThd->pWriteString,wLength)) { for (wIndex = 0;wIndex < wLength;wIndex++) pstThd->pWriteString[wIndex] = xIndex++; pCfg->wWriteStringLength = wLength; } }
void MakeLongString(THREAD *pstThd,WORD wLength,BOOL bAlpha) { BYTE byIndex = '1'; WORD wIndex; CONFIG *pCfg = &pstThd->stCfg; if (GetMessageBuffer((PPVOID)&pstThd->pWriteString,wLength)) { for (wIndex = 0;wIndex < wLength;wIndex++) { pstThd->pWriteString[wIndex] = byIndex; if (bAlpha) { switch (byIndex) { case 'Z': byIndex = 'a'; break; case 'z': byIndex = '0'; break; case '9': byIndex = 'A'; break; default: byIndex++; break; } } else { if (byIndex == '9') byIndex = '0'; else byIndex++; } } pstThd->pWriteString[wIndex] = 0; pCfg->wWriteStringLength = wLength; } }