Search:

Type: Posts; User: spank

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    47,491

    #include #include ...

    #include <fcntl.h>
    #include <sys/wait.h>
    #include <sys/types.h>
    #include <stdio.h>
    #include <unistd.h>
    #include <stdlib.h>

    int main(int argc, char *argv[])
    {
    int pid, status;
  2. Replies
    13
    Views
    47,491

    #include #include ...

    #include <fcntl.h>
    #include <sys/wait.h>
    #include <sys/types.h>
    #include <stdio.h>
    #include <unistd.h>
    #include <stdlib.h>

    int main(int argc, char *argv[])
    {
    int pid, status;
  3. Replies
    13
    Views
    47,491

    yap!

    yap!
  4. Replies
    13
    Views
    47,491

    Redirect stdout using dup

    int main(int argc, char *argv[])
    {
    int f = open("test.txt", O_CREAT|O_RDWR, 0666);
    int out=dup(1);

    if(f==-1)
    perror("open()");

    dup2(f, 1);
  5. Replies
    1
    Views
    16,552

    Creating C# server/client

    Hello,

    Please be patient with me and have in mind I don't have no C# experience. I'm quite experimented when it comes to plain C but C# isn't my deal.
    I want to create 2 small applications one...
  6. Thread: MPI question

    by spank
    Replies
    1
    Views
    1,313

    MPI question

    I don't know if this is the right forum to ask a MPI question but is the best I could find.

    I have the following problem:



    ....
    MPI_Irecv(buffer, sizeof(struct pachet_s), MPI_CHAR,...
  7. Replies
    75
    Views
    24,425

    I believe the constant is BUFSIZ. I'm writing on...

    I believe the constant is BUFSIZ. I'm writing on windows an compiling with DevC++.

    I don't understand what you want to say with



    What syscalls are available with DevC++? Can I use open()...
  8. Replies
    75
    Views
    24,425

    How to write files more faster in C

    Just a thing i want to toy with:


    #define ONE_GIGA 0x40000000
    #define ONE_MEGA 0x100000

    #include<stdio.h>
    #include<stdint.h>
    #include<stdlib.h>
  9. Replies
    1
    Views
    4,224

    Build a visual studio project from console

    How can I build a Visual C project from console?

    The thing is: does VC generate some kind of makefile that can be run from console or I have to do it all myself ?
  10. Replies
    5
    Views
    3,500

    now it gives me sh: generate2.bat:...

    now it gives me



    sh: generate2.bat: command not found
  11. Replies
    5
    Views
    3,500

    ... my $status = system("generate2.bat"); ...

    ...
    my $status = system("generate2.bat");
    if (($status >>=8) != 0)
    {
    die "Failed to generate pp1.txt";
    }
    ...

    this displays what the generate2.bat echoes. I don't...
  12. Replies
    5
    Views
    3,500

    Disable echo in Perl

    I want do make a perl script that runs other scripts that compile parts of a project. And if i run with system another script it displayes the whole commands set that the script executes. I want to...
  13. Replies
    6
    Views
    1,033

    I am working on CodeWarrior and I build the...

    I am working on CodeWarrior and I build the target for a SC100 CCS Simulator. I'm forced to do this because I want to avoid endianness problems (the pc i'm working on is a intel P4 and the package is...
  14. Replies
    6
    Views
    1,033

    this last post makes sense to me. thank you very...

    this last post makes sense to me. thank you very much. now i understand padding (or at least I think so :))
  15. Replies
    6
    Views
    1,033

    but i have the service type byte in the first...

    but i have the service type byte in the first structure. i want to map that char array on the structure
  16. Replies
    6
    Views
    1,033

    maping an unsigned char ofer a structure

    My problem is the following. I have an unsigned char array packet[] and the following structures:



    typedef struct set_serv_prop_s
    {

    byte serviceType;
    union
    {
  17. Replies
    1
    Views
    1,151

    Opening a file for binary appending

    How can I open a file for binary appending. Something like:


    outFile = fopen("out_cw.bin","wba+");
  18. Thread: test EOF

    by spank
    Replies
    6
    Views
    1,338

    the thing is that i am trying to control a loop...

    the thing is that i am trying to control a loop with that function and i've read that feof() is not that adequate to do that
  19. Thread: test EOF

    by spank
    Replies
    6
    Views
    1,338

    but if i use ftell on temp and inFile_bin and I...

    but if i use ftell on temp and inFile_bin and I compare that. whould that be ok ?
  20. Thread: test EOF

    by spank
    Replies
    6
    Views
    1,338

    test EOF

    is this a good way to test EOF ?


    int has_more_packets(FILE *inFile_bin)
    {
    FILE *temp = inFile_bin;

    fseek (temp, 0, SEEK_END);

    if(inFile_bin == temp)
  21. Thread: Printing a int

    by spank
    Replies
    4
    Views
    1,138

    The stream that I use is from a pcap file (i use...

    The stream that I use is from a pcap file (i use for processing winpcap) and the host is always a pc x86.. i belive that they have always the same endianness. I know that is a good practice to use...
  22. Thread: Printing a int

    by spank
    Replies
    4
    Views
    1,138

    Printing a int

    it is ok if I do ?


    fprintf(OUTPUT,"Source_Port=\t%d\n",((pkt_data[34])<<8)|pkt_data[35]);

    on what I am working it displays just fine... but I want to know if I would encounter any problems if...
  23. Replies
    1
    Views
    1,953

    Missing libraries on Visual C

    I'm trying co compile some application using visual c (the application has been created and compiled with this) but I get some errors on missing libraries and such... I don't know what to install and...
  24. Thread: WinPcap advice

    by spank
    Replies
    1
    Views
    818

    WinPcap advice

    I never used this set of libs. I was wondering if you have any idea where can I start reading about it and get a fast start in learning it. Thank you!
  25. Thread: Diagonal

    by spank
    Replies
    6
    Views
    1,192

    lose the second for along with b and print...

    lose the second for along with b and print mx[a][a]
Results 1 to 25 of 172
Page 1 of 7 1 2 3 4