Search:

Type: Posts; User: darfader

Page 1 of 4 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    1,657

    oh dear, I think I'll go back to cabbing :(...

    oh dear,


    I think I'll go back to cabbing :(


    text is the input value that I want to change, I put (int)(sizeof(output->circuit_length) to ensure that the right amount of space was being...
  2. Replies
    3
    Views
    1,272

    thanks quzah, my schoolboy error of the day :( ...

    thanks quzah, my schoolboy error of the day :(


    thanks Dave, I'll use that ;)
  3. Replies
    4
    Views
    1,657

    sprintf values

    Hi,

    stuck on sprintf again....




    #define BUFFER_SIZE 2048

    void set_output_field(RecordOut * output, char * text, int field_number)
  4. Replies
    3
    Views
    1,272

    Number Validation

    Hi,

    I have to validate a number and my function isn't as good as I thought it was,



    ...snip

    typedef struct {
    char custcode [CUSTCODE_LEN];
  5. Replies
    8
    Views
    4,604

    yes Dave, it has worked for me too :D ...

    yes Dave, it has worked for me too :D

    sprintf(output->linkspeed, "%*d", LINKSPEED_LEN, atoi(input->linkspeed));

    what I did not try before, was the atoi() function :(


    thanks Dave,
  6. Replies
    8
    Views
    4,604

    sorry chaps to be so long replying, I was not...

    sorry chaps to be so long replying,

    I was not able to get sprintf to do it, so I had to do this,




    ...snip...
    memcpy(output->usernbr, spacer(right_justify(input->usernbr,...
  7. Replies
    8
    Views
    4,604

    stuck on sprintf again, (please note, that the...

    stuck on sprintf again,

    (please note, that the dots are spaces but do not appear in the post, these values are all eight characters from a fixed length file)


    I was hoping to change these...
  8. Replies
    15
    Views
    1,910

    wow so it is perfectly obvious that the...

    wow

    so it is perfectly obvious that the results I were getting was a fluke - not good

    if start is now a static, how does it know to traverse through the continuous cycle of slash delimiters, I...
  9. Replies
    2
    Views
    1,108

    your right, this has done it for me ...

    your right,

    this has done it for me




    #define ERROR_MESSAGE "EQ USERNBR INVALID - %s\n"
  10. Replies
    15
    Views
    1,910

    the filename is guarranteed to be 46 characters...

    the filename is guarranteed to be 46 characters long, [otherwise the program would have stopped before now] so the null is being place on the end,

    according to a printf statement I get the...
  11. Replies
    2
    Views
    1,108

    Placing values inside stings

    Hi,

    how do I incorporate a value inside a string ?



    strncpy(buffer, input.usernbr, USERNBR_LEN);
    buffer[USERNBR_LEN] = '\0';

    if(!isdigit(buffer) ||...
  12. Replies
    15
    Views
    1,910

    thanks Dave, I have added it too :) ...

    thanks Dave,

    I have added it too :)



    #define BUF_SIZE 256
    #define SITA_FILE_LENGTH 46

    char * get_filename(const char * path, char * buffer, size_t limit)
  13. Replies
    15
    Views
    1,910

    sorry twm, I put the declaration in the wrong...

    sorry twm, I put the declaration in the wrong header file and the char * buf was my schoolboy error of the day :(


    thanks
  14. Replies
    15
    Views
    1,910

    thanks Hammer I thought so, sorry twm, I...

    thanks Hammer I thought so,

    sorry twm, I cannot get your function to work



    int main(int argc, char *argv[])
    {
    <snip>
    char * filename_only;
  15. Replies
    15
    Views
    1,910

    Filename only wanted

    Hi,

    is there a standard function for removing paths from filenames ?

    printf("filename [%s]\n", argv[1]);
    /root/mydir/myfile.dat

    I only want the filename myfile.dat, so do I have to work it...
  16. Replies
    8
    Views
    4,604

    excellent :D thanks twm

    excellent :D


    thanks twm
  17. Replies
    8
    Views
    4,604

    trunc function

    Hi,




    char format[64] = "1.51480724077861e-03";
    char buffer[64] = "";
    int number = 0;

    printf("format [%s]\n", format);
  18. Replies
    4
    Views
    1,236

    thanks Dave, that knocks mine into a cocked...

    thanks Dave,

    that knocks mine into a cocked hat :)
  19. Replies
    4
    Views
    1,236

    sure before

    sure



    before
    <more here>;P;LL;LN;0.00;2.40;;30/9/1998 00:00:00;;;;213.16;<more here>
    <more here>;P;LL;LN;0.00;9.60;;17/6/1997 00:00:00;;;;303.29;<more here>
    <more...
  20. Replies
    4
    Views
    1,236

    Formatting Dates

    Hi,

    I have to alter the format of a date in a string and have written this...



    char process_date(FILE ** p_fp, char c)
    {
    char format[11];
    int index = 0;
  21. Thread: Syntax Style

    by darfader
    Replies
    2
    Views
    1,024

    thanks velius :)

    thanks velius

    :)
  22. Thread: Syntax Style

    by darfader
    Replies
    2
    Views
    1,024

    Syntax Style

    Hi,

    just a question of style, am I right in thinking these two are the same

    *(my_array) = NULL;
    my_array[0] = NULL;

    and these two

    *(my_array + i) = NULL;
  23. Replies
    8
    Views
    2,502

    because if the stream argument is NULL, fflush ...

    because if the stream argument is NULL, fflush flushes all open output streams, or so I thought ;)
  24. Replies
    8
    Views
    2,502

    Hi Dave, I was hoping to make a program that...

    Hi Dave,

    I was hoping to make a program that would be easier for the next maintenace programmer to follow,

    I have an enumeration


    #ifndef CIRP_ENUMERATION_H
    #define CIRP_ENUMERATION_H
  25. Replies
    8
    Views
    2,502

    case TOTAL_USD: sprintf(temp_buffer,...

    case TOTAL_USD:
    sprintf(temp_buffer, "%030.3f", atof(text));
    memcpy(output->total_usd, temp_buffer, (O_TOTAL_USD_LEN + 1));
    printf("before [%s]\n", text);
    printf("after [%s]\n",...
Results 1 to 25 of 93
Page 1 of 4 1 2 3 4