Open main menu

CDOT Wiki β

Changes

BIOF 20101 (AS1) - OOP344

603 bytes added, 13:47, 24 February 2010
m
Due date - deleted comma from due date
Each student must complete at least one of Simple Functions individually and commit it to the repository and take part in completion of at least ?? Complex Functions.
= Basic Input Output Function Set V1.01=
V1.1: added '''"int readonly"''' flag to the arguments of bio_edit() function.
== Due date ==
Due date: ???Feb 25 @ 23:59 <big> biomain.c V0.8 is released svn://zenit.senecac.on.ca/oop344/trunk/biomain.c</big>
== File Names ==
Save your work in biof.h for the header file and biof.c for the source of the library.<br/>
The test main will be is released as bioftestbiomain.c;<big> svn://zenit.senecac.on.ca/oop344/trunk/biomain.c<br /></big>
The functions in BIOF all share the same prefix '''''bio'''''.
 
The working sample of the biomain.c is on matrix.
login to your matrix account using putty and make sure you set your Terminal/Keyboard to Xterm R6.
 
then type:
<big>
~fardad.soleimanloo/biof
</big>
 
the biomain.c should run.
== Simple Functions ==
Note that the conditions of termination are changed if '''“IsTextEditor”''' flag is true (non-zero). See '''“IsTextEditor”''' section for detail.
If '''"ReadOnly"''' has a true value (non-zero) then any attempt to change the content of '''"str"''' should be ignoredend the function and return the key . Note that all other keys should work. (Function and Non-ASCII keys). This make the '''bio_edit()''' funciton "read only", but still user can scroll the text to left or right and etc....
The function returns an int identifying the key that was pressed to exit. (This function uses the same key codes as bio_getch())
Say the installation is done in '''X:\Borland\BCC55''' <br />
Create a file called '''bcc32.cfg''' in '''X:\Borland\BCC55\Bin''' and add the following two lines to it:
<prebig -I"X:\Borland\Bcc55\include" -L"X:\Borland\Bcc55\lib" </prebig>
Create another file called '''ilink32.cfg''' in '''X:\Borland\BCC55\Bin''' and add the following line to it:
<prebig -L"X:\Borland\Bcc55\lib" </prebig>
Then add '''X:\Borland\BCC55\Bin''' to the system path:<br />
Vista:
Compile your code as:
<prebig > bcc32 as1testerbiomain.c ciolbiof.c</big>
</pre>You must restart your computer for changes to take affect!
'''Happy Compiling!'''
To compile using gcc issue the following command:<br />
<prebig> gcc as1testerbiomain.c ciolbiof.c -lncurses</prebig>
or
<prebig> cc as1testerbiomain.c ciolbiof.c -lncurses</prebig>
'''Also make sure you use [http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html Putty]for your telnet client and set the Temminal/keyboard / function keys to Xterm R6'''
Mac OS, being a Unix base operating system, supports curses library. So if you follow the case study in the book (the one written for AIX)it should work on Mac too.<br />
<big>
cc biomain.c biof.c -lcurses
</big>
== How to submit your assignment ==
Close to the due date of the assignment, I will release a tester program called'''"bioftestbiomain.c"'''. This program uses your functions and does series of tests. Each test will use your functions to produce an output or perform an action. If all the output is produced or the action is performed as stated in the tester program, branch the trunk to tags under as1. Then send me an email to checkout as1 and mark it. latest commit to as1 in tags indicates the time of submission and has to be before the due date/time.
=== Late Submission Penalty ===
10% Per day (Saturday and Sunday) counted as one day.
1
edit