Click to See Complete Forum and Search --> : where can we download header files related to turbo C compiler
DEVILSAN
02-02-2006, 03:11 AM
where can we download header files related to turbo C compiler
i need to download protocol.h for creating program on Sliding Windows protocols
Saraswathi
09-06-2007, 02:36 AM
You can download from this site http://www.pitt.edu/~stephenp/misc/downloadTC.html
Or here (http://gift.sourceforge.net/docs/0.11.x/libgiftproto/protocol_8h-source.html)
Sharma_arbind12
10-28-2007, 01:08 AM
how to download protocol.h
where can we download header files related to turbo C compiler
i need to download protocol.h for creating program on Sliding Windows protocols
Did you try the link in Post #2 or 3?
vkiller
12-05-2007, 03:26 AM
hi,
is there a header file such as system.h? I am using Borland Turbo C++ ver 1.01 (DOS) And also could you tell me which header file to use for accessing system timers, queues etc. And I am working on creating a discrete event driven disk simulator in C..
thanks
I did some Goggling and couldn't find a system.h mentioned for Borland Turbo C++
If there was such a file, wouldn't it come with the software when you purchased it?
vkiller
12-05-2007, 01:20 PM
I did too! But couldn't find any. Infact someone suggested to include this file in order to access system timers, queues functions. Any suggestions as to which header file(s) I could use.
Thanks
Well, that someone is correct, which is why I find it difficult to believe it was included with the product.
If you (and I did) Goggle "system.h" you will get returns. The reason I didn't post any links to any of these returns is that I don't know if what is out there will work in Borland Turbo C++ - do the Goggle thing for yourself and see if anything comes back that you can use.
vkiller
12-05-2007, 05:41 PM
i think the file that i was looking for might be this. sys/timeb.h. found this through help. thanks. I am workring on a program that can simulate an array of disks and from an event list, record their mean time to failure (mttf), mean time to repair(mttr) and stop the program when it encounters dataloss. so we would also need to record the mean time to data loss (mttdl).
I wrote the following code by converting a perl code into c with help from a friend. in the bottom part of the code you would see ************** beyond that we have all perl code. needs to be done in C. Need to work on the nextevent() function. In the perl code, it is asking for three values- my $thistime, my $thistype, my $thisdisk. I think if we make 2 variables global, we can get $disk. Rest 2 variables are already in the global category. Please note that 'keys' and 'shift' are perl functions working on associative arrays, We have to find a way around those too.All $ variables are perl so it means that code is untouched.
#include <stdio.h>
#include <string.h>
// #include <system.h>
#include <stdlib.h>
#include <conio.h>
#include <dos.h>
#include <sys\timeb.h>
float clock = 0.0; //time
float evtype[10][10];
float evdisk[10][10];
int duration = 1000000000; //10^9
int status[100]; // array
int losscount = 0;
char type = 'E'; // error code
main()
{
int disk;
float lambda;
float mu, mttdl;
int mttf, mttr;
status[0]=1;
status[1]=1;
// int disk;
printf("Enter disk MTTF (hours): ");
scanf("%d", &mttf);
printf("Enter disk MTTR (hours): ");
scanf("%d", &mttr);
lambda = 1/mttf;
mu = 1/mttr;
printf("Disk failure rate : %f \n", lambda);
printf("Disk repair rate : %f \n", mu);
printf("Simulation duration: %d \n", duration);
/*
schedule(duration, "X", 2);
schedule(exponential(lambda), "F", 0);
do {
(clock, type, disk) = &nextevent; //needs looking into
if (type == "F") {
// disk failure
failure(disk);
} elsif (type == "R") {
// disk repair
repair(disk)
} # if-else
} while (type != "X"); // do-while
*/
//closing
printf("SIMULATION RESULTS:\n");
printf("Number of data losses is %d \n", losscount);
mttdl = duration/losscount;
printf("Rough estimate of MTTF is %f \n", mttdl); // end of simulation
// }
failure(failed)
int failed;
{
// extract disk ID
status[failed] = 0;
printf("Disk %d failed at time %f.\n", failed, clock);
// check for data loss
if (status[1 - failed] == 0) {
losscount++;
print("Data loss at time %f.\n", clock);
} // if
schedule(clock + exponential(mu), "R", failed);
} // failure
\\*************************************************************************
repair(repaired)
int repaired;
{
//(my $repaired) = @_; // extract disk ID
status[repaired] = 1;
printf("Disk %d was repaired at time %d.\n", repaired, clock);
schedule(clock + exponential(lambda), "F", repaired);
} // repair
/*schedule(thistime, thistype, thisdisk)
float thistime;
char thistype;
int thisdisk;
{
//extract three parameters
//(my $thistime, my $thistype, my $thisdisk) = @_;
$evtype{$thistime} = $thistype; //pascal associative array
$evdisk{$thistime} = $thisdisk; //pascal associative array
} // schedule
nextevent() {
int skeys[];
int thattime, thattype, thatdisk;
my @skeys =
sort{$a <=> $b} (keys %evtype);
my $thattime = shift(@skeys);
my $thattype = $evtype{$thattime};
my $thatdisk = $evdisk{$thattime};
delete($evtype{$thattime});
delete($evdisk{$thattime});
($thattime, $thattype, $thatdisk);
} nextevent
exponential() {
(my $rate) = @_;
- log(rand(1))/$rate;
} // exponential
*/
vkiller
12-05-2007, 05:44 PM
i think the file that i was looking for might be this. sys/timeb.h. found this through help. thanks. I am workring on a program that can simulate an array of disks and from an event list, record their mean time to failure (mttf), mean time to repair(mttr) and stop the program when it encounters dataloss. so we would also need to record the mean time to data loss (mttdl).
I wrote the following code by converting a perl code into c with help from a friend. in the bottom part of the code you would see ************** beyond that we have all perl code. needs to be done in C. Need to work on the nextevent() function. In the perl code, it is asking for three values- my $thistime, my $thistype, my $thisdisk. I think if we make 2 variables global, we can get $disk. Rest 2 variables are already in the global category. Please note that 'keys' and 'shift' are perl functions working on associative arrays, We have to find a way around those too.All $ variables are perl so it means that code is untouched.
#include <stdio.h>
#include <string.h>
// #include <system.h>
#include <stdlib.h>
#include <conio.h>
#include <dos.h>
#include <sys\timeb.h>
float clock = 0.0; //time
float evtype[10][10];
float evdisk[10][10];
int duration = 1000000000; //10^9
int status[100]; // array
int losscount = 0;
char type = 'E'; // error code
main()
{
int disk;
float lambda;
float mu, mttdl;
int mttf, mttr;
status[0]=1;
status[1]=1;
// int disk;
printf("Enter disk MTTF (hours): ");
scanf("%d", &mttf);
printf("Enter disk MTTR (hours): ");
scanf("%d", &mttr);
lambda = 1/mttf;
mu = 1/mttr;
printf("Disk failure rate : %f \n", lambda);
printf("Disk repair rate : %f \n", mu);
printf("Simulation duration: %d \n", duration);
/*
schedule(duration, "X", 2);
schedule(exponential(lambda), "F", 0);
do {
(clock, type, disk) = &nextevent; //needs looking into
if (type == "F") {
// disk failure
failure(disk);
} elsif (type == "R") {
// disk repair
repair(disk)
} # if-else
} while (type != "X"); // do-while
*/
//closing
printf("SIMULATION RESULTS:\n");
printf("Number of data losses is %d \n", losscount);
mttdl = duration/losscount;
printf("Rough estimate of MTTF is %f \n", mttdl); // end of simulation
// }
failure(failed)
int failed;
{
// extract disk ID
status[failed] = 0;
printf("Disk %d failed at time %f.\n", failed, clock);
// check for data loss
if (status[1 - failed] == 0) {
losscount++;
print("Data loss at time %f.\n", clock);
} // if
schedule(clock + exponential(mu), "R", failed);
} // failure
\\*************************************************************************
repair(repaired)
int repaired;
{
//(my $repaired) = @_; // extract disk ID
status[repaired] = 1;
printf("Disk %d was repaired at time %d.\n", repaired, clock);
schedule(clock + exponential(lambda), "F", repaired);
} // repair
/*schedule(thistime, thistype, thisdisk)
float thistime;
char thistype;
int thisdisk;
{
//extract three parameters
//(my $thistime, my $thistype, my $thisdisk) = @_;
$evtype{$thistime} = $thistype; //pascal associative array
$evdisk{$thistime} = $thisdisk; //pascal associative array
} // schedule
nextevent() {
int skeys[];
int thattime, thattype, thatdisk;
my @skeys =
sort{$a <=> $b} (keys %evtype);
my $thattime = shift(@skeys);
my $thattype = $evtype{$thattime};
my $thatdisk = $evdisk{$thattime};
delete($evtype{$thattime});
delete($evdisk{$thattime});
($thattime, $thattype, $thatdisk);
} nextevent
exponential() {
(my $rate) = @_;
- log(rand(1))/$rate;
} // exponential
*/
vkiller
12-05-2007, 05:50 PM
any help would be appreciated! thanks
So, I'm reading through this and I'm a bit lost with respect to what your question is.
goutham
02-12-2008, 02:37 PM
where can we download header files related to turbo C compiler
i need to download sys/loadavg.h
Did you try the link in post #2?
Brad Jones
02-20-2008, 02:58 PM
You can also find the Turbo C/C++ files on the CodeGear site (Codegear is a spin off of Borland). The following page would be one to try:
http://dn.codegear.com/article/21751
devx.com
Copyright WebMediaBrands Inc. All Rights Reserved