about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorDaniel <steew0x8@protonmail.com>2021-11-06 19:27:25 +0100
committerDaniel <steew0x8@protonmail.com>2021-11-06 19:27:25 +0100
commita27144821f6f2d4e585b19726db630514c318507 (patch)
tree58cc5717ac80805434735c9dc1ec6f55561fcb49
parentd30a41c82a5f6b06e18041a1bde438d1265c9cf1 (diff)
downloadrpncalc-a27144821f6f2d4e585b19726db630514c318507.tar.gz
added a greeting message
-rw-r--r--main.c5
-rw-r--r--state.c1
2 files changed, 4 insertions, 2 deletions
diff --git a/main.c b/main.c
index 63e847f..9484a5f 100644
--- a/main.c
+++ b/main.c
@@ -12,7 +12,6 @@
 
 /* rpncalc: a simple reverse polish notation calculator */
 int main() {
-  
   /* initialize state struct and its values */
   state s;
   /* default input buffer is stdin */
@@ -27,6 +26,10 @@ int main() {
   s.stk = stack;
   s.command_count = 0;
   init_state(&s);
+
+
+  fprintf(s.defout,"welcome to rpncalc! type 'list' to see a list of commands, or 'quit' to leave.\n");
+  
   
   /* start reading from defbuf */
   char buf[BUF_SIZE];
diff --git a/state.c b/state.c
index 8b13789..e69de29 100644
--- a/state.c
+++ b/state.c
@@ -1 +0,0 @@
-