chatlog.cpp File Reference

#include <wx/string.h>
#include <wx/file.h>
#include <wx/filefn.h>
#include <wx/dir.h>
#include <wx/datetime.h>
#include <wx/intl.h>
#include <wx/filename.h>
#include <wx/log.h>
#include <stdexcept>
#include "chatlog.h"
#include <wx/arrstr.h>
#include "settings.h"
#include "utils/conversion.h"
#include "ui.h"
#include "defines.h"
#include "utils/customdialogs.h"
#include "utils/platform.h"
Include dependency graph for chatlog.cpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

static off_t next_read_position (off_t last_read_position, size_t read_size, size_t read_overlap)
 Calculate the next read position for find_tail_sequences (below).
static size_t find_tail_sequences (int fd, const char *bytes, size_t bytes_length, size_t count, wxArrayString &out)
 Find an arbitrary number of delimited strings at the end of a file.

Function Documentation

static size_t find_tail_sequences ( int  fd,
const char *  bytes,
size_t  bytes_length,
size_t  count,
wxArrayString &  out 
) [inline, static]

Find an arbitrary number of delimited strings at the end of a file.

This function provides the core of our last-lines-loader implementation.

Parameters:
fd File descriptor to operate on. This must be opened for reading.
bytes Delimiter sequence.
bytes_length Number of significant bytes in bytes.
count Number of tail sequences to find.
out Destination string array.

Definition at line 210 of file chatlog.cpp.

static off_t next_read_position ( off_t  last_read_position,
size_t  read_size,
size_t  read_overlap 
) [inline, static]

Calculate the next read position for find_tail_sequences (below).

Definition at line 191 of file chatlog.cpp.


Generated on Thu Dec 29 00:11:26 2011 for SpringLobby by doxygen 1.6.3