Skip to content

Commit e419faf

Browse files
committed
all: fix dependant->dependent typos, cleanup comments
1 parent 675c362 commit e419faf

File tree

11 files changed

+15
-26
lines changed

11 files changed

+15
-26
lines changed

cmd/tools/vcomplete.v

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,8 @@ fn auto_complete(args []string) {
356356
exit(0)
357357
}
358358

359-
// append_separator_if_dir is a utility function.that returns the input `path` appended an
360-
// OS dependant path separator if the `path` is a directory.
359+
// append_separator_if_dir returns the input `path` with an appended
360+
// `/` or `\`, depending on the platform, when `path` is a directory.
361361
fn append_separator_if_dir(path string) string {
362362
if os.is_dir(path) && !path.ends_with(os.path_separator) {
363363
return path + os.path_separator

examples/sokol/03_march_tracing_glsl/rt_glsl.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ float sdRoundCone(vec3 p, vec3 a, vec3 b, float r1, float r2)
168168
float a2 = l2 - rr*rr;
169169
float il2 = 1.0/l2;
170170

171-
// sampling dependant computations
171+
// sampling dependent computations
172172
vec3 pa = p - a;
173173
float y = dot(pa,ba);
174174
float z = y - l2;

examples/sokol/04_multi_shader_glsl/rt_glsl_march.glsl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ float sdRoundCone(vec3 p, vec3 a, vec3 b, float r1, float r2)
168168
float a2 = l2 - rr*rr;
169169
float il2 = 1.0/l2;
170170

171-
// sampling dependant computations
171+
// sampling dependent computations
172172
vec3 pa = p - a;
173173
float y = dot(pa,ba);
174174
float z = y - l2;

vlib/os/os_windows.c.v

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -169,7 +169,6 @@ pub fn ls(path string) ![]string {
169169
if !is_dir(path) {
170170
return error('ls() couldnt open dir "${path}": directory does not exist')
171171
}
172-
// NOTE: Should eventually have path struct & os dependant path seperator (eg os.PATH_SEPERATOR)
173172
// we need to add files to path eg. c:\windows\*.dll or :\windows\*
174173
path_files := '${path}\\*'
175174
// NOTE:TODO: once we have a way to convert utf16 wide character to utf8

vlib/os/process_nix.c.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ fn (mut p Process) unix_spawn_process() int {
2828
//
2929
// Here, we are in the child process.
3030
// It still shares file descriptors with the parent process,
31-
// but it is otherwise independant and can do stuff *without*
31+
// but it is otherwise independent and can do stuff *without*
3232
// affecting the parent process.
3333
//
3434
if p.use_pgroup {

vlib/time/parse.js.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ module time
33
// parse returns time from a date string.
44
//
55
// TODO(playX): JS Date expects iso8061 format of strings and other formats
6-
// are implementation dependant, we probably want to implement parsing in JS.
6+
// are implementation dependent, we probably want to implement parsing in JS.
77
pub fn parse(s string) Time {
88
mut res := Time{}
99
#let date = new Date(s.str)

vlib/v/fmt/fmt.v

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import v.checker.constants
1111

1212
const (
1313
bs = '\\'
14-
// when to break a line dependant on penalty
14+
// when to break a line depending on the penalty
1515
max_len = [0, 35, 60, 85, 93, 100]
1616
)
1717

vlib/v/gen/c/cgen.v

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2545,7 +2545,7 @@ fn cescape_nonascii(original string) string {
25452545
for c in original {
25462546
if c < 32 || c > 126 {
25472547
// Encode with a 3 digit octal escape code, which has the
2548-
// advantage to be limited/non dependant on what character
2548+
// advantage to be limited/non dependent on what character
25492549
// will follow next, unlike hex escapes:
25502550
write_octal_escape(mut b, c)
25512551
continue
@@ -5457,7 +5457,7 @@ fn (mut g Gen) sort_globals_consts() {
54575457
}
54585458
}
54595459

5460-
// sort structs by dependant fields
5460+
// sort structs by dependent fields
54615461
fn (mut g Gen) sort_structs(typesa []&ast.TypeSymbol) []&ast.TypeSymbol {
54625462
util.timing_start(@METHOD)
54635463
defer {
@@ -5569,7 +5569,7 @@ fn (mut g Gen) sort_structs(typesa []&ast.TypeSymbol) []&ast.TypeSymbol {
55695569
// ast.Interface {}
55705570
else {}
55715571
}
5572-
// add type and dependant types to graph
5572+
// add type and dependent types to graph
55735573
dep_graph.add(sym.name, field_deps)
55745574
}
55755575
// sort graph
@@ -5579,7 +5579,7 @@ fn (mut g Gen) sort_structs(typesa []&ast.TypeSymbol) []&ast.TypeSymbol {
55795579
// TODO: should it be removed?
55805580
verror('cgen.sort_structs(): the following structs form a dependency cycle:\n' +
55815581
dep_graph_sorted.display_cycles() +
5582-
'\nyou can solve this by making one or both of the dependant struct fields references, eg: field &MyStruct' +
5582+
'\nyou can solve this by making one or both of the dependent struct fields references, eg: field &MyStruct' +
55835583
'\nif you feel this is an error, please create a new issue here: https://github.com/vlang/v/issues and tag @joe-conigliaro')
55845584
}
55855585
// sort types

vlib/v/gen/golang/golang.v

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ import v.util
99
import v.pref
1010
import os
1111

12-
const (
13-
bs = '\\'
14-
// when to break a line dependant on penalty
15-
max_len = [0, 35, 60, 85, 93, 100]
16-
)
12+
const bs = '\\'
1713

1814
pub struct Gen {
1915
pub mut:

vlib/v/gen/golang/struct.v

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -75,13 +75,6 @@ pub fn (mut f Gen) struct_decl(node ast.StructDecl) {
7575
// end_pos := field.pos.pos + field.pos.len
7676
volatile_prefix := if field.is_volatile { 'volatile ' } else { '' }
7777
f.write('\t${volatile_prefix}${field.name} ')
78-
// before_len := f.line_len
79-
// mut field_align := field_aligns[field_align_i]
80-
// if field_align.line_nr < field.pos.line_nr {
81-
// field_align_i++
82-
// field_align = field_aligns[field_align_i]
83-
//}
84-
// f.write(strings.repeat(` `, field_align.max_len - field.name.len - comments_len))
8578
f.write(field_types[i])
8679
f.mark_types_import_as_used(field.typ)
8780
// attrs_len := inline_attrs_len(field.attrs)

0 commit comments

Comments
 (0)