mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
mut v :=
update examples
This commit is contained in:
parent
77b6da23c4
commit
4aab26d3e3
@ -5,7 +5,7 @@
|
|||||||
import os
|
import os
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
mut path = 'cinderella.txt'
|
mut path := 'cinderella.txt'
|
||||||
if os.args.len != 2 {
|
if os.args.len != 2 {
|
||||||
println('usage: word_counter [text_file]')
|
println('usage: word_counter [text_file]')
|
||||||
println('using $path')
|
println('using $path')
|
||||||
|
@ -105,8 +105,8 @@ pub fn new_shader(name string) Shader {
|
|||||||
fragment_path := '${dir}${name}.frag'
|
fragment_path := '${dir}${name}.frag'
|
||||||
println('shader path=$vertex_path,\n fpath="$fragment_path"')
|
println('shader path=$vertex_path,\n fpath="$fragment_path"')
|
||||||
// vertex_src := os.read_file(vertex_path.trim_space())
|
// vertex_src := os.read_file(vertex_path.trim_space())
|
||||||
mut vertex_src = ''
|
mut vertex_src := ''
|
||||||
mut fragment_src = ''
|
mut fragment_src := ''
|
||||||
if name == 'text' {
|
if name == 'text' {
|
||||||
vertex_src = TEXT_VERT
|
vertex_src = TEXT_VERT
|
||||||
fragment_src = TEXT_FRAG
|
fragment_src = TEXT_FRAG
|
||||||
|
@ -46,7 +46,7 @@ fn C.curl_easy_strerror(curl voidptr) byteptr
|
|||||||
fn C.curl_easy_perform(curl voidptr) C.CURLcode
|
fn C.curl_easy_perform(curl voidptr) C.CURLcode
|
||||||
|
|
||||||
fn write_fn(contents byteptr, size, nmemb int, _mem *MemoryStruct) int {
|
fn write_fn(contents byteptr, size, nmemb int, _mem *MemoryStruct) int {
|
||||||
mut mem = _mem
|
mut mem := _mem
|
||||||
// # printf("size =%d nmemb=%d contents=%s\n", size, nmemb, contents);
|
// # printf("size =%d nmemb=%d contents=%s\n", size, nmemb, contents);
|
||||||
realsize := size * nmemb// TODO size_t ?
|
realsize := size * nmemb// TODO size_t ?
|
||||||
// if !isnil(mem.ws_func) {
|
// if !isnil(mem.ws_func) {
|
||||||
|
Loading…
Reference in New Issue
Block a user