Search:

Type: Posts; User: CYBERRRR

Search: Search took 0.01 seconds.

  1. Replies
    1
    Views
    1,036

    Memory Mapped Files

    Assuming I have a .ppm image mapped to char *source and I want to invert/rotate it. Can I "directly" copy the value from each pixel struct to the destination mmf?


    destination[i]=source[i]
    ...
  2. Replies
    4
    Views
    3,322

    Yep, that did it. I just copy/pasted that part...

    Yep, that did it. I just copy/pasted that part from where I was mapping the original image. Would have never guessed the error was there.

    Now it is working, thank you very much! ;)
  3. Replies
    4
    Views
    3,322

    Segmentation Fault With Pointer

    I'm writing a program that mirrors an image using Memory Mapped Files.
    These are the parts of the code I find relevant for this particular error.


    First I create the output file.

    if ( (fpout...
  4. when I said check I clearly meant I was making a...

    when I said check I clearly meant I was making a printf to see the value, not checking "if ()".. Thanks
  5. The line after those two in red checks it :p ...

    The line after those two in red checks it :p

    The error is bad file descriptor, I'm guessing something related to closing the socket is wrong, but I don't see where else I should put it..


    A...
  6. I haven't finished the program yet, I usually put...

    I haven't finished the program yet, I usually put that stuff at the final stages. I am checking the read values when reading from the buffer, didn't you see?
    Yes, when it fails sometimes I get "-1"...
  7. server.c #include #include...

    server.c

    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #include <pthread.h>
    #include <time.h>
    #include <netdb.h>
    #include <netinet/in.h>
    #include <sys/types.h>
  8. host_lookup() returns a string containing an ip...

    host_lookup() returns a string containing an ip address.. its max length will be 15. find's size is 50. there's enough space.

    concerning the strlen() stuff, I have already zeroed the find string...
  9. One of you has to know the answer...

    One of you has to know the answer...
  10. Socket:multiple reads and writes, how to avoid overflow?

    I've been serching on this topic for a while, both on google and here. I've read "Beej's Guide to Network Programming" as someone here sugested and the FAQ section about sockets where Hammer talks...
Results 1 to 10 of 11