Spelling: fix spelling of files in src/common

This commit is contained in:
Marius Messerschmidt
2023-11-18 15:26:07 +01:00
parent 9b2c59936f
commit 29d93d5c67
6 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -203,7 +203,7 @@ void ffParseFormatString(FFstrbuf* buffer, const FFstrbuf* formatstr, uint32_t n
}
// fastforward to the end of the if without printing the in between
i = ffStrbufNextIndexS(formatstr, i, "{?}") + 2; // 2 is the length of "{?}" - 1 because the loop will increament it again directly after continue
i = ffStrbufNextIndexS(formatstr, i, "{?}") + 2; // 2 is the length of "{?}" - 1 because the loop will increment it again directly after continue
continue;
}
@@ -229,7 +229,7 @@ void ffParseFormatString(FFstrbuf* buffer, const FFstrbuf* formatstr, uint32_t n
}
// fastforward to the end of the if without printing the in between
i = ffStrbufNextIndexS(formatstr, i, "{/}") + 2; // 2 is the length of "{/}" - 1 because the loop will increament it again directly after continue
i = ffStrbufNextIndexS(formatstr, i, "{/}") + 2; // 2 is the length of "{/}" - 1 because the loop will increment it again directly after continue
continue;
}
+3 -3
View File
@@ -49,11 +49,11 @@ static inline ssize_t ffReadFDData(FFNativeFD fd, size_t dataSize, void* data)
#ifndef _WIN32
return read(fd, data, dataSize);
#else
DWORD readed;
if(!ReadFile(fd, data, (DWORD)dataSize, &readed, NULL))
DWORD bytesRead;
if(!ReadFile(fd, data, (DWORD)dataSize, &bytesRead, NULL))
return -1;
return (ssize_t)readed;
return (ssize_t)bytesRead;
#endif
}
+7 -7
View File
@@ -44,7 +44,7 @@ bool ffWriteFileData(const char* fileName, size_t dataSize, const void* data)
bool ffAppendFDBuffer(int fd, FFstrbuf* buffer)
{
ssize_t readed = 0;
ssize_t bytesRead = 0;
struct stat fileInfo;
if(fstat(fd, &fileInfo) != 0)
@@ -54,10 +54,10 @@ bool ffAppendFDBuffer(int fd, FFstrbuf* buffer)
uint32_t free = ffStrbufGetFree(buffer);
while(
(readed = read(fd, buffer->chars + buffer->length, free)) > 0
(bytesRead = read(fd, buffer->chars + buffer->length, free)) > 0
) {
buffer->length += (uint32_t) readed;
if((uint32_t) readed == free)
buffer->length += (uint32_t) bytesRead;
if((uint32_t) bytesRead == free)
ffStrbufEnsureFree(buffer, buffer->allocated - 1); // Doubles capacity every round. -1 for the null byte.
free = ffStrbufGetFree(buffer);
}
@@ -153,14 +153,14 @@ const char* ffGetTerminalResponse(const char* request, const char* format, ...)
}
char buffer[512];
ssize_t readed = read(STDIN_FILENO, buffer, sizeof(buffer) - 1);
ssize_t bytesRead = read(STDIN_FILENO, buffer, sizeof(buffer) - 1);
tcsetattr(STDIN_FILENO, TCSANOW, &oldTerm);
if(readed <= 0)
if(bytesRead <= 0)
return "read(STDIN_FILENO, buffer, sizeof(buffer) - 1) failed";
buffer[readed] = '\0';
buffer[bytesRead] = '\0';
va_list args;
va_start(args, format);
+5 -5
View File
@@ -32,7 +32,7 @@ bool ffWriteFileData(const char* fileName, size_t dataSize, const void* data)
bool ffAppendFDBuffer(HANDLE handle, FFstrbuf* buffer)
{
DWORD readed = 0;
DWORD bytesRead = 0;
LARGE_INTEGER fileSize;
if(!GetFileSizeEx(handle, &fileSize))
@@ -43,11 +43,11 @@ bool ffAppendFDBuffer(HANDLE handle, FFstrbuf* buffer)
bool success;
while(
(success = !!ReadFile(handle, buffer->chars + buffer->length, free, &readed, NULL)) &&
readed > 0
(success = !!ReadFile(handle, buffer->chars + buffer->length, free, &bytesRead, NULL)) &&
bytesRead > 0
) {
buffer->length += (uint32_t) readed;
if((uint32_t) readed == free)
buffer->length += (uint32_t) bytesRead;
if((uint32_t) bytesRead == free)
ffStrbufEnsureFree(buffer, buffer->allocated - 1); // Doubles capacity every round. -1 for the null byte.
free = ffStrbufGetFree(buffer);
}
+1 -1
View File
@@ -6,7 +6,7 @@ void ffPrintLogoAndKey(const char* moduleName, uint8_t moduleIndex, const FFModu
{
ffLogoPrintLine();
//This is used by --set-keyless, in this case we wan't neither the module name nor the separator
//This is used by --set-keyless, in this case we want neither the module name nor the separator
if(moduleName == NULL)
return;
+1 -1
View File
@@ -91,7 +91,7 @@ bool ffParsePropLines(const char* lines, const char* start, FFstrbuf* buffer)
// The following functions return true if the file was found, independently if start was found
// Buffers which already contain content are not overwritten
// The last occurence of start in the first file will be the one used
// The last occurrence of start in the first file will be the one used
bool ffParsePropFileValues(const char* filename, uint32_t numQueries, FFpropquery* queries)
{