Mathematical fixes
This commit is contained in:
parent
b71a1a33ae
commit
7fd29eb693
|
@ -0,0 +1,12 @@
|
|||
To compile this under Linux:
|
||||
|
||||
gcc -o platy_gnu buffer.c buffer.h platy_bt.c -Wall -ansi -pedantic
|
||||
|
||||
To use:
|
||||
./platy_gnu ass1.pls [f|a|m]
|
||||
|
||||
f: fixed increment mode
|
||||
a: additive increment mode
|
||||
m: multiplicative mode
|
||||
|
||||
NOTE: Change buffer.h to use malloc.h instead of mm_maloc.h if running on anything that isn't macOS
|
|
@ -1,41 +0,0 @@
|
|||
Reading file ass1.pls ....Please wait
|
||||
|
||||
Printing buffer parameters:
|
||||
|
||||
The capacity of the buffer is: 320
|
||||
The current size of the buffer is: 319
|
||||
The operational mode of the buffer is: 1
|
||||
The increment factor of the buffer is: 15
|
||||
The current mark of the buffer is: 319
|
||||
|
||||
Printing buffer contents:
|
||||
|
||||
Compilers are fundamental to modern computing.
|
||||
They act as translators, transforming human-oriented
|
||||
language into computer-oriented machine-language.
|
||||
A compiler allows virtually all computer users to
|
||||
ignore the machine-dependent details of machine language.
|
||||
Isn't that nice? =:)
|
||||
|
||||
CST8152
|
||||
Autumn, 2016
|
||||
|
||||
Printing buffer parameters:
|
||||
|
||||
The capacity of the buffer is: 320
|
||||
The current size of the buffer is: 320
|
||||
The operational mode of the buffer is: 1
|
||||
The increment factor of the buffer is: 15
|
||||
The current mark of the buffer is: 319
|
||||
|
||||
Printing buffer contents:
|
||||
|
||||
Compilers are fundamental to modern computing.
|
||||
They act as translators, transforming human-oriented
|
||||
language into computer-oriented machine-language.
|
||||
A compiler allows virtually all computer users to
|
||||
ignore the machine-dependent details of machine language.
|
||||
Isn't that nice? =:)
|
||||
|
||||
CST8152
|
||||
Autumn, 2016ÿ
|
|
@ -1,25 +0,0 @@
|
|||
Reading file ass1e.pls ....Please wait
|
||||
|
||||
Printing buffer parameters:
|
||||
|
||||
The capacity of the buffer is: 200
|
||||
The current size of the buffer is: 0
|
||||
The operational mode of the buffer is: 0
|
||||
The increment factor of the buffer is: 0
|
||||
The current mark of the buffer is: 0
|
||||
|
||||
Printing buffer contents:
|
||||
|
||||
The buffer is empty.
|
||||
|
||||
Printing buffer parameters:
|
||||
|
||||
The capacity of the buffer is: 1
|
||||
The current size of the buffer is: 1
|
||||
The operational mode of the buffer is: 0
|
||||
The increment factor of the buffer is: 0
|
||||
The current mark of the buffer is: 0
|
||||
|
||||
Printing buffer contents:
|
||||
|
||||
ÿ
|
|
@ -1,33 +0,0 @@
|
|||
Reading file ass1.pls ....Please wait
|
||||
The input file ass1.pls is not completely loaded.
|
||||
Input file size: 327
|
||||
|
||||
Printing buffer parameters:
|
||||
|
||||
The capacity of the buffer is: 200
|
||||
The current size of the buffer is: 200
|
||||
The operational mode of the buffer is: 0
|
||||
The increment factor of the buffer is: 0
|
||||
The current mark of the buffer is: 200
|
||||
|
||||
Printing buffer contents:
|
||||
|
||||
Compilers are fundamental to modern computing.
|
||||
They act as translators, transforming human-oriented
|
||||
language into computer-oriented machine-language.
|
||||
A compiler allows virtually all compu
|
||||
|
||||
Printing buffer parameters:
|
||||
|
||||
The capacity of the buffer is: 201
|
||||
The current size of the buffer is: 201
|
||||
The operational mode of the buffer is: 0
|
||||
The increment factor of the buffer is: 0
|
||||
The current mark of the buffer is: 200
|
||||
|
||||
Printing buffer contents:
|
||||
|
||||
Compilers are fundamental to modern computing.
|
||||
They act as translators, transforming human-oriented
|
||||
language into computer-oriented machine-language.
|
||||
A compiler allows virtually all compuÿ
|
|
@ -1,41 +0,0 @@
|
|||
Reading file ass1.pls ....Please wait
|
||||
|
||||
Printing buffer parameters:
|
||||
|
||||
The capacity of the buffer is: 5085
|
||||
The current size of the buffer is: 319
|
||||
The operational mode of the buffer is: -1
|
||||
The increment factor of the buffer is: 15
|
||||
The current mark of the buffer is: 319
|
||||
|
||||
Printing buffer contents:
|
||||
|
||||
Compilers are fundamental to modern computing.
|
||||
They act as translators, transforming human-oriented
|
||||
language into computer-oriented machine-language.
|
||||
A compiler allows virtually all computer users to
|
||||
ignore the machine-dependent details of machine language.
|
||||
Isn't that nice? =:)
|
||||
|
||||
CST8152
|
||||
Autumn, 2016
|
||||
|
||||
Printing buffer parameters:
|
||||
|
||||
The capacity of the buffer is: 320
|
||||
The current size of the buffer is: 320
|
||||
The operational mode of the buffer is: -1
|
||||
The increment factor of the buffer is: 15
|
||||
The current mark of the buffer is: 319
|
||||
|
||||
Printing buffer contents:
|
||||
|
||||
Compilers are fundamental to modern computing.
|
||||
They act as translators, transforming human-oriented
|
||||
language into computer-oriented machine-language.
|
||||
A compiler allows virtually all computer users to
|
||||
ignore the machine-dependent details of machine language.
|
||||
Isn't that nice? =:)
|
||||
|
||||
CST8152
|
||||
Autumn, 2016ÿ
|
4
buffer.c
4
buffer.c
|
@ -239,7 +239,7 @@ short b_setmark(Buffer* const pBD, short mark) {
|
|||
- pBuffer const pBD
|
||||
* Return value: 1, 0
|
||||
*/
|
||||
int b_eob(Buffer* const pBD) {
|
||||
int b_eob(Buffer* const pBD) {
|
||||
if (!pBD) { return R_FAIL1; }
|
||||
return pBD->eob;
|
||||
}
|
||||
|
@ -379,7 +379,7 @@ int b_print(Buffer* const pBD) {
|
|||
/* Loads symbols from a file to the buffer
|
||||
* Author: Victor Fernandes, 040772243
|
||||
* Version: 0.0.1
|
||||
* Called functions: N/A
|
||||
* Called functions: fgetc, feof, b_addc
|
||||
* Parameters:
|
||||
- FILE* const fi
|
||||
- pBuffer const pBD
|
||||
|
|
|
@ -19,6 +19,7 @@ Isn't that nice? =:)
|
|||
|
||||
CST8152
|
||||
Autumn, 2016ÿ
|
||||
6
|
||||
|
||||
Printing buffer parameters:
|
||||
|
||||
|
@ -39,3 +40,4 @@ Isn't that nice? =:)
|
|||
|
||||
CST8152
|
||||
Autumn, 2016ÿÿ
|
||||
<EFBFBD>
|
||||
|
|
Loading…
Reference in New Issue