sim

the sim text editor
git clone git://ssnf.xyz/sim
Log | Files | Refs | README

commit 9295f7e5a217cafe06d3f7b72d93ec035069d307
parent bba3d9b8e6cb1ebeb35857d1daf4c397e9c00b7b
Author: ssnf <ssnf@ssnf.xyz>
Date:   Mon,  9 Aug 2021 20:58:16 +0000

rearranged definitions in alphabetical order

Diffstat:
Msim.h | 38+++++++++++++++++++-------------------
1 file changed, 19 insertions(+), 19 deletions(-)

diff --git a/sim.h b/sim.h @@ -9,9 +9,9 @@ typedef unsigned long ulong; typedef unsigned short ushort; typedef struct Address Address; typedef struct File File; +typedef struct Key Key; typedef struct String String; typedef struct Window Window; -typedef struct Key Key; enum { Up, @@ -30,6 +30,12 @@ struct File { Address dot; }; +struct Key { + uchar key; + void (*func)(int); + int value; +}; + struct String { char* s; ulong n; /*number of filled characters*/ @@ -41,23 +47,17 @@ struct Window { ushort cx; }; -struct Key { - uchar key; - void (*func)(int); - int value; -}; - -void die(char* fmt, ...); +void die(char* fmt, ...); void* emalloc(ulong n); void* erealloc(void* p, ulong n); -void file_init(File* f); -void file_load(File* f); -void file_save(File* f); -void file_close(File* f); -void str_init(String* s); -void str_insure(String* s, ulong n); -void str_close(String* s); -void str_adds(String* p, char* s, ulong n); -void win_init(); -void win_end(); -void win_query(Window* w); +void file_close(File* f); +void file_init(File* f); +void file_load(File* f); +void file_save(File* f); +void str_adds(String* p, char* s, ulong n); +void str_close(String* s); +void str_init(String* s); +void str_insure(String* s, ulong n); +void win_end(); +void win_init(); +void win_query(Window* w);