Search results

  1. N

    How line-wrap a text string (need width/height in pixels)?

    I need to display a long text string over a pixmap. I want to wrap the text so it appears as a paragraph. I've tried both DrawText() and CGContextShowText() to draw the string (I embedded linefeeds in the string) ... but they do not seem to do line-wrapping automatically. Does Mac have a...
  2. N

    Safari and a Java printreturn

    I need to display a long text string over a pixmap. I want to wrap the text so it appears as a paragraph. I've tried both DrawText() and CGContextShowText() to draw the string (I embedded linefeeds in the string) ... but they do not seem to do line-wrapping automatically. Does Mac have a...
  3. N

    IO Streams thread-safe in MacOSX?

    I'm using fread() and fseek() stream IO functions in a multi-threaded application. Unfortunately, the data returned by fread() is not correct. From the bytes it returns, I can tell that the internal buffers of the various FILE* objects (one per thread) are interfering with each other...
  4. N

    Mutliple threads reading single disk file? fpurge() workaround.

    I've got an application with multiple threads. They are all reading from a single disk file. The following code works fine on Windows, but produces bad data restults on the Mac: threadFunction() { FILE* f = ...; for (..) { pthread_mutex_lock(); // ensure threads dont...
  5. N

    Threads: can multiple thrds read same file?

    I've got an application written in C++ (Project Builder). It has about 8 threads within a single process. All the threads are reading from the same disk file. It is a huge disk file, each thread is reading a different section of the file. Each thread opens the file with fopen() and gets...
Back
Top