Thread: strtoul.c source code

  1. #1
    Registered User
    Join Date
    Dec 2002
    Posts
    2

    strtoul.c source code

    can someone write source code for strtoul (string to unsigned long)

    thanks

  2. #2
    Code Goddess Prelude's Avatar
    Join Date
    Sep 2001
    Posts
    9,897
    >can someone write source code for strtoul (string to unsigned long)
    Yes, I sure can.

    -Prelude
    My best code is written with the delete key.

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    I heard it's impossible Bet you can't really do it Prelude.


    dsugard : If you didn't spot the sarcasm, I say now there's plenty here What is it you're trying to do? Is this a homework thing? Whatever it is, try writing something yourself, and post your code when you have troubles with it, then people will be willing to help you.
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

  4. #4
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946
    hello, internet!

  5. #5
    Registered User
    Join Date
    May 2002
    Posts
    71
    u can find all the code to the inbuilt functions if u look in the program files of the MS visual studio..

    the header files are under the folder 'include'
    and the functions tend to be under CRT

  6. #6
    Registered User
    Join Date
    Dec 2002
    Posts
    2

    cvtIn[]

    to Moi and others,

    in the code given here http://tcl.apache.org/sources/tcl/compat/strtoul.c.html

    how come all non digit characters be mapped to value 100? also how many non digit characters would be know beforehand?

    static char cvtIn[] = {
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /* '0' - '9' */
    100, 100, 100, 100, 100, 100, 100, /* punctuation */
    10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 'A' - 'Z' */
    20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
    30, 31, 32, 33, 34, 35,
    100, 100, 100, 100, 100, 100, /* punctuation */
    10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 'a' - 'z' */
    20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
    30, 31, 32, 33, 34, 35};
    Last edited by dsugard; 12-04-2002 at 02:07 PM.

  7. #7
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946

    Re: cvtIn[]

    Originally posted by dsugard
    to Moi and others,

    in the code given here http://tcl.apache.org/sources/tcl/compat/strtoul.c.html

    how come all non digit characters be mapped to value 100? also how many non digit characters would be know beforehand?

    static char cvtIn[] = {
    0, 1, 2, 3, 4, 5, 6, 7, 8, 9, /* '0' - '9' */
    100, 100, 100, 100, 100, 100, 100, /* punctuation */
    10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 'A' - 'Z' */
    20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
    30, 31, 32, 33, 34, 35,
    100, 100, 100, 100, 100, 100, /* punctuation */
    10, 11, 12, 13, 14, 15, 16, 17, 18, 19, /* 'a' - 'z' */
    20, 21, 22, 23, 24, 25, 26, 27, 28, 29,
    30, 31, 32, 33, 34, 35};
    dood, read the fricking code. i'll even tell you: line 168 and 185 are good places to start.
    hello, internet!

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. How do you call another source code file?
    By nifear4 in forum C Programming
    Replies: 2
    Last Post: 10-28-2008, 12:16 PM
  2. 'Type' Error on Build of Officially Released Source Code
    By Jedi_Mediator in forum C++ Programming
    Replies: 5
    Last Post: 07-07-2008, 05:28 PM
  3. DxEngine source code
    By Sang-drax in forum Game Programming
    Replies: 5
    Last Post: 06-26-2003, 05:50 PM
  4. Lines from Unix's source code have been copied into the heart of Linux????
    By zahid in forum A Brief History of Cprogramming.com
    Replies: 13
    Last Post: 05-19-2003, 03:50 PM
  5. Source Code Beautifier
    By Hammer in forum A Brief History of Cprogramming.com
    Replies: 2
    Last Post: 05-05-2002, 09:21 PM