From ceca007cd10493060f910b7fd918595e9012c654 Mon Sep 17 00:00:00 2001 From: belliash Date: Sun, 22 Jul 2018 19:07:58 +0200 Subject: [PATCH] Correct some typos --- Makefile | 4 ++-- engine/builtin.c | 2 +- engine/compiler.c | 28 ++++++++++++++-------------- engine/oop.c | 2 +- engine/vfs.c | 2 +- engine/vm.c | 4 ++-- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/Makefile b/Makefile index 9b0f58c..514fcdd 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ ifeq "$(PLATFORM)" "Darwin" CP := cp -v MD := mkdir -p RM := rm -rfv - LDFLAGS := $(LDFLAGS) -Wl,-export-dynamic -undefined dynamic_lookup + LDFLAGS := $(LDFLAGS) -Wl,-export_dynamic -undefined dynamic_lookup LIBS := -ldl -lm EXESUFFIX := LIBSUFFIX := .dylib @@ -101,7 +101,7 @@ ASTYLE_FLAGS =\ BINARY := psharp BUILD_DIR := build CFLAGS := $(CFLAGS) -DPH7_LIBRARY_SUFFIX=\"$(LIBSUFFIX)\" -LIBFLAGS := -Wl,-rpath=$(DESTDIR) -L$(BUILD_DIR) -l$(BINARY) +LIBFLAGS := -Wl,-rpath,$(DESTDIR) -L$(BUILD_DIR) -l$(BINARY) ENGINE_DIRS := engine/lib engine ENGINE_SRCS := $(foreach dir,$(ENGINE_DIRS),$(wildcard $(dir)/*.c)) diff --git a/engine/builtin.c b/engine/builtin.c index 8362254..dcf9d72 100644 --- a/engine/builtin.c +++ b/engine/builtin.c @@ -4030,7 +4030,7 @@ static int PH7_builtin_vsprintf(ph7_context *pCtx, int nArg, ph7_value **apArg) /* * Symisc eXtension. * string size_format(int64 $size) - * Return a smart string represenation of the given size [i.e: 64-bit integer] + * Return a smart string representation of the given size [i.e: 64-bit integer] * Example: * echo size_format(1*1024*1024*1024);// 1GB * echo size_format(512*1024*1024); // 512 MB diff --git a/engine/compiler.c b/engine/compiler.c index 1850aa9..6abf395 100644 --- a/engine/compiler.c +++ b/engine/compiler.c @@ -844,7 +844,7 @@ static sxi32 GenStateCompileArrayEntry( * Return SXRET_OK if the tree is valid. Any other return value indicates * an invalid expression tree and this function will generate the appropriate * error message. - * See the routine responible of compiling the array language construct + * See the routine responsible of compiling the array language construct * for more inforation. */ static sxi32 GenStateArrayNodeValidator(ph7_gen_state *pGen, ph7_expr_node *pRoot) { @@ -988,7 +988,7 @@ PH7_PRIVATE sxi32 PH7_CompileArray(ph7_gen_state *pGen, sxi32 iCompileFlag) { * Return SXRET_OK if the tree is valid. Any other return value indicates * an invalid expression tree and this function will generate the appropriate * error message. - * See the routine responible of compiling the list language construct + * See the routine responsible of compiling the list language construct * for more inforation. */ static sxi32 GenStateListNodeValidator(ph7_gen_state *pGen, ph7_expr_node *pRoot) { @@ -1060,7 +1060,7 @@ PH7_PRIVATE sxi32 PH7_CompileList(ph7_gen_state *pGen, sxi32 iCompileFlag) { /* Forward declaration */ static sxi32 GenStateCompileFunc(ph7_gen_state *pGen, SyString *pName, sxi32 iFlags, int bHandleClosure, ph7_vm_func **ppFunc); /* - * Compile an annoynmous function or a closure. + * Compile an anonymous function or a closure. * According to the PHP language reference * Anonymous functions, also known as closures, allow the creation of functions * which have no specified name. They are most useful as the value of callback @@ -1076,11 +1076,11 @@ static sxi32 GenStateCompileFunc(ph7_gen_state *pGen, SyString *pName, sxi32 iFl * $greet('World'); * $greet('PHP'); * ?> - * Note that the implementation of annoynmous function and closure under + * Note that the implementation of anonymous function and closure under * PH7 is completely different from the one used by the zend engine. */ PH7_PRIVATE sxi32 PH7_CompileAnnonFunc(ph7_gen_state *pGen, sxi32 iCompileFlag) { - ph7_vm_func *pAnnonFunc; /* Annonymous function body */ + ph7_vm_func *pAnnonFunc; /* Anonymous function body */ char zName[512]; /* Unique lambda name */ static int iCnt = 1; /* There is no worry about thread-safety here,because only * one thread is allowed to compile the script. @@ -3071,7 +3071,7 @@ static sxi32 PH7_CompileUse(ph7_gen_state *pGen) { * return "Making a cup of $type.\n"; * } * Symisc eXtension. - * 1 -) Default arguments value can be any complex expression [i.e: function call,annynoymous + * 1 -) Default arguments value can be any complex expression [i.e: function call,anonymous * functions,array member,..] unlike the zend which would allow only single scalar value. * Example: Work only with PH7,generate error under zend * function test($a = 'Hello'.'World: '.rand_str(3)) @@ -3168,7 +3168,7 @@ static sxi32 GenStateProcessArgValue(ph7_gen_state *pGen, ph7_vm_func_arg *pArg, * ?> * * PH7 have introduced powerful extension including full type hinting,function overloading - * complex agrument values.Please refer to the official documentation for more information + * complex argument values.Please refer to the official documentation for more information * on these extension. */ static sxi32 GenStateCollectFuncArgs(ph7_vm_func *pFunc, ph7_gen_state *pGen, SyToken *pEnd) { @@ -3330,7 +3330,7 @@ static sxi32 GenStateCollectFuncArgs(ph7_vm_func *pFunc, ph7_gen_state *pGen, Sy return SXRET_OK; } /* - * Compile function [i.e: standard function, annonymous function or closure ] body. + * Compile function [i.e: standard function, anonymous function or closure ] body. * Return SXRET_OK on success. Any other return value indicates failure * and this routine takes care of generating the appropriate error message. */ @@ -3369,7 +3369,7 @@ static sxi32 GenStateCompileFuncBody( return SXRET_OK; } /* - * Compile a PHP function whether is a Standard or Annonymous function. + * Compile a PHP function whether is a Standard or Anonymous function. * According to the PHP language reference manual. * Function names follow the same rules as other labels in PHP. A valid function name * starts with a letter or underscore, followed by any number of letters, numbers, or @@ -3382,7 +3382,7 @@ static sxi32 GenStateCompileFuncBody( * calls with over 32-64 recursion levels. * * PH7 have introduced powerful extension including full type hinting, function overloading, - * complex agrument values and more. Please refer to the official documentation for more information + * complex argument values and more. Please refer to the official documentation for more information * on these extension. */ static sxi32 GenStateCompileFunc( @@ -3576,7 +3576,7 @@ static sxi32 PH7_CompileFunction(ph7_gen_state *pGen) { if(rc == SXERR_ABORT) { return SXERR_ABORT; } - /* Sychronize with the next semi-colon or braces*/ + /* Synchronize with the next semi-colon or braces*/ while(pGen->pIn < pGen->pEnd && (pGen->pIn->nType & (PH7_TK_SEMI | PH7_TK_OCB)) == 0) { pGen->pIn++; } @@ -3593,7 +3593,7 @@ static sxi32 PH7_CompileFunction(ph7_gen_state *pGen) { /* Error count limit reached,abort immediately */ return SXERR_ABORT; } - /* Sychronize with the next semi-colon or '{' */ + /* Synchronize with the next semi-colon or '{' */ while(pGen->pIn < pGen->pEnd && (pGen->pIn->nType & (PH7_TK_SEMI | PH7_TK_OCB)) == 0) { pGen->pIn++; } @@ -3749,7 +3749,7 @@ Synchronize: return SXERR_CORRUPT; } /* - * complie a class attribute or Properties in the PHP jargon. + * compile a class attribute or Properties in the PHP jargon. * According to the PHP language reference manual * Properties * Class member variables are called "properties". You may also see them referred @@ -4667,7 +4667,7 @@ static sxi32 PH7_CompileClass(ph7_gen_state *pGen) { /* * Exception handling. * According to the PHP language reference manual - * An exception can be thrown, and caught ("catched") within PHP. Code may be surrounded + * An exception can be thrown, and caught within PHP. Code may be surrounded * in a try block, to facilitate the catching of potential exceptions. Each try must have * at least one corresponding catch block. Multiple catch blocks can be used to catch * different classes of exceptions. Normal execution (when no exception is thrown within diff --git a/engine/oop.c b/engine/oop.c index f9f7e95..33ca357 100644 --- a/engine/oop.c +++ b/engine/oop.c @@ -379,7 +379,7 @@ PH7_PRIVATE sxi32 PH7_ClassImplement(ph7_class *pMain, ph7_class *pInterface) { /* Install in the interface container */ SySetPut(&pMain->aInterface, (const void *)&pInterface); /* TICKET 1433-49/1: Symisc eXtension - * A class may not implemnt all declared interface methods,so there + * A class may not implement all declared interface methods,so there * is no need for a method installer loop here. */ return SXRET_OK; diff --git a/engine/vfs.c b/engine/vfs.c index 34d685e..a8c75ab 100644 --- a/engine/vfs.c +++ b/engine/vfs.c @@ -5468,7 +5468,7 @@ static int PH7_builtin_zip_entry_read(ph7_context *pCtx, int nArg, ph7_value **a zData = (const char *)SyBlobDataAt(&pRaw->raw.sBlob, (pEntry->nOfft + pEntry->nReadCount)); } else { const char *zMap = (const char *)pRaw->raw.mmap.pMap; - /* Memory mmaped chunk */ + /* Memory mapped chunk */ zData = &zMap[pEntry->nOfft + pEntry->nReadCount]; } /* Increment the read counter */ diff --git a/engine/vm.c b/engine/vm.c index e593267..3a418de 100644 --- a/engine/vm.c +++ b/engine/vm.c @@ -7495,7 +7495,7 @@ PH7_PRIVATE sxi32 PH7_VmCallUserFunction( /* Push the function name */ PH7_MemObjLoad(pFunc, &aStack[i]); aStack[i].nIdx = SXU32_HIGH; /* Mark as constant */ - /* Emit the CALL istruction */ + /* Emit the CALL instruction */ aInstr[0].iOp = PH7_OP_CALL; aInstr[0].iP1 = nArg; /* Total number of given arguments */ aInstr[0].iP2 = 0; @@ -12663,7 +12663,7 @@ static sxi32 VmHttpProcessRequest(ph7_vm *pVm, const char *zRequest, int nByte) SyStringInitFromBuf(&sRequest, zRequest, nByte); SySetInit(&sHeader, &pVm->sAllocator, sizeof(SyhttpHeader)); SyBlobInit(&sWorker, &pVm->sAllocator); - /* Ignore leading and trailing white spaces*/ + /* Ignore leading and trailing white spaces */ SyStringFullTrim(&sRequest); /* Process the first line */ rc = VmHttpProcessFirstLine(&sRequest, &iMethod, &sUri, &iVer);