type stringclasses 5
values | content stringlengths 9 163k |
|---|---|
functions | teams
if( s_serveroptions.gametype < GT_TEAM ) {
return;
} |
functions | void ServerOptions_Event( void* ptr, int event ) {
if (((menucommon_s*)ptr)->id >= ID_PLAYER_TYPE && ((menucommon_s*)ptr)->id < ID_PLAYER_TYPE+PLAYER_SLOTS) {
if( event != QM_ACTIVATED ) {
return;
} |
functions | void ServerOptions_PlayerNameEvent( void* ptr, int event ) {
int n;
if( event != QM_ACTIVATED ) {
return;
} |
functions | void ServerOptions_StatusBar( void* ptr ) {
switch( ((menucommon_s*)ptr)->id ) {
default:
UI_DrawString( 320, 440, "0 = NO LIMIT", UI_CENTER|UI_SMALLFONT, colorWhite );
break;
} |
functions | void ServerOptions_LevelshotDraw( void *self ) {
menubitmap_s *b;
int x;
int y;
// strange place for this, but it works
if( s_serveroptions.newBot ) {
Q_strncpyz( s_serveroptions.botNameBuffers[s_serveroptions.newBotIndex], s_serveroptions.newBotName, 16 );
s_serveroptions.newBot = qfalse;
} |
functions | void ServerOptions_InitBotNames( void ) {
int count;
int n;
const char *arenaInfo;
const char *botInfo;
char *p;
char *bot;
char bots[MAX_INFO_STRING];
// set the bot slots to random
for( n = 1; n < PLAYER_SLOTS; n++ ) {
strcpy( s_serveroptions.botNameBuffers[n], "Random" );
} |
functions | spaces
while( *p && *p == ' ' ) {
p++;
} |
functions | null
while( *p && *p != ' ' ) {
p++;
} |
functions | slots
for( ;count < 8; count++ ) {
s_serveroptions.playerType[count].curvalue = PT_OPEN;
} |
functions | default
for( ;count < PLAYER_SLOTS; count++ ) {
if( s_serveroptions.playerType[count].curvalue == PT_BOT ) {
s_serveroptions.playerType[count].curvalue = PT_CLOSED;
} |
functions | void ServerOptions_SetMenuItems( void ) {
static char picname[64];
char mapname[MAX_NAMELENGTH];
const char *info;
switch( s_serveroptions.gametype ) {
case GT_FFA:
default:
MField_SetText( &s_serveroptions.fraglimit.field, va( "%i", (int)Com_Clamp( 0, 999, trap_Cvar_VariableValue( "ui_ffa_fraglimit" ) ) ) );... |
functions | void PlayerName_Draw( void *item ) {
menutext_s *s;
float *color;
int x, y;
int style;
qboolean focus;
s = (menutext_s *)item;
x = s->generic.x;
y = s->generic.y;
style = UI_SMALLFONT;
focus = (s->generic.parent->cursor == s->generic.menuPosition);
if ( s->generic.flags & QMF_GRAYED )
color = text... |
functions | else if ( s->generic.flags & QMF_BLINK )
{
color = text_color_highlight;
style |= UI_BLINK;
} |
functions | void ServerOptions_MenuInit( qboolean multiplayer ) {
int y;
int n;
memset( &s_serveroptions, 0 ,sizeof(serveroptions_t) );
s_serveroptions.multiplayer = multiplayer;
s_serveroptions.gametype = (int) Com_Clamp(0, ARRAY_LEN(gametype_remap2) - 1,
trap_Cvar_VariableValue("g_gametype"));
ServerOptions_Cache... |
functions | void ServerOptions_Cache( void ) {
trap_R_RegisterShaderNoMip( GAMESERVER_BACK0 );
trap_R_RegisterShaderNoMip( GAMESERVER_BACK1 );
trap_R_RegisterShaderNoMip( GAMESERVER_FIGHT0 );
trap_R_RegisterShaderNoMip( GAMESERVER_FIGHT1 );
trap_R_RegisterShaderNoMip( GAMESERVER_SELECT );
trap_R_RegisterShaderNoMip( GAMESERV... |
functions | void UI_ServerOptionsMenu( qboolean multiplayer ) {
ServerOptions_MenuInit( multiplayer );
UI_PushMenu( &s_serveroptions.menu );
} |
functions | QDECL UI_BotSelectMenu_SortCompare( const void *arg1, const void *arg2 ) {
int num1, num2;
const char *info1, *info2;
const char *name1, *name2;
num1 = *(int *)arg1;
num2 = *(int *)arg2;
info1 = UI_GetBotInfoByNumber( num1 );
info2 = UI_GetBotInfoByNumber( num2 );
name1 = Info_ValueForKey( info1, "name" );... |
functions | void UI_BotSelectMenu_BuildList( void ) {
int n;
botSelectInfo.modelpage = 0;
botSelectInfo.numBots = UI_GetNumBots();
botSelectInfo.numpages = botSelectInfo.numBots / MAX_MODELSPERPAGE;
if( botSelectInfo.numBots % MAX_MODELSPERPAGE ) {
botSelectInfo.numpages++;
} |
functions | array
for( n = 0; n < botSelectInfo.numBots; n++ ) {
botSelectInfo.sortedBotNums[n] = n;
} |
functions | void ServerPlayerIcon( const char *modelAndSkin, char *iconName, int iconNameMaxSize ) {
char *skin;
char model[MAX_QPATH];
// icon for random bot option
if (Q_stricmp(modelAndSkin, "random") == 0)
{
Com_sprintf(iconName, iconNameMaxSize, "menu/art/randombot_icon.tga");
if (!trap_R_RegisterShaderNoMip( iconN... |
functions | void UI_BotSelectMenu_UpdateGrid( void ) {
const char *info;
int i;
int j;
j = botSelectInfo.modelpage * MAX_MODELSPERPAGE;
for( i = 0; i < (PLAYERGRID_ROWS * PLAYERGRID_COLS); i++, j++) {
if( j < botSelectInfo.numBots ) {
info = UI_GetBotInfoByNumber( botSelectInfo.sortedBotNums[j] );
ServerPlaye... |
functions | void UI_BotSelectMenu_Default( char *bot ) {
const char *botInfo;
const char *test;
int n;
int i;
for( n = 0; n < botSelectInfo.numBots; n++ ) {
botInfo = UI_GetBotInfoByNumber( n );
test = Info_ValueForKey( botInfo, "name" );
if( Q_stricmp( bot, test ) == 0 ) {
break;
} |
functions | void UI_BotSelectMenu_LeftEvent( void* ptr, int event ) {
if( event != QM_ACTIVATED ) {
return;
} |
functions | void UI_BotSelectMenu_RightEvent( void* ptr, int event ) {
if( event != QM_ACTIVATED ) {
return;
} |
functions | void UI_BotSelectMenu_BotEvent( void* ptr, int event ) {
int i;
if( event != QM_ACTIVATED ) {
return;
} |
functions | void UI_BotSelectMenu_BackEvent( void* ptr, int event ) {
if( event != QM_ACTIVATED ) {
return;
} |
functions | void UI_BotSelectMenu_SelectEvent( void* ptr, int event ) {
if( event != QM_ACTIVATED ) {
return;
} |
functions | void UI_BotSelectMenu_Cache( void ) {
trap_R_RegisterShaderNoMip( BOTSELECT_BACK0 );
trap_R_RegisterShaderNoMip( BOTSELECT_BACK1 );
trap_R_RegisterShaderNoMip( BOTSELECT_ACCEPT0 );
trap_R_RegisterShaderNoMip( BOTSELECT_ACCEPT1 );
trap_R_RegisterShaderNoMip( BOTSELECT_SELECT );
trap_R_RegisterShaderNoMip( BOTSELEC... |
functions | void UI_BotSelectMenu_Init( char *bot ) {
int i, j, k;
int x, y;
memset( &botSelectInfo, 0 ,sizeof(botSelectInfo) );
botSelectInfo.menu.wrapAround = qtrue;
botSelectInfo.menu.fullscreen = qtrue;
UI_BotSelectMenu_Cache();
botSelectInfo.banner.generic.type = MTYPE_BTEXT;
botSelectInfo.banner.generic.x = 320... |
functions | void UI_BotSelectMenu( char *bot ) {
UI_BotSelectMenu_Init( bot );
UI_PushMenu( &botSelectInfo.menu );
} |
includes |
#include <stdlib.h> |
includes | #include <string.h> |
functions | int joblist_append(server *srv, connection *con) {
if (con->in_joblist) return 0;
if (srv->joblist->size == 0) {
srv->joblist->size = 16;
srv->joblist->ptr = malloc(sizeof(*srv->joblist->ptr) * srv->joblist->size);
force_assert(NULL != srv->joblist->ptr);
} |
functions | else if (srv->joblist->used == srv->joblist->size) {
srv->joblist->size += 16;
srv->joblist->ptr = realloc(srv->joblist->ptr, sizeof(*srv->joblist->ptr) * srv->joblist->size);
force_assert(NULL != srv->joblist->ptr);
} |
functions | void joblist_free(server *srv, connections *joblist) {
UNUSED(srv);
free(joblist->ptr);
free(joblist);
} |
functions | int fdwaitqueue_append(server *srv, connection *con) {
if (srv->fdwaitqueue->size == 0) {
srv->fdwaitqueue->size = 16;
srv->fdwaitqueue->ptr = malloc(sizeof(*(srv->fdwaitqueue->ptr)) * srv->fdwaitqueue->size);
force_assert(NULL != srv->fdwaitqueue->ptr);
} |
functions | else if (srv->fdwaitqueue->used == srv->fdwaitqueue->size) {
srv->fdwaitqueue->size += 16;
srv->fdwaitqueue->ptr = realloc(srv->fdwaitqueue->ptr, sizeof(*(srv->fdwaitqueue->ptr)) * srv->fdwaitqueue->size);
force_assert(NULL != srv->fdwaitqueue->ptr);
} |
functions | void fdwaitqueue_free(server *srv, connections *fdwaitqueue) {
UNUSED(srv);
free(fdwaitqueue->ptr);
free(fdwaitqueue);
} |
includes | #include <stdio.h> |
includes | #include <stdlib.h> |
includes | #include <string.h> |
includes | #include <time.h> |
includes | #include <math.h> |
functions | void write_CF(char *fname,double *corr,double *ercorr,
unsigned long long *DD)
{
//////
// Writes correlation function to file fname
FILE *fo;
int ii;
fo=fopen(fname,"w");
if(fo==NULL) {
char oname[64]="output_CUTE.dat";
fprintf(stderr,"CUTE: Error opening output file %s",fname);
fprintf... |
functions | void run_monopole_corr_bf(void)
{
//////
// Main routine for monopole using brute-force
lint n_dat;
Catalog cat_dat;
unsigned long long DD[NB_R];
double corr[NB_R],ercorr[NB_R];
timer(4);
#ifdef _VERBOSE
printf("*** Correlation function parameters: \n");
printf(" - Range: %.3lf < r < %.3lf (Mpc/h)\n... |
functions | void run_monopole_corr_neighbors(void)
{
//////
// Main routine for monopole using neighbor boxes
lint n_dat;
int nside;
Catalog cat_dat;
NeighborBox *boxes;
unsigned long long DD[NB_R];
double corr[NB_R],ercorr[NB_R];
timer(4);
#ifdef _VERBOSE
printf("*** Correlation function parameters: \n");
... |
functions | void run_monopole_corr_tree(void)
{
//////
// Main routine for monopole using tree
lint n_dat;
Catalog cat_dat;
branch *tree;
unsigned long long DD[NB_R];
double corr[NB_R],ercorr[NB_R];
timer(4);
#ifdef _VERBOSE
printf("*** Monopole: \n");
printf(" - Range: %.3lf < r < %.3lf (Mpc/h)\n",0.,1./(I_R... |
functions | void run_monopole_corr_pm(void)
{
//////
// Main routine for monopole using pm
lint n_dat;
double *grid;
Catalog cat_dat;
unsigned long long DD[NB_R];
double corr[NB_R],ercorr[NB_R];
timer(4);
#ifdef _VERBOSE
printf("*** Correlation function parameters: \n");
printf(" - Range: %.3lf < r < %... |
functions | void run_monopole_corr_p3m(void)
{
//////
} |
main | int main(int argc,char **argv)
{
//////
// Main routine
int ii;
char fnameIn[128];
if(argc!=2) {
printf("Usage ./CUTE_box <input file>\n");
exit(1);
} |
includes |
#include <string.h> |
includes | #include <stdlib.h> |
defines | #define _POSIX_C_SOURCE 200112L |
defines |
#define TAG "OIC_RI_PAYLOADPARSE" |
functions | OCStackResult OCParsePayload(OCPayload **outPayload, OCPayloadType payloadType,
const uint8_t *payload, size_t payloadSize)
{
OCStackResult result = OC_STACK_MALFORMED_RESPONSE;
CborError err;
VERIFY_PARAM_NON_NULL(TAG, outPayload, "Conversion of outPayload failed");
VERIFY_PARAM_NON_NULL(TAG, ... |
functions | OCStackResult OCParseSecurityPayload(OCPayload** outPayload, const uint8_t *payload,
size_t size)
{
if (size > 0)
{
*outPayload = (OCPayload *)OCSecurityPayloadCreate(payload, size);
} |
functions | CborError OCParseStringLL(CborValue *map, char *type, OCStringLL **resource)
{
CborValue val;
CborError err = cbor_value_map_find_value(map, type, &val);
VERIFY_CBOR_SUCCESS(TAG, err, "to find StringLL TAG");
if (cbor_value_is_array(&val))
{
CborValue txtStr;
err = cbor_value_enter_... |
functions | OCStackResult OCParseDiscoveryPayload(OCPayload **outPayload, CborValue *rootValue)
{
OCStackResult ret = OC_STACK_INVALID_PARAM;
OCResourcePayload *resource = NULL;
OCDiscoveryPayload *temp = NULL;
OCDiscoveryPayload *rootPayload = NULL;
OCDiscoveryPayload *curPayload = NULL;
size_t len = 0;
... |
functions | OCStackResult OCParseDevicePayload(OCPayload **outPayload, CborValue *rootValue)
{
OCStackResult ret = OC_STACK_INVALID_PARAM;
CborError err = CborNoError;
OCDevicePayload *out = NULL;
VERIFY_PARAM_NON_NULL(TAG, outPayload, "Invalid param outPayload");
VERIFY_PARAM_NON_NULL(TAG, rootValue, "Invalid ... |
functions | OCStackResult OCParsePlatformPayload(OCPayload **outPayload, CborValue *rootValue)
{
OCStackResult ret = OC_STACK_INVALID_PARAM;
CborError err = CborNoError;
OCPlatformInfo info = {0} |
functions | OCRepPayloadPropType DecodeCborType(CborType type)
{
switch (type)
{
case CborNullType:
return OCREP_PROP_NULL;
case CborIntegerType:
return OCREP_PROP_INT;
case CborDoubleType:
case CborFloatType:
return OCREP_PROP_DOUBLE;
case CborBoo... |
functions | CborError OCParseArrayFindDimensionsAndType(const CborValue *parent,
size_t dimensions[MAX_REP_ARRAY_DEPTH], OCRepPayloadPropType *type)
{
CborValue insideArray;
*type = OCREP_PROP_NULL;
dimensions[0] = dimensions[1] = dimensions[2] = 0;
CborError err = cbor_value_enter_container(parent, &insid... |
functions | else if (*type == OCREP_PROP_NULL)
{
// We don't know the type of this array yet, so the assignment is OK
*type = tempType;
} |
functions | else if (*type == OCREP_PROP_NULL)
{
// We don't know the type of this array yet, so the assignment is OK
*type = tempType;
} |
functions | else if (tempType != OCREP_PROP_NULL && *type != tempType)
{
// this is an invalid situation!
OIC_LOG(ERROR, TAG, "Array parse failed, mixed arrays not allowed");
return CborUnknownError;
} |
functions | size_t getAllocSize(OCRepPayloadPropType type)
{
switch (type)
{
case OCREP_PROP_INT:
return sizeof (int64_t);
case OCREP_PROP_DOUBLE:
return sizeof (double);
case OCREP_PROP_BOOL:
return sizeof (bool);
case OCREP_PROP_STRING:
retur... |
functions | size_t arrayStep(size_t dimensions[MAX_REP_ARRAY_DEPTH], size_t elementNum)
{
return
(dimensions[1] == 0 ? 1 : dimensions[1]) *
(dimensions[2] == 0 ? 1 : dimensions[2]) *
elementNum;
} |
functions | CborError OCParseArrayFillArray(const CborValue *parent,
size_t dimensions[MAX_REP_ARRAY_DEPTH], OCRepPayloadPropType type, void *targetArray)
{
CborValue insideArray;
size_t i = 0;
char *tempStr = NULL;
OCByteString ocByteStr = { .bytes = NULL, .len = 0} |
functions | CborError OCParseArray(OCRepPayload *out, const char *name, CborValue *container)
{
void *arr = NULL;
OCRepPayloadPropType type = OCREP_PROP_NULL;
size_t dimensions[MAX_REP_ARRAY_DEPTH] = { 0 } |
functions | CborError OCParseSingleRepPayload(OCRepPayload **outPayload, CborValue *objMap, bool isRoot)
{
CborError err = CborUnknownError;
char *name = NULL;
bool res = false;
VERIFY_PARAM_NON_NULL(TAG, outPayload, "Invalid Parameter outPayload");
VERIFY_PARAM_NON_NULL(TAG, objMap, "Invalid Parameter objMap")... |
functions | OCStackResult OCParseRepPayload(OCPayload **outPayload, CborValue *root)
{
OCStackResult ret = OC_STACK_INVALID_PARAM;
CborError err;
OCRepPayload *temp = NULL;
OCRepPayload *rootPayload = NULL;
OCRepPayload *curPayload = NULL;
CborValue rootMap = *root;
VERIFY_PARAM_NON_NULL(TAG, outPayload... |
functions | OCStackResult OCParsePresencePayload(OCPayload **outPayload, CborValue *rootValue)
{
OCStackResult ret = OC_STACK_INVALID_PARAM;
OCPresencePayload *payload = NULL;
VERIFY_PARAM_NON_NULL(TAG, outPayload, "Invalid Parameter outPayload");
*outPayload = NULL;
payload = (OCPresencePayload *)OICCalloc(1... |
includes | #include <stdio.h> |
functions | void NMI_Handler(void)
{} |
functions | void HardFault_Handler(void)
{
printf ("[Hard fault]\n");
while (1);
} |
functions | void SVC_Handler(void)
{} |
functions | void PendSV_Handler(void)
{} |
functions | void SysTick_Handler(void)
{} |
functions | void SSP0_Handler(void)
{} |
functions | void SSP1_Handler(void)
{} |
functions | void UART0_Handler(void)
{} |
functions | void UART1_Handler(void)
{} |
functions | void UART2_Handler(void)
{} |
functions | void I2C0_Handler(void)
{} |
functions | void I2C1_Handler(void)
{} |
functions | void PORT0_Handler(void)
{} |
functions | void PORT1_Handler(void)
{} |
functions | void PORT2_Handler(void)
{} |
functions | void PORT3_Handler(void)
{} |
functions | void DMA_Handler(void)
{} |
functions | void DUALTIMER0_Handler(void)
{} |
functions | void DUALTIMER1_Handler(void)
{} |
functions | void PWM0_Handler(void)
{} |
functions | void PWM1_Handler(void)
{} |
functions | void PWM2_Handler(void)
{} |
functions | void PWM3_Handler(void)
{} |
functions | void PWM4_Handler(void)
{} |
functions | void PWM5_Handler(void)
{} |
functions | void PWM6_Handler(void)
{} |
functions | void PWM7_Handler(void)
{} |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.