[NBLUG/talk] OT: Primes revisited

ME dugan at passwall.com
Fri Jun 6 11:16:01 PDT 2003


If you are asking how to have a web page run the compiled C program, then
that depends upon the web server you are using.

For apache, check out the
<!--#exec cmd="path/to/c-program-here" -->
when used with a server that has been enabled to use SSI and server parsed
html.

----

When you place a file onto a web server shared dir, the extention will
often map to a specific MIME type. (.txt = text/plain, .htm/.html
text/html) It is easy enough to map an extention for .c to be of type
text/x-csrc.

Then when a web browser gets a file and "sees" that it is of type
"text/x-csrc" the OS and the web browser can choose to handle that however
it should want to deal with it.

In the case of the file provided, the file is not coded as HTML, but is
served over HTTP.

If you wish to provide code samples within HTML, a common practice is to
use the <pre> or <tt> tags to use fixed-width fonts (or request used of
fixed width fonts)

The extention often dictates how the file is served and then how the
client might deal with the file.


Micxz (lovedialup.com) said:
> May I ask how you embed C code in html?
>
> Micxz
>
> Steve Zimmerman wrote:
>>
>> Special thanks to Rob Orsini for fixing my primes problem.
>>
>> How do I get rid of those vertical ellipses that you see at
>> http://www.sonic.net/stevetux/prime2.c?  Do I need to embed
>> the program in HTML?
>>
>> Thanks.
>>
>>         -- Steve Zimmerman
>>
>> _______________________________________________
>> talk mailing list
>> talk at nblug.org
>> http://nblug.org/mailman/listinfo/talk
> _______________________________________________
> talk mailing list
> talk at nblug.org
> http://nblug.org/mailman/listinfo/talk
>
>




More information about the talk mailing list