Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos in comments and plain text files #1921

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/bar-cdn-publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Workflow for Beyond All Reaon, it only motifies BAR infra that a new engine
# Workflow for Beyond All Reason, it only motifies BAR infra that a new engine
# release was published.
name: Publish Engine to BAR CDN
on:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/engine-build.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Engine CI workflow that compiles engine using build-docker-v2 scripts with
# https://namespace.so/ GitHub Actions Runners.
#
# The worklow has multiple layers of caching for ccache compilation objects:
# The workflow has multiple layers of caching for ccache compilation objects:
#
# - Local cache on runner's machine SSD disk, very efficient but prone to
# cache misses when workflow can't be scheduled next to the storage
Expand Down
2 changes: 1 addition & 1 deletion AI/Interfaces/C/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@


################################################################################
### BEGINN: MACROS_AND_FUNCTIONS
### BEGIN: MACROS_AND_FUNCTIONS
# Define macros and functions to be used in this file and by Skirmish AIs

# Native Skirmish AI configuration macro
Expand Down
8 changes: 4 additions & 4 deletions AI/Interfaces/Java/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@


################################################################################
### BEGINN: MACROS_AND_FUNCTIONS
### BEGIN: MACROS_AND_FUNCTIONS
# Define macros and functions to be used in this file and by Java Skirmish AIs

# includes rts/build/cmake/UtilJava.cmake
Expand Down Expand Up @@ -337,7 +337,7 @@ if (BUILD_${myName}_AIINTERFACE)
"-f" "${commonAwkScriptsDir}/commonDoc.awk"
)

# A CMake Custom Target will allways be built.
# A CMake Custom Target will always be built.
# from CMake docu:
# "add_custom_target is ALWAYS CONSIDERED OUT OF DATE"

Expand Down Expand Up @@ -575,7 +575,7 @@ if (BUILD_${myName}_AIINTERFACE)
"-C" "${myJavaBuildDir}" "${myPkgFirstPart}"
DEPENDS
${myJavaSources}
# Using the native target reduces paralellism slightly
# Using the native target reduces parallelism slightly
# (less then 1s per build => negliable), but prevetns multiple
# execution of the source generating custom-commands
# (which results in wrongly generated source files with "make -j <X>")
Expand Down Expand Up @@ -607,7 +607,7 @@ if (BUILD_${myName}_AIINTERFACE)
"-C" "${myDir}" "VERSION"
DEPENDS
${myJavaSources}
# Using the native target reduces paralellism slightly
# Using the native target reduces parallelism slightly
# (less then 1s per build => negliable), but prevetns multiple
# execution of the source generating custom-commands
# (which results in wrongly generated source files with "make -j <X>")
Expand Down
2 changes: 1 addition & 1 deletion AI/Interfaces/Java/bin/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

<property file="bin/ant.properties"/>
<!--
The following values may be overriden in either
The following values may be overridden in either
"bin/ant.properties" or any other properties file
which may be specified to ant on the command line like this:
ant -propertyfile someFile.properties
Expand Down
6 changes: 3 additions & 3 deletions AI/Interfaces/Java/bin/jni_wrappCallback.awk
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ function printNativeJNI() {
if (isRetString && c_paramNames[p] == retStringNames[2])
sub(" " jni_paramNames[p], " sizeof(" retStringNames[1] ")", paramListNoTypes);
} else if (match(pType_jni, /^j.+Array$/)) {
# primitive arrray
# primitive array
c_paramNames[p] = c_paramNames[p] "_native";
sub(" " jni_paramNames[p], " " c_paramNames[p], paramListNoTypes);

Expand Down Expand Up @@ -263,7 +263,7 @@ function printNativeJNI() {
if (!isRetString || c_paramNames[p] != retStringNames[1])
print("\t" "(*__env)->ReleaseStringUTFChars(__env, " jni_paramNames[p] ", " c_paramNames[p] ");") >> outFile_nc;
} else if (match(pType_jni, /^j.+Array$/)) {
# primitive arrray
# primitive array
capArrType = pType_jni;
sub(/^j/, "", capArrType);
sub(/Array$/, "", capArrType);
Expand Down Expand Up @@ -511,7 +511,7 @@ function wrappFunction(funcDef, commentEol) {
# can be deleted.
# If there is no special condition you want to apply,
# it should always return true (1),
# cause there are additional mechanism to prevent accidential deleting.
# cause there are additional mechanism to prevent accidental deleting.
# see: commonDoc.awk
function canDeleteDocumentation() {
return isMultiLineFunc != 1;
Expand Down
2 changes: 1 addition & 1 deletion AI/Interfaces/Java/bin/jni_wrappCommands.awk
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ function printJavaEnd() {
# can be deleted.
# If there is no special condition you want to apply,
# it should always return true (1),
# cause there are additional mechanism to prevent accidential deleting.
# cause there are additional mechanism to prevent accidental deleting.
# see: commonDoc.awk
function canDeleteDocumentation() {
return isInsideEvtStruct != 1;
Expand Down
8 changes: 4 additions & 4 deletions AI/Interfaces/Java/bin/jni_wrappEvents.awk
Original file line number Diff line number Diff line change
Expand Up @@ -357,7 +357,7 @@ function printGeneralJavaHeader(outFile_h, javaPkg_h, javaClassName_h) {
print("") >> outFile_h;
print("") >> outFile_h;
print("/**") >> outFile_h;
print(" * This is the Java entry point from events comming from the engine.") >> outFile_h;
print(" * This is the Java entry point from events coming from the engine.") >> outFile_h;
print(" * We are using JNI for best in speed.") >> outFile_h;
print(" *") >> outFile_h;
print(" * @author AWK wrapper script") >> outFile_h;
Expand Down Expand Up @@ -491,14 +491,14 @@ function saveMember(ind_mem_s, member_s) {
# can be deleted.
# If there is no special condition you want to apply,
# it should always return true (1),
# cause there are additional mechanism to prevent accidential deleting.
# cause there are additional mechanism to prevent accidental deleting.
# see: commonDoc.awk
function canDeleteDocumentation() {
return isInsideEvtStruct != 1;
}

################################################################################
### BEGINN: parsing and saving the event structs
### BEGIN: parsing and saving the event structs

# end of struct S*Event
/^}; \/\/\$ EVENT_/ {
Expand Down Expand Up @@ -534,7 +534,7 @@ function canDeleteDocumentation() {
}
}

# beginn of struct S*Event
# beginning of struct S*Event
/^struct S.*Event( \{)?/ {

isInsideEvtStruct = 1;
Expand Down
4 changes: 2 additions & 2 deletions AI/Interfaces/Java/bin/native_wrappCallback.awk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This awk script creates C functions which call C function pointers in:
# rts/ExternalAI/Interface/SSkirmishAICallback.h
#
# Right after running this script, you have to wrapp the native command structs
# Right after running this script, you have to wrap the native command structs
# into functions.
#
# This script uses functions from the following files:
Expand Down Expand Up @@ -230,7 +230,7 @@ function wrappFunction(funcDef, commentEolTot) {
# can be deleted.
# If there is no special condition you want to apply,
# it should always return true (1),
# cause there are additional mechanism to prevent accidential deleting.
# cause there are additional mechanism to prevent accidental deleting.
# see: commonDoc.awk
function canDeleteDocumentation() {
return isMultiLineFunc != 1;
Expand Down
8 changes: 4 additions & 4 deletions AI/Interfaces/Java/bin/native_wrappCommands.awk
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# This awk script creates the C functions for wrapping the C command structs in:
# rts/ExternalAI/Interface/AISCommands.h
#
# Before running this script, you have to wrapp the native callback struct
# Before running this script, you have to wrap the native callback struct
# into functions.
#
# This script uses functions from the following files:
Expand Down Expand Up @@ -302,14 +302,14 @@ function printNativeFP2F() {
# can be deleted.
# If there is no special condition you want to apply,
# it should always return true (1),
# cause there are additional mechanism to prevent accidential deleting.
# cause there are additional mechanism to prevent accidental deleting.
# see: commonDoc.awk
function canDeleteDocumentation() {
return isInsideCmdStruct != 1;
}

################################################################################
### BEGINN: parsing and saving the command structs
### BEGIN: parsing and saving the command structs

# end of struct S*Command
/^}; \/\/\$ COMMAND_.*$/ {
Expand Down Expand Up @@ -350,7 +350,7 @@ function canDeleteDocumentation() {
}
}

# beginn of struct S*Command
# beginning of struct S*Command
/^struct S.*Command( \{)?/ {

isInsideCmdStruct = 1;
Expand Down
6 changes: 3 additions & 3 deletions AI/Interfaces/Java/data/jvm.properties
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# http://java.sun.com/javase/technologies/hotspot/vmoptions.jsp
# If you use do not use the SUN JVM,
# the supported options may differ from this list.
# Each line that does not start with '#' or ';' and contians
# Each line that does not start with '#' or ';' and contains
# other characters then whitespaces is taken as an option.
#
# NOTE: When specifying relative paths to files (eg. log files),
Expand All @@ -19,9 +19,9 @@
# "{abs-path-to-spring-writable-data-dir}/AI/Interfaces/Java/0.1"
#

# NOTE: only really usefull for debugging
# NOTE: only really useful for debugging
# false: crash and report error when a JVM option was specified,
# that is unknonwn to the used JVM
# that is unknown to the used JVM
# default: true
;jvm.arguments.ignoreUnrecognized=false

Expand Down
2 changes: 1 addition & 1 deletion AI/Interfaces/Java/src/main/native/JavaBridge.c
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ static size_t java_createAIClassPath(
// add to classpath ...

// {spring-data-dir}/Skirmish/MyJavaAI/0.1/SkirmishAI/
// this can be usefull for AI devs while testing,
// this can be useful for AI devs while testing,
// if they do not want to put everything into a jar all the time
jarDirs[jarDirs_size++] = util_allocStrCatFSPath(2, skirmDD, "SkirmishAI");

Expand Down
2 changes: 1 addition & 1 deletion AI/Interfaces/Java/src/main/native/JavaBridge.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
#define INT_AI PKG_AI"AI"
#define CLS_AI_CALLBACK PKG_AI"JniAICallback"

// define path entry delimitter, used eg for the java class-path
// define path entry delimiter, used eg for the java class-path
#ifdef _WIN32
#define ENTRY_DELIM ";"
#else
Expand Down
2 changes: 1 addition & 1 deletion AI/Interfaces/Java/src/main/native/JniUtil.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobject jniUtil_makeGlobalRef(JNIEnv* env, jobject localObject, const char* objD
* Deletes a global reference to an object.
* As jclass inherits from jobject, this can be used for jclass too.
*
* @return true on success, false if an error ocurred
* @return true on success, false if an error occurred
*/
bool jniUtil_deleteGlobalRef(JNIEnv* env, jobject globalObject, const char* objDesc);

Expand Down
2 changes: 1 addition & 1 deletion AI/Skirmish/NullAI/src/AIExport.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ cost, and granted, that is true; but this does not change the fact that we're
checking for a special case that we know only happens once at the beginning of
the game, before every single event.

Of course, we still need an EVENT_INIT, since initialising the existance of a
Of course, we still need an EVENT_INIT, since initialising the existence of a
team member is not the same as initialising its state.

You might also argue that we do this check in the handleEvent switch within each
Expand Down
4 changes: 2 additions & 2 deletions AI/Skirmish/NullJavaAI/bin/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@

<property file="bin/ant.${proj.dep.type}.properties"/>
<!--
The following values may be overriden in either
The following values may be overridden in either
"bin/ant.dependent.properties" or any other properties file
which may be specified to ant on the command line like this:
ant -propertyfile someFile.properties
Expand Down Expand Up @@ -97,7 +97,7 @@ wherever you got this AI from.

<property file="bin/ant.${proj.dep.type}.properties"/>
<!--
The following values may be overriden in either
The following values may be overridden in either
"bin/ant.independent.properties" or any other properties file
which may be specified to ant on the command line like this:
ant -propertyfile someFile.properties
Expand Down
2 changes: 1 addition & 1 deletion AI/Skirmish/NullJavaAI/src/nulljavaai/NullJavaAI.java
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ public String format(LogRecord record) {
sb.append(": ");

// Get the formatted message (includes localization
// and substitution of paramters) and add it to the buffer
// and substitution of parameters) and add it to the buffer
sb.append(formatMessage(record));
sb.append("\n");

Expand Down
4 changes: 2 additions & 2 deletions AI/Skirmish/NullOOJavaAI/bin/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@

<property file="bin/ant.${proj.dep.type}.properties"/>
<!--
The following values may be overriden in either
The following values may be overridden in either
"bin/ant.dependent.properties" or any other properties file
which may be specified to ant on the command line like this:
ant -propertyfile someFile.properties
Expand Down Expand Up @@ -129,7 +129,7 @@ wherever you got this AI from.

<property file="bin/ant.${proj.dep.type}.properties"/>
<!--
The following values may be overriden in either
The following values may be overridden in either
"bin/ant.independent.properties" or any other properties file
which may be specified to ant on the command line like this:
ant -propertyfile someFile.properties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public String format(LogRecord record) {
sb.append(": ");

// Get the formatted message (includes localization
// and substitution of paramters) and add it to the buffer
// and substitution of parameters) and add it to the buffer
sb.append(formatMessage(record));
sb.append("\n");

Expand Down
2 changes: 1 addition & 1 deletion AI/Wrappers/CUtils/SharedLibrary.h
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ void sharedLib_createFullLibName(const char* libBaseName,

/**
* Loads a shared library from a file.
* Use sharedLib_isLoaded() to check if loading was successfull.
* Use sharedLib_isLoaded() to check if loading was successful.
*/
sharedLib_t sharedLib_load(const char* libFilePath);

Expand Down
4 changes: 2 additions & 2 deletions AI/Wrappers/CUtils/SimpleProfiler.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ extern "C" {
#endif // !defined PROFILING_ENABLED && defined DEBUG

/**
* Adds a specified ammount of time (in milli-seconds) to a certain part
* Adds a specified amount of time (in milli-seconds) to a certain part
*/
void simpleProfiler_addTime(const char* const part, unsigned time);

/**
* Returns the total ammount of time (in milli-seconds)
* Returns the total amount of time (in milli-seconds)
* spent in a certain part so far
*/
unsigned long simpleProfiler_getTime(const char* const part);
Expand Down
2 changes: 1 addition & 1 deletion AI/Wrappers/CUtils/Util.c
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ void util_strReplaceChar(char* toChange, char toFind, char replacer) {
char* util_allocStrReplaceStr(const char* toChange, const char* toFind,
const char* replacer) {

// evaluate number of occurences of toFind in toChange
// evaluate number of occurrences of toFind in toChange
unsigned int numFinds = 0;
const char* found = NULL;
for (found = strstr(toChange, toFind); found != NULL; numFinds++) {
Expand Down
12 changes: 6 additions & 6 deletions AI/Wrappers/CUtils/Util.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ extern "C" {

#include <stdbool.h>

// BEGINN: String realated functions
// BEGIN: String related functions

/**
* Allocates fresh memory for storing a C string of the specified length.
Expand All @@ -34,7 +34,7 @@ char* util_allocStr(unsigned int length);
/**
* Allocates fresh memory and copies the supplied string into it.
* @return the freshly allocated memory containing the string,
* or NULL, if the arguemtn was NULL.
* or NULL, if the argument was NULL.
*/
char* util_allocStrCpy(const char* toCopy);

Expand Down Expand Up @@ -88,13 +88,13 @@ bool util_endsWith(const char* str, const char* suffix);

bool util_strToBool(const char* str);

// END: String realated functions
// END: String related functions


// BEGINN: File system realated functions
// BEGIN: File system related functions

/**
* Checks whether a string contians an absolute path.
* Checks whether a string contains an absolute path.
* The corresponding matcher-regexes are:
* on Windows: "^.:(\\|/).*"
* otherwise: "^/.*"
Expand Down Expand Up @@ -192,7 +192,7 @@ bool util_findDir(const char* dirs[], unsigned int numDirs,
int util_parsePropertiesFile(const char* propertiesFile,
const char* keys[], const char* values[], int maxProperties);

// END: File system realated functions
// END: File system related functions


/**
Expand Down
4 changes: 2 additions & 2 deletions AI/Wrappers/CUtils/bin/common.awk
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function trim(str__common) { return rtrim(ltrim(str__common)); }
# http://www.gnu.org/manual/gawk/html_node/Escape-Sequences.html
function noSpaces(str__common) { gsub(/[ \t\n\r]/, "", str__common); return str__common; }

# returns a string containing only spaces with the same lenght as the input string
# returns a string containing only spaces with the same length as the input string
function lengtAsSpaces(str__common) { gsub(/./, " ", str__common); return str__common; }

### END: Trim functions
Expand Down Expand Up @@ -145,7 +145,7 @@ function regexEscape(str__common) {
# Awaits this format: "const std::map<int, std::string>* idNameMap"
# Returns this format: "idNameMap"
# or
# Awaits this format: unsinged const char* varName[]
# Awaits this format: unsigned const char* varName[]
# Returns this format: varName
function extractParamName(param__common) {

Expand Down
Loading