Skip to content

Commit

Permalink
rename the standard file functions
Browse files Browse the repository at this point in the history
  • Loading branch information
eyelash committed Sep 5, 2024
1 parent f856e7b commit 07c05c9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions gral.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ void gral_run_on_main_thread(void (*callback)(void *user_data), void *user_data)

struct gral_file *gral_file_open_read(char const *path);
struct gral_file *gral_file_open_write(char const *path);
struct gral_file *gral_file_get_stdin(void);
struct gral_file *gral_file_get_stdout(void);
struct gral_file *gral_file_get_stderr(void);
struct gral_file *gral_file_get_standard_input(void);
struct gral_file *gral_file_get_standard_output(void);
struct gral_file *gral_file_get_standard_error(void);
void gral_file_close(struct gral_file *file);
size_t gral_file_read(struct gral_file *file, void *buffer, size_t size);
void gral_file_write(struct gral_file *file, void const *buffer, size_t size);
Expand Down
6 changes: 3 additions & 3 deletions gral_linux.c
Original file line number Diff line number Diff line change
Expand Up @@ -706,15 +706,15 @@ struct gral_file *gral_file_open_write(char const *path) {
return fd == -1 ? NULL : (struct gral_file *)(intptr_t)fd;
}

struct gral_file *gral_file_get_stdin(void) {
struct gral_file *gral_file_get_standard_input(void) {
return (struct gral_file *)STDIN_FILENO;
}

struct gral_file *gral_file_get_stdout(void) {
struct gral_file *gral_file_get_standard_output(void) {
return (struct gral_file *)STDOUT_FILENO;
}

struct gral_file *gral_file_get_stderr(void) {
struct gral_file *gral_file_get_standard_error(void) {
return (struct gral_file *)STDERR_FILENO;
}

Expand Down
6 changes: 3 additions & 3 deletions gral_macos.m
Original file line number Diff line number Diff line change
Expand Up @@ -722,15 +722,15 @@ void gral_run_on_main_thread(void (*callback)(void *user_data), void *user_data)
return fd == -1 ? NULL : (struct gral_file *)(intptr_t)fd;
}

struct gral_file *gral_file_get_stdin(void) {
struct gral_file *gral_file_get_standard_input(void) {
return (struct gral_file *)STDIN_FILENO;
}

struct gral_file *gral_file_get_stdout(void) {
struct gral_file *gral_file_get_standard_output(void) {
return (struct gral_file *)STDOUT_FILENO;
}

struct gral_file *gral_file_get_stderr(void) {
struct gral_file *gral_file_get_standard_error(void) {
return (struct gral_file *)STDERR_FILENO;
}

Expand Down
6 changes: 3 additions & 3 deletions gral_windows.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1109,15 +1109,15 @@ gral_file *gral_file_open_write(char const *path) {
return handle == INVALID_HANDLE_VALUE ? NULL : (gral_file *)handle;
}

gral_file *gral_file_get_stdin() {
gral_file *gral_file_get_standard_input() {
return (gral_file *)GetStdHandle(STD_INPUT_HANDLE);
}

gral_file *gral_file_get_stdout() {
gral_file *gral_file_get_standard_output() {
return (gral_file *)GetStdHandle(STD_OUTPUT_HANDLE);
}

gral_file *gral_file_get_stderr() {
gral_file *gral_file_get_standard_error() {
return (gral_file *)GetStdHandle(STD_ERROR_HANDLE);
}

Expand Down

0 comments on commit 07c05c9

Please sign in to comment.