#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    217
    Rep Power
    0

    Library Function Source


    Is there any way to get the source for library functions ? I'm just interested in what it would take to write all functions for yourself.
  2. #2
  3. not a fan of fascism (n00b)
    Devshed Frequenter (2500 - 2999 posts)

    Join Date
    Feb 2003
    Location
    ct
    Posts
    2,756
    Rep Power
    95
    yes, im assuming your in windows using MSVS, browse to:
    Program Files\Microsoft Visual Studio\VC98\Include\

    in *nix: /usr/include
    Last edited by infamous41md; September 8th, 2003 at 07:36 PM.
  4. #3
  5. Banned ;)
    Devshed Supreme Being (6500+ posts)

    Join Date
    Nov 2001
    Location
    Woodland Hills, Los Angeles County, California, USA
    Posts
    9,648
    Rep Power
    4248
    Ahem, include != lib
    The files in the include dirs are the header files, which contain mostly function prototypes and #define constants. If you're looking for the actual library source, here's where you need to go:

    Visual C++:
    Program Files\Microsoft Visual Studio\VC98\MFC\SRC

    *BSD:
    /usr/src/lib/libc

    Linux:
    Look in your distro CD set to see if they include the source RPMs (SRPMS) or download the sources for gcc's libc from the web.

    Hope this helps :)
    Up the Irons
    What Would Jimi Do? Smash amps. Burn guitar. Take the groupies home.
    "Death Before Dishonour, my Friends!!" - Bruce D ickinson, Iron Maiden Aug 20, 2005 @ OzzFest
    Down with Sharon Osbourne

    "I wouldn't hire a butcher to fix my car. I also wouldn't hire a marketing firm to build my website." - Nilpo
  6. #4
  7. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2003
    Posts
    68
    Rep Power
    12
    Just so you're prepared, the source for VC++ libraries has a tendency to be fugly.
  8. #5
  9. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    217
    Rep Power
    0
    cool thanks i'll take a look :)
  10. #6
  11. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2003
    Posts
    217
    Rep Power
    0
    What file would have lets say... the printf() source ?
  12. #7
  13. *bounce*
    Devshed Novice (500 - 999 posts)

    Join Date
    Jan 2002
    Location
    Delft, The Netherlands
    Posts
    514
    Rep Power
    42
    OpenBSD's implementation of printf can be found at ftp://ftp.openbsd.org/pub/OpenBSD/sr...stdio/printf.c. As you can see, it's basically just a wrapper for vfprintf, which you can find in the same FTP directory, i.e., at ftp://ftp.openbsd.org/pub/OpenBSD/sr...dio/vfprintf.c.

    I doubt Microsoft will let you look at their implementation, but since I'm not too familiar with Windows programming, I might very well be wrong.

    Have fun! :D
    "A poor programmer is he who blames his tools."
    http://analyser.oli.tudelft.nl/

IMN logo majestic logo threadwatch logo seochat tools logo