Example #1
0
int main(){
int _cmm_1L;
int _cmm_2L;
X *_cmm_3L;
(_cmm_1L=_cmm_1L);
(_cmm_1L=(_cmm_1L+1));
(_cmm_2L=_cmm_2L);
(_cmm_2L=(_cmm_2L+-1));
(_cmm_1L=(*_ICA(a,0,__FILE__,__LINE__)));
(_cmm_2L=(*_ICA(a,1,__FILE__,__LINE__)));
(_cmm_1L=(((X*)_CP(_cmm_3L,__FILE__,__LINE__))->a));
(_cmm_2L=(((X*)_CP(_cmm_3L,__FILE__,__LINE__))->b));
return 0;
}
Example #2
0
ThreadReturnType BaseTCPServer::TCPServerLoop(void* tmp) {
#ifdef WIN32
	SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL);
#endif
	if (tmp == 0) {
//		ThrowError("BaseTCPServerLoop(): tmp = 0!");
		THREAD_RETURN(NULL);
	}
	BaseTCPServer* tcps = (BaseTCPServer*) tmp;
	
#ifndef WIN32
	_log(COMMON__THREADS, "Starting TCPServerLoop with thread ID %d", pthread_self());
#endif
	
	tcps->MLoopRunning.lock();
	while (tcps->RunLoop()) {
		_CP(BaseTCPServerLoop);
		Sleep(SERVER_LOOP_GRANULARITY);
		tcps->Process();
	}
	tcps->MLoopRunning.unlock();
	
#ifndef WIN32
	_log(COMMON__THREADS, "Ending TCPServerLoop with thread ID %d", pthread_self());
#endif
	
	THREAD_RETURN(NULL);
}
Example #3
0
int main(){
((((Node*)_CP(n,__FILE__,__LINE__))->next)=n);
((((Node*)_CP(n,__FILE__,__LINE__))->prev)=n);
(m=(((Node*)_CP((((Node*)_CP(n,__FILE__,__LINE__))->next),__FILE__,__LINE__))->prev));
Node *_cmm_1L;
(_cmm_1L=m);
((((Node*)_CP(_cmm_1L,__FILE__,__LINE__))->next)=(((Node*)_CP((((Node*)_CP(_cmm_1L,__FILE__,__LINE__))->prev),__FILE__,__LINE__))->prev));
int _cmm_2L;
(_cmm_2L=(((Node*)_CP(_cmm_1L,__FILE__,__LINE__))->val));
return 0;
}
Example #4
0
double MakeRandomFloat(double low, double high)
{
	_CP(MakeRandomFloat);
	if(low == high)
		return(low);
	
	static bool seeded=0;
	double diff = high - low;
  
	if(!diff) return low;
	if(diff < 0)
		diff = 0 - diff;

	if(!seeded)
	{
		srand(time(0) * (time(0) % (int)diff));
		seeded = true;
	}
  
	return (rand() / (double)RAND_MAX * diff + (low > high ? high : low));
}
Example #5
0
EAPI Eina_Bool
evas_smart_class_inherit_full(Evas_Smart_Class *sc, const Evas_Smart_Class *parent_sc, unsigned int parent_sc_size)
{
   unsigned int off;

   /* api does not match abi! for now refuse as we only have 1 version */
   if (parent_sc->version != EVAS_SMART_CLASS_VERSION) return EINA_FALSE;

#define _CP(m) sc->m = parent_sc->m
   _CP(add);
   _CP(del);
   _CP(move);
   _CP(resize);
   _CP(show);
   _CP(hide);
   _CP(color_set);
   _CP(clip_set);
   _CP(clip_unset);
   _CP(calculate);
   _CP(member_add);
   _CP(member_del);
#undef _CP

   sc->parent = parent_sc;

   off = sizeof(Evas_Smart_Class);
   if (parent_sc_size == off) return EINA_TRUE;

   memcpy(((char *)sc) + off, ((char *)parent_sc) + off, parent_sc_size - off);
   return EINA_TRUE;
}
	_MPT
}

int Quadrupole::GetIndex () const
{
	_RID
}

const string& Quadrupole::GetType () const
{
	_TYPESTR(Quadrupole)
}

ModelElement* Quadrupole::Copy () const
{
	_CP(Quadrupole)
}

// Class Sextupole

const int Sextupole::ID = UniqueIndex();

Sextupole::Sextupole (const string& id, double len, double dnB)
	: _RMC1(2)
{
}

Sextupole::Sextupole (const string& id, double len, double B, double r0)
	: _RMC2(2)
{
}