/branches/Version13x/Scribus/scribus/util.cpp |
---|
35,7 → 35,15 |
#include <unistd.h> |
#endif |
#if defined(_WIN32) |
#if defined(_MSC_VER) |
#define __STDC__ 1 // hack to get md5_buffer correctly identified |
#endif |
#include <windows.h> |
#endif |
#include "md5.h" |
#include <setjmp.h> |
#include "qprocess.h" |
#include "scpaths.h" |
139,7 → 147,11 |
/* start was OK */ |
/* wait a little bit */ |
while( proc->isRunning() ) |
#ifndef _WIN32 |
usleep(5000); |
#else |
Sleep(5); |
#endif |
int ex = proc->exitStatus(); |
delete proc; |
/branches/Version13x/Scribus/scribus/filewatcher.cpp |
---|
7,6 → 7,10 |
#include <unistd.h> |
#endif |
#ifdef _WIN32 |
#include <windows.h> |
#endif |
FileWatcher::FileWatcher( QWidget* parent) : QObject(parent) |
{ |
watchedFiles.clear(); |
106,13 → 110,21 |
else |
{ |
uint sizeo = it.data().info.size(); |
#ifndef _WIN32 |
usleep(100); |
#else |
Sleep(1); |
#endif |
it.data().info.refresh(); |
uint sizen = it.data().info.size(); |
while (sizen != sizeo) |
{ |
sizeo = sizen; |
#ifndef _WIN32 |
usleep(100); |
#else |
Sleep(1); |
#endif |
it.data().info.refresh(); |
sizen = it.data().info.size(); |
} |
/branches/Version13x/Scribus/scribus/scfonts.cpp |
---|
550,7 → 550,7 |
static const char* PSFONT_ADOBE2_HEAD = "%!PS-Adobe-2.0 Font"; |
static const char* PSFONT_ADOBE21_HEAD = "%!PS-Adobe-2.1 Font"; |
static const char* PSFONT_ADOBE3_HEAD = "%!PS-Adobe-3.0 Resource-Font"; |
static const int NO_ERROR = 0; |
static const int FONT_NO_ERROR = 0; |
const FT_Stream fts = face->stream; |
char buf[128]; |
557,7 → 557,7 |
fmt = Foi::UNKNOWN_FORMAT; |
type = Foi::UNKNOWN_TYPE; |
if (FT_Stream_Seek(fts, 0L) == NO_ERROR && FT_Stream_Read(fts, reinterpret_cast<FT_Byte *>(buf), 128) == NO_ERROR) |
if (FT_Stream_Seek(fts, 0L) == FONT_NO_ERROR && FT_Stream_Read(fts, reinterpret_cast<FT_Byte *>(buf), 128) == FONT_NO_ERROR) |
{ |
if(strncmp(buf,T42_HEAD,strlen(T42_HEAD)) == 0) |
{ |
/branches/Version13x/Scribus/scribus/scribusview.cpp |
---|
6250,7 → 6250,7 |
void ScribusView::AdvanceSel(PageItem *currItem, int oldPos, int len, int dir, int expandSel, int state) |
{ |
int i; |
int isSpace; |
bool isSpace; |
if ( dir > 0 ) |
{ |
isSpace = currItem->itemText.at(oldPos)->ch.at(0).isSpace(); |
6290,7 → 6290,7 |
void ScribusView::setNewPos(PageItem *currItem, int oldPos, int len, int dir) |
{ |
int i; |
int isSpace; |
bool isSpace; |
if ( dir > 0 && oldPos < len ) |
{ |
isSpace = currItem->itemText.at(oldPos)->ch.at(0).isSpace(); |
6328,10 → 6328,10 |
void ScribusView::ExpandSel(PageItem *currItem, int dir, int oldPos) |
{ |
int len = currItem->itemText.count(); |
int rightSel = false; // assume left right and actual char not selected |
int leftSel = false; |
int actSel = false; |
int selMode = false; |
bool rightSel = false; // assume left right and actual char not selected |
bool leftSel = false; |
bool actSel = false; |
bool selMode = false; |
if ( dir == -1 || dir == 1 ) |
selMode = true; |
/branches/Version13x/Scribus/scribus/scimage.cpp |
---|
3030,8 → 3030,8 |
jpeg_read_header(&cinfo, true); |
jpeg_start_decompress(&cinfo); |
#ifdef HAVE_CMS |
DWORD EmbedLen = 0; |
LPBYTE EmbedBuffer; |
unsigned int EmbedLen = 0; |
unsigned char* EmbedBuffer; |
if (read_jpeg_marker(ICC_MARKER,&cinfo, &EmbedBuffer, &EmbedLen) && useEmbedded && CMSuse && useProf) |
{ |
const char *Descriptor; |
/branches/Version13x/Scribus/scribus/fileunzip.cpp |
---|
36,7 → 36,13 |
# include <unistd.h> |
#endif |
# include <utime.h> |
#ifndef _MSC_VER |
#include <utime.h> |
#else |
#include <direct.h> |
#include <time.h> |
#include <sys/utime.h> |
#endif |
#include <iostream> |
#include "unzip.h" |
87,7 → 93,11 |
int mymkdir(char* dirname) |
{ |
int ret=0; |
#ifndef _MSC_VER |
ret = mkdir (dirname,0775); |
#else |
ret = _mkdir(dirname); |
#endif |
return ret; |
} |