some new intresting c programs

Discussion in 'C Programming' started by yassu, Aug 3, 2008.

  1. yassu

    yassu Guest

    yassu, Aug 3, 2008
    #1
    1. Advertising

  2. On Sun, 3 Aug 2008 00:13:16 -0700 (PDT), yassu
    <> wrote:

    >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.

    --
    Remove del for email
     
    Barry Schwarz, Aug 3, 2008
    #2
    1. Advertising

  3. On Aug 3, 12:13 am, yassu <> wrote:
    > 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
     
    raashid bhatt, Aug 3, 2008
    #3
  4. raashid bhatt <> writes:
    > On Aug 3, 12:13 am, yassu <> wrote:
    >> 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


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

    --
    Keith Thompson (The_Other_Keith) <http://www.ghoti.net/~kst>
    Nokia
    "We must do something. This is something. Therefore, we must do this."
    -- Antony Jay and Jonathan Lynn, "Yes Minister"
     
    Keith Thompson, Aug 3, 2008
    #4
  5. On Sun, 3 Aug 2008 05:38:00 -0700 (PDT), raashid bhatt
    <> wrote:

    >On Aug 3, 12:13 am, yassu <> wrote:
    >> 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


    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.

    --
    Remove del for email
     
    Barry Schwarz, Aug 4, 2008
    #5
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. gopal srinivasan
    Replies:
    3
    Views:
    409
    Rolf Kemper
    Oct 28, 2004
  2. Replies:
    12
    Views:
    1,672
    Dave Thompson
    Jan 10, 2005
  3. Coca
    Replies:
    7
    Views:
    754
    Aidan Grey
    Aug 24, 2004
  4. Replies:
    18
    Views:
    638
    Dave Thompson
    Jan 10, 2005
  5. dolphin
    Replies:
    3
    Views:
    373
    rossum
    Mar 9, 2007
Loading...

Share This Page