From 079ea5c4c4787666310a8a5e5e0bd8482fc9b250 Mon Sep 17 00:00:00 2001 From: Lailouezzz Date: Sun, 5 Jan 2020 16:19:52 +0100 Subject: [PATCH] Adding CASIO_OPENMODE_OW (overwrite) --- include/libcasio/stream.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/libcasio/stream.h b/include/libcasio/stream.h index a6e794c..400227a 100644 --- a/include/libcasio/stream.h +++ b/include/libcasio/stream.h @@ -61,6 +61,7 @@ typedef struct casio_scsi_s casio_scsi_t; * `WRITE`: the stream is writable. * `TRUNC`: the file will be truncated. * `APPEND`: will append to the file. + * `OW`: will overwrite if there is existing file. * * `SEEK`: the stream is seekable. * `SERIAL`: serial operations are available. @@ -73,10 +74,11 @@ typedef unsigned int casio_openmode_t; # define CASIO_OPENMODE_WRITE 0x0002 # define CASIO_OPENMODE_TRUNC 0x0004 # define CASIO_OPENMODE_APPEND 0x0008 -# define CASIO_OPENMODE_SEEK 0x0010 -# define CASIO_OPENMODE_SERIAL 0x0020 -# define CASIO_OPENMODE_SCSI 0x0040 -# define CASIO_OPENMODE_USB 0x0080 +# define CASIO_OPENMODE_OW 0x0010 +# define CASIO_OPENMODE_SEEK 0x0020 +# define CASIO_OPENMODE_SERIAL 0x0040 +# define CASIO_OPENMODE_SCSI 0x0080 +# define CASIO_OPENMODE_USB 0x0100 /* Offset types, to move within a stream, are the following: * `SET`: set the current position to the offset.