Beispiel #1
0
static VOID DosGetFile(BYTE FAR * lpszPath, BYTE FAR * lpszDosFileName)
{
  BYTE szLclName[FNAME_SIZE + 1];
  BYTE szLclExt[FEXT_SIZE + 1];

  ParseDosName(lpszPath, (COUNT *) 0, (BYTE *) 0,
               szLclName, szLclExt, FALSE);
  SpacePad(szLclName, FNAME_SIZE);
  SpacePad(szLclExt, FEXT_SIZE);
  fbcopy((BYTE FAR *) szLclName, lpszDosFileName, FNAME_SIZE);
  fbcopy((BYTE FAR *) szLclExt, &lpszDosFileName[FNAME_SIZE], FEXT_SIZE);
}
Beispiel #2
0
/*  LineToCont - move to the given position in the file, grab the line and put
 *               it in the correct line of hWnd->pContent
 *
 *  arguments:
 *      hWnd        window of interest
 *      lineNum     line to fetch
 *
 *  return value:
 *      none
 */
VOID PASCAL INTERNAL LineToCont ( HW hWnd, INT lineNum )
{
    INT width = TWINWIDTH ( hWnd );
    CHAR        line [ MAXLINELEN ];
    INT ContentLine;

    if ( ( lineNum > FT->llof ) && ( FT->llof != -1 ) )
        return;

    if ( fSkipToLine ( hWnd, lineNum ) ) {
        /* +1 for the trailing null char */
        if ( fgetl ( line, width + 1, FT->fhRead ) ) {
            FT->cur++;
            if ( LINETOPAGE (FT->cur) >= FT->cPages && !GrabNextPage ( hWnd ) )
                FT->llof = FT->cur;
            }
        else
            FT->llof = FT->cur;
        if ( !strcmpis ( strEOH, line ) )
            *line = 0;
        }
    SpacePad ( line, MAXLINELEN - 1 );
    ContentLine = lineNum - FT->top;
    if ( ( ContentLine >= 0 ) && ( ContentLine <= TWINHEIGHT ( hWnd ) - 1 ) )
        Move ( ( LPSTR ) line, ( LPSTR ) hWnd->pContent +
            ( ContentLine *  width * sizeof ( CHAR ) ), width );
    return;
}