@@ -605,7 +605,7 @@ qboolean FS_FCheckFlags (file_t *file, int flags)
605
605
==================
606
606
FS_FLength
607
607
608
- Gets a file lenght
608
+ Gets a file length
609
609
==================
610
610
*/
611
611
off_t FS_FLength (file_t * file )
@@ -624,7 +624,7 @@ Reads data from a file into the array.
624
624
*/
625
625
off_t FS_FRead (file_t * file , const void * buffer , size_t size )
626
626
{
627
- off_t readlenght , readresult ;
627
+ off_t readlength , readresult ;
628
628
off_t completed , remaining ;
629
629
byte * buf ;
630
630
@@ -639,34 +639,34 @@ off_t FS_FRead (file_t *file, const void *buffer, size_t size)
639
639
// check cache
640
640
if (file -> buffer .position < file -> buffer .length )
641
641
{
642
- readlenght = file -> buffer .length - file -> buffer .position ;
643
- if (readlenght > remaining )
644
- readlenght = remaining ;
642
+ readlength = file -> buffer .length - file -> buffer .position ;
643
+ if (readlength > remaining )
644
+ readlength = remaining ;
645
645
646
- memcpy (buf , & file -> buffer .ptr [file -> buffer .position ], readlenght );
647
- file -> buffer .position += readlenght ;
646
+ memcpy (buf , & file -> buffer .ptr [file -> buffer .position ], readlength );
647
+ file -> buffer .position += readlength ;
648
648
649
- completed += readlenght ;
650
- remaining -= readlenght ;
649
+ completed += readlength ;
650
+ remaining -= readlength ;
651
651
652
652
if (remaining == 0 )
653
653
return completed ;
654
654
}
655
655
656
- readlenght = file -> length - file -> position ;
657
- if (readlenght == 0 )
656
+ readlength = file -> length - file -> position ;
657
+ if (readlength == 0 )
658
658
return completed ;
659
659
660
660
// read to buffer
661
661
if (remaining > (FS_BUFFER_SIZE >> 1 ))
662
662
{
663
- if (readlenght > remaining )
664
- readlenght = remaining ;
663
+ if (readlength > remaining )
664
+ readlength = remaining ;
665
665
666
666
#ifdef PSP_FIO
667
- readresult = sceIoRead (file -> handle , & buf [completed ], readlenght );
667
+ readresult = sceIoRead (file -> handle , & buf [completed ], readlength );
668
668
#else
669
- readresult = (off_t )fread (& buf [completed ], 1 , readlenght , file -> handle );
669
+ readresult = (off_t )fread (& buf [completed ], 1 , readlength , file -> handle );
670
670
#endif
671
671
672
672
completed += readresult ;
@@ -678,26 +678,26 @@ off_t FS_FRead (file_t *file, const void *buffer, size_t size)
678
678
}
679
679
else
680
680
{
681
- if (readlenght > FS_BUFFER_SIZE )
682
- readlenght = FS_BUFFER_SIZE ;
681
+ if (readlength > FS_BUFFER_SIZE )
682
+ readlength = FS_BUFFER_SIZE ;
683
683
684
684
#ifdef PSP_FIO
685
- readresult = sceIoRead (file -> handle , file -> buffer .ptr , readlenght );
685
+ readresult = sceIoRead (file -> handle , file -> buffer .ptr , readlength );
686
686
#else
687
- readresult = (off_t )fread (file -> buffer .ptr , 1 , readlenght , file -> handle );
687
+ readresult = (off_t )fread (file -> buffer .ptr , 1 , readlength , file -> handle );
688
688
#endif
689
689
690
690
if (readresult > 0 )
691
691
{
692
- readlenght = (remaining > readresult ) ? readresult : remaining ;
692
+ readlength = (remaining > readresult ) ? readresult : remaining ;
693
693
694
- memcpy (& buf [completed ], file -> buffer .ptr , readlenght );
694
+ memcpy (& buf [completed ], file -> buffer .ptr , readlength );
695
695
696
- completed += readlenght ;
696
+ completed += readlength ;
697
697
file -> position += readresult ;
698
698
699
699
// cache update
700
- file -> buffer .position = readlenght ;
700
+ file -> buffer .position = readlength ;
701
701
file -> buffer .length = readresult ;
702
702
}
703
703
@@ -774,19 +774,19 @@ int FS_FPrintf (file_t *file, const char *format, ...)
774
774
{
775
775
va_list argptr ;
776
776
static char outbuff [MAX_PRINT_MSG ];
777
- int lenght ;
777
+ int length ;
778
778
779
779
if ( !file )
780
780
return 0 ;
781
781
782
782
va_start (argptr , format );
783
- lenght = vsnprintf (outbuff , sizeof (outbuff ), format , argptr );
783
+ length = vsnprintf (outbuff , sizeof (outbuff ), format , argptr );
784
784
va_end (argptr );
785
785
786
- if (lenght >= sizeof (outbuff ))
786
+ if (length >= sizeof (outbuff ))
787
787
return -1 ;
788
788
789
- return FS_FWrite (file , outbuff , lenght );
789
+ return FS_FWrite (file , outbuff , length );
790
790
}
791
791
792
792
/*
0 commit comments