C equivalent to Perl CPAN

M

Malcolm Nooning

Is there a C equivalent to Perl CPAN? I am looking for C code that
will get the current time from a NIST server. That problem has to
have been solved already by hundreds of C programmers.
 
S

Stefan Ram

Malcolm Nooning said:
Is there a C equivalent to Perl CPAN?

None that I am aware of - except for different efforts by
individuals or organizations who maintain library
catalogues. But there is no /single/ outstanding central
catalogue such as CPAN, there is no »/the/ C library
catalogue«.

CPAN modules usually depend only on portable Perl (and,
possibly, other CPAN modules). In C, this would be much more
difficult, because one cannot do so much with portable C.
(Or, by a twist of the Englisch language, »... one can only
do so much with portable C.«.)
I am looking for C code that will get the current time from a
NIST server. That problem has to have been solved already by
hundreds of C programmers.

Did you try using a web search engine?

This, BTW, is an example of something that actually cannot
be done in portable C, because portable C does not have
means for TCP/IP communication. See also:

http://www.purl.org/stefan_ram/pub/c++_standard_extensions_en

FWIW: I would have an idea how to »embed« some TCP/IP into
standard C:

if( source = fopen( "HTTP://www.example.com", "r" ))...

or

if( source = fopen( "NTP:time.example.com", "r" ))...

, but, of course, that also is not portable, because not
every environment needs to support it.
 
K

Keith Thompson

Malcolm Nooning said:
Is there a C equivalent to Perl CPAN? I am looking for C code that
will get the current time from a NIST server. That problem has to
have been solved already by hundreds of C programmers.

http://ccan.ozlabs.org/, the Comprehensive C Archive Network,
attempts to be what you're asking for.
 
M

Malcolm Nooning

http://ccan.ozlabs.org/, the Comprehensive C Archive Network,
attempts to be what you're asking for.

--
Keith Thompson (The_Other_Keith) (e-mail address removed)  <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"

That is it! A very small variety so far, but, at least it is a start.
Thanks
 

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,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top