Lines Matching refs:length

55 static BOOL FSi_IsValidTransferRegion(const void *buffer, s32 length)  in FSi_IsValidTransferRegion()  argument
66 else if (length < 0) in FSi_IsValidTransferRegion()
68 OS_TWarning("specified transfer size is minus. (%d)\n", length); in FSi_IsValidTransferRegion()
77 if (length > mainmem_size) in FSi_IsValidTransferRegion()
79 OS_TWarning("specified transfer size is over mainmemory-size. (%d)\n", length); in FSi_IsValidTransferRegion()
169 int length = STD_GetStringLength(str); in FSi_TrimSjisTrailingSlash() local
170 int lastpos = FSi_DecrementSjisPosition(str, length); in FSi_TrimSjisTrailingSlash()
173 length = lastpos; in FSi_TrimSjisTrailingSlash()
174 str[length] = '\0'; in FSi_TrimSjisTrailingSlash()
176 return length; in FSi_TrimSjisTrailingSlash()
629 int length = STD_GetStringLength(tmppath); in FSi_ComplementDirectory() local
630 if (length > 0) in FSi_ComplementDirectory()
635 length = FSi_TrimSjisTrailingSlash(tmppath); in FSi_ComplementDirectory()
637 length = FSi_DecrementSjisPositionToSlash(tmppath, length); in FSi_ComplementDirectory()
639 for (pos = length; pos >= 0;) in FSi_ComplementDirectory()
675 if (pos >= length) in FSi_ComplementDirectory()
822 int length = FSi_TrimSjisTrailingSlash(tmppath); in FS_DeleteDirectoryAuto() local
829 tmppath[length + pos] = '\0'; in FS_DeleteDirectoryAuto()
834 pos = FSi_DecrementSjisPositionToSlash(&tmppath[length], pos); in FS_DeleteDirectoryAuto()
849 tmppath[length + pos] = '/'; in FS_DeleteDirectoryAuto()
853 (void)STD_CopyString(&tmppath[length + pos + 1], info->longname); in FS_DeleteDirectoryAuto()
1127 FSResult FS_SetFileLength(FSFile *file, u32 length) in FS_SetFileLength() argument
1136 arg->length = length; in FS_SetFileLength()
1154 BOOL FS_GetPathName(FSFile *file, char *buffer, u32 length) in FS_GetPathName() argument
1165 arg->length = length; in FS_GetPathName()
1451 arg->length = 0; in FS_GetFileLength()
1454 retval = arg->length; in FS_GetFileLength()
1527 s32 FS_ReadFile(FSFile *file, void *buffer, s32 length) in FS_ReadFile() argument
1531 SDK_ASSERT(FSi_IsValidTransferRegion(buffer, length)); in FS_ReadFile()
1539 arg->length = (u32)length; in FS_ReadFile()
1542 length = (s32)arg->length; in FS_ReadFile()
1547 length = -1; //If not read at all in FS_ReadFile()
1549 length = (s32)arg->length; //If reading was tried, a value higher than -1 is entered in FS_ReadFile()
1553 return length; in FS_ReadFile()
1567 s32 FS_ReadFileAsync(FSFile *file, void *buffer, s32 length) in FS_ReadFileAsync() argument
1571 SDK_ASSERT(FSi_IsValidTransferRegion(buffer, length)); in FS_ReadFileAsync()
1579 (pos + length > end)) in FS_ReadFileAsync()
1581 length = (s32)(end - pos); in FS_ReadFileAsync()
1588 arg->length = (u32)length; in FS_ReadFileAsync()
1591 return length; in FS_ReadFileAsync()
1605 s32 FS_WriteFile(FSFile *file, const void *buffer, s32 length) in FS_WriteFile() argument
1609 SDK_ASSERT(FSi_IsValidTransferRegion(buffer, length)); in FS_WriteFile()
1617 arg->length = (u32)length; in FS_WriteFile()
1620 length = (s32)arg->length; in FS_WriteFile()
1625 length = -1; //If not written at all in FS_WriteFile()
1627 length = (s32)arg->length; //If writing was tried, a value higher than -1 is entered in FS_WriteFile()
1631 return length; in FS_WriteFile()
1645 s32 FS_WriteFileAsync(FSFile *file, const void *buffer, s32 length) in FS_WriteFileAsync() argument
1648 SDK_ASSERT(FSi_IsValidTransferRegion(buffer, length)); in FS_WriteFileAsync()
1656 (pos + length > end)) in FS_WriteFileAsync()
1658 length = (s32)(end - pos); in FS_WriteFileAsync()
1665 arg->length = (u32)length; in FS_WriteFileAsync()
1668 return length; in FS_WriteFileAsync()