Commit ac9abcb3 authored by zmoelnig's avatar zmoelnig
Browse files

windows fixes

- use 'unsigned int' where appropriate
- when declaring "PIMPL" as 'class', it shouldn't be defined as 'struct'
- don't include <unistd.h>

git-svn-id: https://pd-gem.svn.sourceforge.net/svnroot/pd-gem/trunk/Gem@4174 49b2a0ca-c541-4d49-a7ef-d785e4371512
parent fc856537
......@@ -96,7 +96,7 @@ public:
delete[]ap;
}
void dequeue(void) {
int i=0;
unsigned int i=0;
for(i=0; i<qQueue.size(); i++) {
sendInfo(qQueue[i]);
}
......
......@@ -6,7 +6,8 @@
namespace gem {
struct Properties::PIMPL {
class Properties::PIMPL {
public:
std::map<std::string, any> valuemap;
std::map<std::string, enum Properties::PropertyType> typemap;
......
......@@ -16,7 +16,7 @@
#define FTGL
/* use the "new" film-objects, to allow the use of multiple APIs */
#define GEM_VIDEOBACKEND GEM_VIDEOBACKEND_DS
//#define GEM_VIDEOBACKEND GEM_VIDEOBACKEND_DS
/* quicktime-support for film-loading */
#define HAVE_QUICKTIME
......
......@@ -116,7 +116,7 @@ namespace gem { namespace thread {
}
unsigned int SynchedWorkerThread::dequeue(void) {
m_pimpl->dequeue();
return m_pimpl->dequeue();
}
bool SynchedWorkerThread::setPolling(bool value) {
......
......@@ -31,7 +31,10 @@
#include "ThreadSemaphore.h"
#include <pthread.h>
#include <unistd.h>
#if defined __linux__ || defined __APPLE__
# include <unistd.h>
#endif
#include <iostream>
......
......@@ -12,7 +12,8 @@
CPPEXTERN_NEW_WITH_GIMME(pix_record);
struct pix_record :: PIMPL {
class pix_record :: PIMPL {
public:
PIMPL(void) {};
~PIMPL(void) {};
......
......@@ -43,10 +43,10 @@ int hash_str2us(std::string s) {
int a=63689;
int b=378551;
int i=0;
if(s.length()<1)return -1;
unsigned int i=0;
for(i=0; i<s.length(); i++) {
result=result*a+s[i];
a *= b;
......
......@@ -65,7 +65,7 @@ pix_video :: ~pix_video(){
/* clean up all video handles;
* the video-handles have to stop the transfer themselves
*/
int i=0;
unsigned int i=0;
for(i=0; i<m_videoHandles.size(); i++) {
delete m_videoHandles[i];
m_videoHandles[i]=NULL;
......@@ -277,14 +277,14 @@ void pix_video :: driverMess() {
post("current driver: '%s'", m_videoHandle->getName().c_str());
}
if(m_videoHandles.size()>1) {
int i=0;
unsigned int i=0;
post("available drivers:");
for(i=0; i<m_videoHandles.size(); i++) {
gem::video*handle= m_videoHandles[i];
if(NULL==handle)continue;
startpost("\t'%s' provides ", handle->getName().c_str());
std::vector<std::string>backends=handle->provides();
int j=0;
unsigned int j=0;
for(j=0; j<backends.size(); j++) {
startpost("'%s' ", backends[j].c_str());
}
......@@ -399,7 +399,7 @@ void pix_video :: enumerateMess()
std::string name=m_videoHandles[i]->getName();
verbose(1, "enumerating: %s", name.c_str());
std::vector<std::string>temp=m_videoHandles[i]->enumerate();
int i=0;
unsigned int i=0;
for(i=0; i<temp.size(); i++) {
backends.push_back(name);
data.push_back(temp[i]);
......@@ -525,7 +525,7 @@ void pix_video :: getPropertyMess(int argc, t_atom*argv)
if(m_videoHandle) {
m_videoHandle->getProperties(m_readprops);
std::vector<std::string>keys=m_readprops.keys();
int i=0;
unsigned int i=0;
for(i=0; i<keys.size(); i++) {
std::string key=keys[i];
SETSYMBOL(ap+0, gensym(key.c_str()));
......@@ -576,7 +576,6 @@ void pix_video :: enumPropertyMess()
t_atom ap[4];
int ac=3;
int i=0;
m_videoHandle->enumProperties(readable, writeable);
......@@ -587,6 +586,7 @@ void pix_video :: enumPropertyMess()
outlet_anything(m_infoOut, gensym("proplist"), 2, ap);
SETSYMBOL(ap+0, gensym("read"));
unsigned int i=0;
for(i=0; i<readkeys.size(); i++) {
ac=3;
std::string key=readkeys[i];
......@@ -692,7 +692,7 @@ void pix_video :: clearPropertiesMess()
void pix_video :: asynchronousMess(bool state)
{
int i;
unsigned int i;
for(i=0; i<m_videoHandles.size(); i++) {
if(m_videoHandles[i])
m_videoHandles[i]->grabAsynchronous(state);
......
......@@ -28,7 +28,8 @@
namespace gem { namespace plugins {
struct film :: PIMPL {
class film :: PIMPL {
public:
bool m_thread;
PIMPL(bool thread) :
m_thread(thread)
......
......@@ -75,7 +75,7 @@ void image :: setProperties(gem::Properties&props) {
void image :: getProperties(gem::Properties&props) {
// nada
std::vector<std::string>keys=props.keys();
int i=0;
unsigned int i=0;
for(i=0; i<keys.size(); i++) {
gem::any unset;
props.set(keys[i], unset);
......
......@@ -523,7 +523,7 @@ void video :: setProperties(gem::Properties&props) {
// nada
std::vector<std::string> keys=props.keys();
int i=0;
unsigned int i=0;
for(i=0; i<keys.size(); i++) {
enum gem::Properties::PropertyType typ=props.type(keys[i]);
std::cerr << "key["<<keys[i]<<"]: "<<typ<<" :: ";
......@@ -548,7 +548,7 @@ void video :: setProperties(gem::Properties&props) {
void video :: getProperties(gem::Properties&props) {
// nada
std::vector<std::string>keys=props.keys();
int i=0;
unsigned int i=0;
for(i=0; i<keys.size(); i++) {
gem::any unset;
props.set(keys[i], unset);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment