Search:

Type: Posts; User: Richardcavell

Search: Search took 0.00 seconds.

  1. Replies
    17
    Views
    4,511

    Now come on, Tater, you're making fun of me.

    Now come on, Tater, you're making fun of me.
  2. Replies
    17
    Views
    4,511

    You sure? I think safeprint is safe for strings...

    You sure? I think safeprint is safe for strings that include %s.

    Richard
  3. Replies
    17
    Views
    4,511

    Won't it choke if you do: safeprintf (...

    Won't it choke if you do:

    safeprintf ( __FILE__ , __LINE__ , "I am now 25% better at programming C." ) ;

    owing to the % in the string?
  4. Replies
    17
    Views
    4,511

    Behold my masterpiece. safeprint () is a special...

    Behold my masterpiece. safeprint () is a special case when there's just a string. safeprintf () works the same as printf ().



    #include <stdio.h>
    #include <string.h>
    #include <stdarg.h>
    ...
  5. Replies
    17
    Views
    4,511

    Now, as to the variadic function question, It...

    Now, as to the variadic function question,

    It doesn't seem possible to do something like:



    int safeprint ( char* string , ... )
    {
    printf ( string , ... )
    }
  6. Replies
    17
    Views
    4,511

    If ErrorMessage() fails, it returns -1. My...

    If ErrorMessage() fails, it returns -1. My program gracefully shuts down, letting go of all resources it's borrowed so far.
  7. Replies
    17
    Views
    4,511

    Mate, I know I'm over the top. Maybe it's...

    Mate, I know I'm over the top. Maybe it's obsessive-compulsive disorder. If there's a potential error that goes unchecked I can't concentrate on anything else until it's checked.

    I'd like to...
  8. Replies
    17
    Views
    4,511

    Variadic function

    Hi everyone. I'm trying to create a function called 'safeprint' which will always check whether the string to be printed actually made it out to the screen. It should be called like this:

    int...
Results 1 to 8 of 9