- 1
- 2
- 3
- 4
- 5
- 6
- 7
try{
tempPage1Int = tempPage1.ToInt();
}catch(Exception &E){
tempPage1Int = 0;
goto NEXTFUCKER;
}
NEXTFUCKER:
Нашли или выдавили из себя код, который нельзя назвать нормальным, на который без улыбки не взглянешь? Не торопитесь его удалять или рефакторить, — запостите его на говнокод.ру, посмеёмся вместе!
+134
try{
tempPage1Int = tempPage1.ToInt();
}catch(Exception &E){
tempPage1Int = 0;
goto NEXTFUCKER;
}
NEXTFUCKER:
Дописываю из-под стола.
+132
if(fileCounter < 1000){
subDir = "SUBDIREC.001";
//много кода
}else if (fileCounter < 2000 && fileCounter > 999){
subDir = "SUBDIREC.002";
//много кода, плюс еще 17 таких же веток
}else if (fileCounter < 20000 && fileCounter > 18999){
subDir = "SUBDIREC.020";
//много кода
}
+134
while(SLOBirthsISEX->Strings[p].Length() < 1){
SLOBirthsISEX->Strings[p] = " " + SLOBirthsISEX->Strings[p];
}
нет слов
+127
#define PIXEL_PARTS_NUM 3
typedef struct _pixel {
char parts[PIXEL_PARTS_NUM];
} pixel;
+133
...
int
(mblen)(const char *s, size_t n)
{
if (s == (const char *)NULL) return 0; /* no state dependent codings */
if (n <= 0) return 0;
return (*s != 0);
}
...
int
mbtowc(wchar_t *pwc, register const char *s, size_t n)
{
if (s == (const char *)NULL) return 0;
if (n <= 0) return 0;
if (pwc) *pwc = *s;
return (*s != 0);
}
...
int
wctomb(char *s, wchar_t wchar)
{
if (!s) return 0; /* no state dependent codings */
*s = wchar;
return 1;
}
THE AMSTERDAM COMPILER KIT V6.0pre4
===================================
© 1987-2005 Vrije Universiteit, Amsterdam
2010-08-08
...
SUPPORT
=======
Languages:
ANSI C, Pascal, Modula 2. K&R is supported via the ANSI C compiler.
А где здесь, собсно, ANSI C?
+141
...
else if ( (!BG_InSpecialJump( legsAnim )//not in a special jump anim
||BG_InReboundJump( legsAnim )//we're already in a rebound
||BG_InBackFlip( legsAnim ) )//a backflip (needed so you can jump off a wall behind you)
//&& pm->ps->velocity[2] <= 0
&& pm->ps->velocity[2] > -1200 //not falling down very fast
&& !(pm->ps->pm_flags&PMF_JUMP_HELD)//have to have released jump since last press
&& (pm->cmd.forwardmove||pm->cmd.rightmove)//pushing in a direction
//&& pm->ps->forceRageRecoveryTime < pm->cmd.serverTime //not in a force Rage recovery period
&& pm->ps->fd.forcePowerLevel[FP_LEVITATION] > FORCE_LEVEL_2//level 3 jump or better
//&& WP_ForcePowerAvailable( pm->gent, FP_LEVITATION, 10 )//have enough force power to do another one
&& BG_CanUseFPNow(pm->gametype, pm->ps, pm->cmd.serverTime, FP_LEVITATION)
&& (pm->ps->origin[2]-pm->ps->fd.forceJumpZStart) < (forceJumpHeightMax[FORCE_LEVEL_3]-(BG_ForceWallJumpStrength()/2.0f)) //can fit at least one more wall jump in (yes, using "magic numbers"... for now)
//&& (pm->ps->legsAnim == BOTH_JUMP1 || pm->ps->legsAnim == BOTH_INAIR1 ) )//not in a flip or spin or anything
)
{//see if we're pushing at a wall and jump off it if so
if ( allowWallGrabs )
{
//FIXME: make sure we have enough force power
//FIXME: check to see if we can go any higher
//FIXME: limit to a certain number of these in a row?
//FIXME: maybe don't require a ucmd direction, just check all 4?
//FIXME: should stick to the wall for a second, then push off...
...
Больше условий богу условий!
Jedi Academy source, 2003
+123
drwsr
+117
bormand сосёт анус своему отцу, размазывая говно по лицу.
+133
#ifndef _TOGGLE_H_
#define _TOGGLE_H_
#include <winbase.h>
#include "Python.h"
#define ID(X) "id(" #X ")"
#define SET_OBJ_POINTER(OBJ, NAME)\
OBJ = (PyObject *)PyLong_AsLong\
(PyRun_String(ID(NAME), Py_eval_input,\
PyEval_GetGlobals(), PyEval_GetLocals()))
//////////////////////////////////////////////////////
PyObject * __Py_None__;
PyObject * __Py_True__;
PyObject * __Py_False__;
PyObject * __Py_NotImplemented__;
#undef Py_None
#undef Py_True
#undef Py_False
#undef Py_NotImplemented
#define Py_None __Py_None__
#define Py_True __Py_True__
#define Py_False __Py_False__
#define Py_NotImplemented __Py_NotImplemented__
//////////////////////////////////////////////////////
static void initToggle(void) {
SET_OBJ_POINTER(Py_None, None);
SET_OBJ_POINTER(Py_True, True);
SET_OBJ_POINTER(Py_False, False);
SET_OBJ_POINTER(Py_NotImplemented, NotImplemented);
}
int WINAPI DllMain(HANDLE hinstDLL, DWORD dwReason, LPVOID lpvReserved) {
initToggle();
return 1;
}
#endif
Раскопал на старой флешке костыль, позволяющий компилить сишные модули для питона прям на кпк под WinMobile с помощью портанутой gcc. Была там бага - не видел собранный модуль Py_None, Py_True и т.д из python.dll. При помощи макроса SET_OBJ_POINTER приходилось вытаскивать указатели на них.
+133
if (access(path, aflag) && mkfifo(path, mode) {
exit(-1);
}
Весьма интуитивная запись условия