From 9df8f350f15ed01abf0da403ba76a3c7047b017a Mon Sep 17 00:00:00 2001 From: Didnt Read Readme Date: Wed, 16 Mar 2022 16:38:09 +0100 Subject: [PATCH] Korrektur in Aufgabe1 --- .../work/modularize/src/read.c | 9 +-------- .../work/modularize/src/read.h | 14 ++++++++++++++ .../work/modularize/src/rectang.h | 6 ++++++ 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/P04_Modularisieren_von_C_Code/work/modularize/src/read.c b/P04_Modularisieren_von_C_Code/work/modularize/src/read.c index 05c2a20..2b998bd 100644 --- a/P04_Modularisieren_von_C_Code/work/modularize/src/read.c +++ b/P04_Modularisieren_von_C_Code/work/modularize/src/read.c @@ -13,14 +13,7 @@ */ // begin students to add code for task 4.1 #include -#define EOL 10 -#define PARSE_ERROR -1 -#define READ_ERROR -2 -#define ASCII_SPACE 32 -#define ASCII_DIGIT_0 48 -#define ASCII_DIGIT_9 57 -#define NO_POS -1 -#define BUFFERSIZE 10 +#include "read.h" int getInt(int maxResult) { char buffer[BUFFERSIZE] = {0}; int result = 0; diff --git a/P04_Modularisieren_von_C_Code/work/modularize/src/read.h b/P04_Modularisieren_von_C_Code/work/modularize/src/read.h index 16187fe..a0b29d8 100644 --- a/P04_Modularisieren_von_C_Code/work/modularize/src/read.h +++ b/P04_Modularisieren_von_C_Code/work/modularize/src/read.h @@ -12,5 +12,19 @@ * @brief Lab implementation */ // begin students to add code for task 4.1 +#ifndef READ_H +#define READ_H +#define EOL 10 +#define PARSE_ERROR -1 +#define READ_ERROR -2 +#define ASCII_SPACE 32 +#define ASCII_DIGIT_0 48 +#define ASCII_DIGIT_9 57 +#define NO_POS -1 +#define BUFFERSIZE 10 + +int getInt(int maxResult); + +#endif // end students to add code diff --git a/P04_Modularisieren_von_C_Code/work/modularize/src/rectang.h b/P04_Modularisieren_von_C_Code/work/modularize/src/rectang.h index 16187fe..5939468 100644 --- a/P04_Modularisieren_von_C_Code/work/modularize/src/rectang.h +++ b/P04_Modularisieren_von_C_Code/work/modularize/src/rectang.h @@ -12,5 +12,11 @@ * @brief Lab implementation */ // begin students to add code for task 4.1 +#ifndef RECTANG_H +#define RECTANG_H + +int Rectangular(int a, int b, int c); + +#endif // end students to add code