Skip to content

Commit

Permalink
fix: apply latest v fmt changes, update deprecated byte type to `…
Browse files Browse the repository at this point in the history
…u8` (#118)
  • Loading branch information
ttytm authored Oct 29, 2023
1 parent 20eebb9 commit c2f22e5
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions common/readutmp_nix.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ pub const wtmp_file_charptr = &char(C._PATH_WTMP)

// Options for read_utmp.
pub enum ReadUtmpOptions {
undefined = 0
check_pids = 1
undefined = 0
check_pids = 1
user_process = 2
}

Expand Down
2 changes: 1 addition & 1 deletion src/[/left_bracket.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ fn (p Parser) get() ?string {
return none
}

fn test_unary(option byte, arg string) bool {
fn test_unary(option u8, arg string) bool {
match option {
`b` {
return os.exists(arg) && FileType(os.inode(arg).typ) == .block_device
Expand Down
2 changes: 1 addition & 1 deletion src/base64/base64.v
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const (
// more than 3/4 of chunk_size_decode
buffer_size_decode = 16 * 1024

newline = []byte{len: 1, init: `\n`}
newline = []u8{len: 1, init: `\n`}
)

fn get_file(args []string) os.File {
Expand Down
2 changes: 1 addition & 1 deletion src/echo/echo.v
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ fn hex_to_byte(c u8) u8 {
}
}

fn is_octal_char(c byte) bool {
fn is_octal_char(c u8) bool {
return `0` <= c && c <= `7`
}

Expand Down
2 changes: 1 addition & 1 deletion src/ls/helper.v
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const (

// Based on the exit status of actual ls
enum EXIT_STATUS {
success = 0
success = 0
minor_err = 1
major_err = 2
}
Expand Down
2 changes: 1 addition & 1 deletion src/test/test.c.v
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@ fn (p Parser) get() ?string {
return none
}

fn test_unary(option byte, arg string) bool {
fn test_unary(option u8, arg string) bool {
match option {
`b` {
return os.exists(arg) && FileType(os.inode(arg).typ) == .block_device
Expand Down
2 changes: 1 addition & 1 deletion src/wc/wc.v
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn get_count(chunk FileChunk) Count {
return count
}

fn is_space(b byte) bool {
fn is_space(b u8) bool {
return b == new_line || b == space || b == tab || b == carriage_return || b == vertical_tab
|| b == form_feed
}
Expand Down

0 comments on commit c2f22e5

Please sign in to comment.