some new intresting c programs

B

Barry Schwarz

some new intresting c programs visit
http://cpp4students.blogspot.com/

Don't waste your time unless you really want to deal with a ton of
readability and non-standard issues.

Typical problems include:

proprietary headers
#include<dos.h>
#include<dir.h>
#include<conio.h>

barely readable declarations:
struct frame
{
struct line *ln; /* all lines */
char fileName[64];
int cX, cY, /* current curser X and Y */
sX1, sX2, sY1, sY2, /* selection parameters */
sL, sC, /* starting line and column on the screen */
SHP, SVP, /* scrolling horizontal and vertical pointer */
noOfLines, maxOfCols, /* max no.of lines and columns */
saved;
} frm[MAXFILES];

equally hard to read code:
void InitMouse()
{
union REGS r;
r.x.ax=0x0, int86(0x33, &r, &r);
}

non-standard types and functions:
union REGS
int86(0x33, &r, &r)
gotoxy(...)
textcolor(...)
kbhit(...)

and my favorite pet peeve - barely an indent in sight:
void InitNewFile()
{
fI=NoOfFrame++;
CX= CY= SX1= SY1= SX2= SY2= SL= SC=0;
frm[fI].saved= MOC= NOL=1;
frm[fI].ln=(struct line *)malloc(sizeof(struct line));
if(!frm[fI].ln)
LackOfMemory();
LINEDATA=(char *)malloc(sizeof(char));
if(!LINEDATA)
LackOfMemory();
LINEDATA[0]='\0';
LINELEN=1;
}

To top it all off, everything appears to be stored as a Microsoft Word
..doc file.
 
R

raashid bhatt

some new intresting c programs visithttp://cpp4students.blogspot.com/

common man its 2008 today we dont want to create COM programs.. try
some WIN32 API programs
 
K

Keith Thompson

raashid bhatt said:
common man its 2008 today we dont want to create COM programs.. try
some WIN32 API programs

But not here, please. There are newsgroups where they actually want
to disucss Win32 API programs; this isn't one of them.
 
B

Barry Schwarz

common man its 2008 today we dont want to create COM programs.. try
some WIN32 API programs

Surely you don't believe that every web site that ends in .com deals
exclusively with COM programs. You are posting from gmail.com and
obviously don't.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,053
Latest member
BrodieSola

Latest Threads

Top