OPENING OF .chm or .html file in C?

Discussion in 'C Programming' started by BHARAT MEHTA, Apr 10, 2006.

  1. BHARAT MEHTA

    BHARAT MEHTA Guest

    Hi,
    I neeed help from you guys in solving a problem.I have a project where
    I need to open a
    ".chm" or ".html" file through C.Can anyone tell me how to do this in
    C? I mean how to run that file through my Turbi C compiler based
    program
     
    BHARAT MEHTA, Apr 10, 2006
    #1
    1. Advertising

  2. BHARAT MEHTA wrote:
    > Hi,
    > I neeed help from you guys in solving a problem.I have a project where
    > I need to open a
    > ".chm" or ".html" file through C.Can anyone tell me how to do this in
    > C? I mean how to run that file through my Turbi C compiler based
    > program


    Not very topical here...

    system("start whateverfile.chm");
     
    Vladimir S. Oka, Apr 10, 2006
    #2
    1. Advertising

  3. BHARAT MEHTA

    Pedro Graca Guest

    BHARAT MEHTA wrote:
    > I neeed help from you guys in solving a problem.I have a project where
    > I need to open a
    > ".chm" or ".html" file through C.


    fopen() comes to mind.

    > Can anyone tell me how to do this in
    > C? I mean how to run that file through my Turbi C compiler based
    > program


    What do you mean "run a file through the compiler based program"?

    --
    If you're posting through Google read <http://cfaj.freeshell.org/google>
     
    Pedro Graca, Apr 10, 2006
    #3
  4. BHARAT MEHTA

    CBFalconer Guest

    Pedro Graca wrote:
    > BHARAT MEHTA wrote:
    >
    >> I neeed help from you guys in solving a problem.I have a
    >> project where I need to open a ".chm" or ".html" file through C.

    >
    > fopen() comes to mind.
    >
    >> Can anyone tell me how to do this in
    >> C? I mean how to run that file through my Turbi C compiler
    >> based program

    >
    > What do you mean "run a file through the compiler based program"?


    All C files are fundamentally streams of char. So:

    int ch;

    while (EOF != (ch = getc(f))) {
    /* do unspeakable things with ch */
    }

    should handle it. This is known as a filter.

    --
    "If you want to post a followup via groups.google.com, don't use
    the broken "Reply" link at the bottom of the article. Click on
    "show options" at the top of the article, then click on the
    "Reply" at the bottom of the article headers." - Keith Thompson
    More details at: <http://cfaj.freeshell.org/google/>
    Also see <http://www.safalra.com/special/googlegroupsreply/>
     
    CBFalconer, Apr 10, 2006
    #4
  5. [snips]

    On Mon, 10 Apr 2006 04:29:01 -0700, Vladimir S. Oka wrote:

    > Not very topical here...
    >
    > system("start whateverfile.chm");


    Hmm. All I get is:

    bash: start: command not found
     
    Kelsey Bjarnason, Apr 11, 2006
    #5
  6. Kelsey Bjarnason opined:

    > [snips]
    >
    > On Mon, 10 Apr 2006 04:29:01 -0700, Vladimir S. Oka wrote:
    >
    >> Not very topical here...
    >>
    >> system("start whateverfile.chm");

    >
    > Hmm. All I get is:
    >
    > bash: start: command not found


    That's because you're not the OP, who's running on Windows.

    --
    Rule of Feline Frustration:
    When your cat has fallen asleep on your lap and looks utterly
    content and adorable, you will suddenly have to go to the bathroom.

    <http://clc-wiki.net/wiki/Introduction_to_comp.lang.c>
     
    Vladimir S. Oka, Apr 11, 2006
    #6
  7. BHARAT MEHTA

    Barry Guest

    "Vladimir S. Oka" <> wrote in message
    news:...
    >
    > BHARAT MEHTA wrote:
    > > Hi,
    > > I neeed help from you guys in solving a problem.I have a project where
    > > I need to open a
    > > ".chm" or ".html" file through C.Can anyone tell me how to do this in
    > > C? I mean how to run that file through my Turbi C compiler based
    > > program

    >
    > Not very topical here...
    >
    > system("start whateverfile.chm");
    >


    Not really the correct answer either.
     
    Barry, Apr 13, 2006
    #7
  8. BHARAT MEHTA

    pinkfog Guest

    Kelsey Bjarnason wrote:
    > [snips]
    >
    > On Mon, 10 Apr 2006 04:29:01 -0700, Vladimir S. Oka wrote:
    >
    > > Not very topical here...
    > >
    > > system("start whateverfile.chm");

    >
    > Hmm. All I get is:
    >
    > bash: start: command not found

    maybe you can write a batch file:
    start *.chm

    call the batch file in your prgm using system() function.Hope it can
    help.
     
    pinkfog, Apr 13, 2006
    #8
  9. Barry wrote:
    > "Vladimir S. Oka" <> wrote in message
    > news:...
    > >
    > > BHARAT MEHTA wrote:
    > > > Hi,
    > > > I neeed help from you guys in solving a problem.I have a project where
    > > > I need to open a
    > > > ".chm" or ".html" file through C.Can anyone tell me how to do this in
    > > > C? I mean how to run that file through my Turbi C compiler based
    > > > program

    > >
    > > Not very topical here...
    > >
    > > system("start whateverfile.chm");
    > >

    >
    > Not really the correct answer either.


    Depends on what the OP really wants, and that wasn't clear at all.

    I made a stab at answering what I guessed was the question. <OT>On a
    Windows system (from Win95 onwards), the above will "open a [.chm] file
    through C" in its default registered application.</OT>

    OP is free to provide better explanation, and may then get a
    better/different answer.
     
    Vladimir S. Oka, Apr 13, 2006
    #9
    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. =?iso-8859-2?B?TOl0ZXr1?=

    HTML Help (CHM) file for Python 2.2.3

    =?iso-8859-2?B?TOl0ZXr1?=, Jul 12, 2003, in forum: Python
    Replies:
    1
    Views:
    373
    Jarek Zgoda
    Jul 12, 2003
  2. Christian Wilcox

    RE: Help, *.CHM, etc -> *nix .chm viewer

    Christian Wilcox, Jan 21, 2004, in forum: Python
    Replies:
    1
    Views:
    418
    Markus Wankus
    Jan 21, 2004
  3. sunil
    Replies:
    1
    Views:
    1,915
    Juan T. Llibre
    Jan 27, 2007
  4. BHARAT MEHTA

    Opening of .chm files

    BHARAT MEHTA, Mar 28, 2006, in forum: C Programming
    Replies:
    2
    Views:
    300
    Richard Bos
    Mar 28, 2006
  5. Andre Linoge

    CHM question Maximise the chm file

    Andre Linoge, May 11, 2012, in forum: HTML
    Replies:
    0
    Views:
    637
    Andre Linoge
    May 11, 2012
Loading...

Share This Page