From 1a099c9284ecba461b2062b2c1c76577dbe70a60 Mon Sep 17 00:00:00 2001 From: Vitor Oliveira Date: Sat, 14 Sep 2019 13:54:14 -0700 Subject: [PATCH] vlib: fix several typos --- vlib/bitfield/bitfield.v | 4 ++-- vlib/flag/flag.v | 12 ++++++------ vlib/gg/gg.v | 4 ++-- vlib/math/math.v | 14 +++++++------- vlib/readline/readline_lin.v | 2 +- vlib/szip/szip.v | 4 ++-- vlib/term/control.v | 8 ++++---- vlib/vweb/README.md | 2 +- 8 files changed, 25 insertions(+), 25 deletions(-) diff --git a/vlib/bitfield/bitfield.v b/vlib/bitfield/bitfield.v index 28006939f4..7150ef565c 100644 --- a/vlib/bitfield/bitfield.v +++ b/vlib/bitfield/bitfield.v @@ -262,10 +262,10 @@ pub fn join(input1 BitField, input2 BitField) BitField { * options: * (a) nr of slots in output is the sum of inputs' slots. In this * case, the nr of bits in the last slot of output is less than the - * nr of bits in second input (i.e. ), OR + * nr of bits in the second input (i.e. ), OR * (b) nr of slots of output is the sum of inputs' slots less one * (i.e. less iterations needed). In this case, the nr of bits in - * the last slot of output is greater than the nr of bits in second + * the last slot of output is greater than the nr of bits in the second * input. * If offset_bit is zero, no additional copies needed. */ diff --git a/vlib/flag/flag.v b/vlib/flag/flag.v index 63f6ecffb5..4cb6538e09 100644 --- a/vlib/flag/flag.v +++ b/vlib/flag/flag.v @@ -3,7 +3,7 @@ // // - parsing flags like '--flag' or '--stuff=things' or '--things stuff' // - handles bool, int, float and string args -// - is able to pring usage +// - is able to print usage // - handled unknown arguments as error // // Usage example: @@ -45,7 +45,7 @@ module flag -// data object storing informations about a defined flag +// data object storing information about a defined flag struct Flag { pub: name string // name as it appears on command line @@ -105,7 +105,7 @@ fn (fs mut FlagParser) add_flag(n string, a byte, u, vd string) { } // private: general parsing a single argument -// - search args for existance +// - search args for existence // if true // extract the defined value as string // else @@ -213,7 +213,7 @@ pub fn (fs mut FlagParser) int(n string, i int, u string) int { return fs.int_(n, `\0`, i, u) } -// defining and parsing a flaot flag +// defining and parsing a float flag // if defined // the value is returned (float) // else @@ -228,7 +228,7 @@ pub fn (fs mut FlagParser) float_(n string, a byte, f f32, u string) f32 { return parsed.f32() } -// defining and parsing a flaot flag +// defining and parsing a float flag // if defined // the value is returned (float) // else @@ -309,7 +309,7 @@ pub fn (fs FlagParser) usage() string { // finalize argument parsing -> call after all arguments are defined // // all remaining arguments are returned in the same order they are defined on -// commandline +// command line // // if additional flag are found (things starting with '--') an error is returned // error handling is up to the application developer diff --git a/vlib/gg/gg.v b/vlib/gg/gg.v index 1fce639af7..42246d7d05 100644 --- a/vlib/gg/gg.v +++ b/vlib/gg/gg.v @@ -87,7 +87,7 @@ pub fn new_context(cfg Cfg) &GG { shader.set_mat4('projection', projection) } else { - // TODO move to function (allow volt functions to return arrrays without allocations) + // TODO move to function (allow volt functions to return arrays without allocations) // i := glm.identity3() shader.set_mat4('projection', glm.identity()) } @@ -200,7 +200,7 @@ pub fn (ctx &GG) draw_rect(x, y, w, h f32, c gx.Color) { // wrong order // // ctx.draw_triangle(x, y, x + w, y, x + w, y + h, c) // // ctx.draw_triangle(x, y, x, y + h, x + w, y + h, c) - // good order. counter clock wise + // good order. counter clockwise // ctx.draw_triangle(x, y, x, y + h, x + w, y + h, c) // ctx.draw_triangle(x, y, x + w, y + h, x + w, y, c) ctx.draw_rect2(x, y, w, h, c) diff --git a/vlib/math/math.v b/vlib/math/math.v index 8d28530de9..0f9707cb67 100644 --- a/vlib/math/math.v +++ b/vlib/math/math.v @@ -51,22 +51,22 @@ pub fn abs(a f64) f64 { return a } -// acos calculates inversed cosine (arccosine). +// acos calculates inverse cosine (arccosine). pub fn acos(a f64) f64 { return C.acos(a) } -// asin calculates inversed sine (arcsine). +// asin calculates inverse sine (arcsine). pub fn asin(a f64) f64 { return C.asin(a) } -// atan calculates inversed tangent (arctangent). +// atan calculates inverse tangent (arctangent). pub fn atan(a f64) f64 { return C.atan(a) } -// atan2 calculates inversed tangent with two arguments, returns angle between the X axis and the point. +// atan2 calculates inverse tangent with two arguments, returns the angle between the X axis and the point. pub fn atan2(a, b f64) f64 { return C.atan2(a, b) } @@ -96,7 +96,7 @@ pub fn degrees(radians f64) f64 { return radians * (180.0 / Pi) } -// exp calculates exponement of the number (math.pow(math.E, a)). +// exp calculates exponent of the number (math.pow(math.E, a)). pub fn exp(a f64) f64 { return C.exp(a) } @@ -117,12 +117,12 @@ pub fn digits(_n, base int) []int { return res } -// erf computes the error funtion value +// erf computes the error function value pub fn erf(a f64) f64 { return C.erf(a) } -// erfc computes the complimentary error function value +// erfc computes the complementary error function value pub fn erfc(a f64) f64 { return C.erfc(a) } diff --git a/vlib/readline/readline_lin.v b/vlib/readline/readline_lin.v index ba4b48a185..6bfb320484 100644 --- a/vlib/readline/readline_lin.v +++ b/vlib/readline/readline_lin.v @@ -23,7 +23,7 @@ mut: c_cc [12]int //NCCS == 12. Cant use the defined value here } -// Used to collect the screen informations +// Used to collect the screen information struct winsize { ws_row u16 ws_col u16 diff --git a/vlib/szip/szip.v b/vlib/szip/szip.v index de04ef3839..a31988fd2e 100644 --- a/vlib/szip/szip.v +++ b/vlib/szip/szip.v @@ -210,13 +210,13 @@ pub fn (zentry mut zip_ptr) create_entry(name string) bool { /** * read_entry extracts the current zip entry into output buffer. * - * The function allocates sufficient memory for a output buffer. + * The function allocates sufficient memory for an output buffer. * * @param zip zip archive handler. * @param buf output buffer. * @param bufsize output buffer size (in bytes). * - * @note remember to release memory allocated for a output buffer. + * @note remember to release the memory allocated for an output buffer. * for large entries, please take a look at zip_entry_extract function. * * @return the return code - the number of bytes actually read on success. diff --git a/vlib/term/control.v b/vlib/term/control.v index a8d364bb38..0f34b845b0 100644 --- a/vlib/term/control.v +++ b/vlib/term/control.v @@ -46,8 +46,8 @@ pub fn cursor_back(n int) { move(n,'D') } -// type: 0 -> current cursor postion to end of the screen -// type: 1 -> current cursor postion to beginning of the screen +// type: 0 -> current cursor position to end of the screen +// type: 1 -> current cursor position to beginning of the screen // type: 2 -> clears entire screen // type: 3 -> clears entire screen and also delete scrollback buffer pub fn erase_display(t string) { @@ -74,8 +74,8 @@ pub fn erase_del_clear() erase_display('3') } -// type: 0 -> current cursor postion to end of the line -// type: 1 -> current cursor postion to beginning of the line +// type: 0 -> current cursor position to end of the line +// type: 1 -> current cursor position to beginning of the line // type: 2 -> clears entire line // Note: Cursor position does not change pub fn erase_line(t string) { diff --git a/vlib/vweb/README.md b/vlib/vweb/README.md index 6c4a5e5523..74a884eab9 100644 --- a/vlib/vweb/README.md +++ b/vlib/vweb/README.md @@ -46,7 +46,7 @@ pub fn (app App) post() { `$vweb.html()` compiles an HTML template into V during compilation, and embeds the resulting code in current action. -That means that the template automatically has access to that action's entire environemnt. +That means that the template automatically has access to that action's entire environment. ### Deploying vweb apps