~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to api/graphics2_util.cpp

Tags: 6.12.8+dfsg-1
* New upstream release.
* Simplified debian/rules

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
#include "graphics2.h"
35
35
 
36
36
#ifdef __EMX__
37
 
static key_t get_shmem_name(char* prog_name) {
 
37
static key_t get_shmem_name(const char* prog_name) {
38
38
    char cwd[256], path[256];
39
39
    boinc_getcwd(cwd);
40
40
    sprintf(path, "%s/init_data.xml", cwd);
43
43
#else
44
44
// Unix/Linux/Mac applications always use mmap() for gfx communication
45
45
//
46
 
static void get_shmem_name(char* prog_name, char* shmem_name) {
 
46
static void get_shmem_name(const char* prog_name, char* shmem_name) {
47
47
    APP_INIT_DATA aid;
48
48
    int retval = boinc_get_init_data(aid);
49
49
    if (retval) aid.slot = 0;
51
51
}
52
52
#endif
53
53
 
54
 
void* boinc_graphics_make_shmem(char* prog_name, int size) {
 
54
void* boinc_graphics_make_shmem(const char* prog_name, int size) {
55
55
#ifdef _WIN32
56
56
    HANDLE shmem_handle;
57
57
    char shmem_name[256];
80
80
}
81
81
 
82
82
#ifdef _WIN32
83
 
void* boinc_graphics_get_shmem(char* prog_name) {
 
83
void* boinc_graphics_get_shmem(const char* prog_name) {
84
84
    HANDLE shmem_handle;
85
85
    char shmem_name[256];
86
86
    void* p;
92
92
    return p;
93
93
}
94
94
#else
95
 
void* boinc_graphics_get_shmem(char* prog_name) {
 
95
void* boinc_graphics_get_shmem(const char* prog_name) {
96
96
    void* p;
97
97
    int retval;
98
98
#ifdef __EMX__