Thread: Question about function code

  1. #1
    .........
    Join Date
    Nov 2002
    Posts
    303

    Question about function code

    Hi, I was curious if anyone knows where I can find code for library functions like printf() or fgets() etc. I was able to find the header files but not the actual code that shows how the functions are made.

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    They lie compiled inside library (*.lib) files, unreachable from people like us .
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    ....
    Join Date
    Aug 2001
    Location
    Groningen (NL)
    Posts
    2,380
    The GNU C compiler is open source. At www.delorie.com/djgpp you can find ports of GCC and also download the source code. Or, ofcourse, you can look at www.gnu.org.

  4. #4
    .........
    Join Date
    Nov 2002
    Posts
    303
    Thanks Alot

  5. #5
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    why isnt it in assembly? how can c code write c code if theres no assembly to start with?


    i think im starting to question it to much......................

  6. #6
    Casual Visitor
    Join Date
    Oct 2001
    Posts
    350
    A cross compiler ?

  7. #7
    Registered User
    Join Date
    Jul 2002
    Posts
    913
    i mean how can the foundation of c code be c code? it couldnt of invented its self. why is it that the zip file has c code and not assembly?

  8. #8
    Registered User Cela's Avatar
    Join Date
    Jan 2003
    Posts
    362
    >>i mean how can the foundation of c code be c code? it couldnt of invented its self.
    A compiler can be written in C since all it does is parse a text file and convert it to an executable. The fact that the text file contain C source doesn't matter :-)
    *Cela*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. dllimport function not allowed
    By steve1_rm in forum C++ Programming
    Replies: 5
    Last Post: 03-11-2008, 03:33 AM
  2. Calling a Thread with a Function Pointer.
    By ScrollMaster in forum Windows Programming
    Replies: 6
    Last Post: 06-10-2006, 08:56 AM
  3. Please Help - Problem with Compilers
    By toonlover in forum C++ Programming
    Replies: 5
    Last Post: 07-23-2005, 10:03 AM
  4. Request for comments
    By Prelude in forum A Brief History of Cprogramming.com
    Replies: 15
    Last Post: 01-02-2004, 10:33 AM
  5. I need help with passing pointers in function calls
    By vien_mti in forum C Programming
    Replies: 3
    Last Post: 04-24-2002, 10:00 AM