source
string
code_lang
string
content
string
idx
int64
the-stack-v2-dedup
C
/******************************************************************************* * * FILENAME : header.h * * DESCRIPTION : This file defines the macros and the structure of the node used for the list. * *******************************************************************************/ /***********...
1,329,300
the-stack-v2-dedup
C
/* * modified by winktzhong@gmail.com * source from linux 3.0.8 kernel/timer.c */ #include <stdlib.h> #include <errno.h> #include <assert.h> #include "mtimer.h" #define spin_lock(x) #define spin_unlock(x) #define spin_lock_irqrestore(x, y) #define spin_unlock_irqrestore(x, y) #define spin_lock_i...
1,329,301
the-stack-v2-dedup
C
#include <stdio.h> /* 1. Create a char type variable and initialize it to value 100 2. Print the address of the above variable 3. Create a pointer variable and store the address of the above variable 4. Perform read operation on the pointer variable to fetch 1 byte of data from the pointer 5. Print the dat...
1,329,302
the-stack-v2-dedup
C
#include <stdio.h> struct a{ int a; int b; int c[2]; }; void fun(struct a B) { B.c[0]=6; } main() { struct a var,var2; var.a=2; var.b=5; var.c[0]=5; printf("%d %d %d\n", var.a,var.b,var.c[0] ); fun(var); printf("%d %d %d", var.a,var.b,var.c[...
1,329,303
the-stack-v2-dedup
C
#ifndef XEN_QUAD_CTRL_H #define XEN_QUAD_CTRL_H /* Remote update loop rate */ #define LOOP_RATE_HZ 20 /* Gyro low-pass filter weight */ #define GYRO_LP_WEIGHT (0.2) /* Acc low-pass filter weight */ #define ACC_LP_WEIGHT (0.2) /* IMU kalman filtering */ #define K_ANGLE_WEIGHT (2.0) #define K_GYRO_WEIGHT (3.0) #endif...
1,329,304
the-stack-v2-dedup
C
/* * This is a RANDOMLY GENERATED PROGRAM. * * Generator: csmith 2.2.0 * Git version: dcef523 * Options: --no-structs --no-pointers --no-math64 --max-funcs 4 --no-unions --output 4579.c * Seed: 330566558 */ #include "csmith.h" static long __undefined; /* --- Struct/Union Declarations --- */ /* --- GLO...
1,329,305
the-stack-v2-dedup
C
/** * ffmpeg_decoder.c * * Created on: 2011-3-28 * Author: Lijinxin * Copyright: 迅雷网络 */ #include "ekk_base/ekk_define.h" #include "ekk_base/ekk_logger.h" #include "ekk_decoder/ffmpeg_decoder.h" #include "ekk_decoder/codecskiplevel.h" #include "ekk_player/ekk_queue_new.h" #include "ekk_common/ekk_comm...
1,329,306
the-stack-v2-dedup
C
/***************************************************************************** * \file node_instance.c * \author Conny Gustafsson * \date 2019-12-02 * \brief Parent container for all things node-related. * * Copyright (c) 2019-2021 Conny Gustafsson * Permission is hereby granted, free of charge, to any...
1,329,307
the-stack-v2-dedup
C
#include "emulator.h" #include "emulator_utilities.h" /* * This allocates the memory and registers in the heap dynamically. The calloc() function initialises the allocated * space to 0 so there is no need to do this manually. */ State initialize_CPU() { State cpu; cpu.memory = calloc(NUM_MEMORY_LOCATIONS, ...
1,329,308
the-stack-v2-dedup
C
#include <stdio.h> int x=3; #define x x+x void main(){ printf("%d",x*x); }
1,329,309
the-stack-v2-dedup
C
#include "malloc.h" void *safe_malloc(void *p, size_t s) { p = malloc(s); if (p == NULL) { exit(1); } return p; }
1,329,310
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_gcmd.c :+: :+: :+: ...
1,329,311
the-stack-v2-dedup
C
#ifndef JOY_H_ #define JOY_H_ #include <custom.h> static inline int isrmbdown(void) { return (!(custom->potgor & POTGOF_DATLY)); } #endif
1,329,312
the-stack-v2-dedup
C
../../stm32f439/C/default_handlers.c
1,329,313
the-stack-v2-dedup
C
int maze_n = 1; int maze_w = 23; int maze_h = 17; int maze_flags = 0; const char *maze_args = "READY=\" READY!\" GAMEOVER=\"GOODBYE\" PLAYER1=\" P ONE \" PLAYER2=\" P TWO \" RGHOST=7.5 ROGHOST=1 COGHOST=0.5 RFRUIT=9.5 RTOP=5.5 RHERO=13.5 RMSG=8 CMSG=8 RMSG2=6 CMSG2=8 ABOUT=\"Inspired by Atari\'s 2600 game called \\\"Pa...
1,329,314
the-stack-v2-dedup
C
#include"analyzer.h" #include<stdio.h> #include<stdlib.h> #include<math.h> analyzer_t * analyzer_create(){ analyzer_t * res = (analyzer_t *) malloc( sizeof(analyzer_t) ); res->capacity = 4; res->cost = (double *) malloc( sizeof(double) * res->capacity ); res->cumulative_cost = (long double *) malloc( sizeof(lo...
1,329,315
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_wstr_memsize.c :+: :+: :+: ...
1,329,316
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_toupper.c :+: :+: :+: ...
1,329,317
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_fill_sub.c :+: :+: :+: ...
1,329,318
the-stack-v2-dedup
C
#ifndef _VMXEPT_H #define _VMXEPT_H #include "minihv.h" #include "epthook.h" #define EPT_TABLE_ENTRIES_SIZE 512 #define EPT_4LEVELS_POINTER 0x18 #define EPT_FULL_RIGHTS 0x7 #define EPT_READ_RIGHT 0x1 #define EPT_WRITE_RIGHT 0x2 #define EPT_EXEC_RIGHT 0x4 ...
1,329,319
the-stack-v2-dedup
C
#include <sys/mman.h> void *mmap(void *addr, size_t length, int prot, int flags, int fd, off_t offset) { return NULL; } int munmap(void *addr, size_t length) { return -1; }
1,329,320
the-stack-v2-dedup
C
#ifndef CLIENT_LISTENER_PRIVATE_IS_DEFINED #define CLIENT_LISTENER_PRIVATE_IS_DEFINED #include "ClientListener.h" /*******Private Structs*******/ struct epoll_pack { int efd; struct epoll_event event; struct epoll_event triggered_events[DEFAULT_BACKLOG_SIZE]; }; /*****************************/ /* Object used for ...
1,329,321
the-stack-v2-dedup
C
#define NULL ((void*)0) typedef unsigned long size_t; // Customize by platform. typedef long intptr_t; typedef unsigned long uintptr_t; typedef long scalar_t__; // Either arithmetic or pointer type. /* By default, we understand bool (as a convenience). */ typedef int bool; #define false 0 #define true 1 /* Forward d...
1,329,322
the-stack-v2-dedup
C
#define CONST_BITS 8 #define PASS1_BITS 2 #define FIX_1_082392200 ((INT32) 277) /* FIX(1.082392200) */ #define FIX_1_414213562 ((INT32) 362) /* FIX(1.414213562) */ #define FIX_1_847759065 ((INT32) 473) /* FIX(1.847759065) */ #define FIX_2_613125930 ((INT32) 669) /* FIX(2.613125930) */ #ifndef USE_...
1,329,323
the-stack-v2-dedup
C
/* Example C code for solving a linear system Ax=b using LAPACK */ #include <stdio.h> /* Declare function prototype */ extern int sgesv_(int *n, int *nrhs, float *a, int *lda, int *ipiv, float *b, int *ldb, int *info); /* -- LAPACK driver routine (version 3.1) -- Purpose ======= ...
1,329,324
the-stack-v2-dedup
C
/* * MyTimer.c * * Created: 29-Oct-20 12:06:35 PM * Author: Mohammed Ashraf */ #include "MyTimer.h" /* //Interrupt Service Routine ISR(TIMER0_OVF_vect) { //clk = 16000000/1024 = 15625 cycles. //15625/255 = 61 over flow per second. static int count =0 ; count++; if(count==61) //Once every second. { ...
1,329,325
the-stack-v2-dedup
C
int __fastcall itemid_get_battle_function(unsigned __int16 a1) { return *(_DWORD *)&gItems[22 * (unsigned __int16)itemid_sanitize(a1) + 18]; }
1,329,326
the-stack-v2-dedup
C
#include <string.h> #include "main.h" int readSettings(int *sock_port, const char *data_path) { TSVresult tsv = TSVRESULT_INITIALIZER; TSVresult* r = &tsv; if (!TSVinit(r, data_path)) { TSVclear(r); return 0; } char *str = TSVgetvalues(r, 0, "port"); if (str == NULL) { ...
1,329,327
the-stack-v2-dedup
C
/* ****************************************************************************** * * VRAY_clusterThisPostProcess * * $RCSfile: VRAY_clusterThisPostProcess.C,v $ * * Description : * * ***************************************************************************** */ #ifndef __VRAY_clusterThisPostProcess_C__ #define _...
1,329,328
the-stack-v2-dedup
C
/****************************************************************************** Online C Compiler. Code, Compile, Run and Debug C program online. Write your code in this editor and press "Run" button to compile and execute it. ***********************************************...
1,329,329
the-stack-v2-dedup
C
#include "z_en_okarina_tag.h" #define FLAGS 0x02000010 #define THIS ((EnOkarinaTag*)thisx) void EnOkarinaTag_Init(Actor* thisx, GlobalContext* globalCtx); void EnOkarinaTag_Destroy(Actor* thisx, GlobalContext* globalCtx); void EnOkarinaTag_Update(Actor* thisx, GlobalContext* globalCtx); /* const ActorInit En_Okarin...
1,329,330
the-stack-v2-dedup
C
/** * Laborator 8 SDA-AB: Algoritmi de sortare 2 * Author: Iulian-Razvan Matesica <iulian.matesica@gmail.com> */ #include <stdio.h> #include <stdlib.h> #include <time.h> /* DO NOT TOUCH THIS :D (IT'S... IT'S.. MAGIC!) */ #define swap(a, b) do { \ int __tmp = (a); \ (a) = (b); \ (b) = __tmp; ...
1,329,331
the-stack-v2-dedup
C
/* ---------------------------------------------------------------------------- * ATMEL Microcontroller Software Support * ---------------------------------------------------------------------------- * Copyright (c) 2008, Atmel Corporation * * All rights reserved. * * Redistribution and use in sou...
1,329,332
the-stack-v2-dedup
C
#ifndef AT_CLIENT_RADIO_H #define AT_CLIENT_RADIO_H typedef enum eAtError { AT_ER_OK=0, AT_ER_CREAT_RESP, AT_ER_SEND_ERROR, AT_ER_SEND_TIMEOUT, AT_ER_GET_LINE, AT_ER_GET_KW, AT_ER_PARSE_LINE, AT_ER_PARSE_KW, AT_ER_OTHER, }AtError_t; typedef struct sAtUartCfg { int baudrate; int databits; in...
1,329,333
the-stack-v2-dedup
C
int main(int argc, char *argv[]){ int a, b; a = factorial(5); b = nPr(5, 2); printf("%d\n %d", a, b); return 0; }
1,329,334
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <time.h> int main() { srand (time(NULL)); for(int a=1; a<=20; a++) { printf ( "%d ", 1+rand()%6 ); } printf("\n"); return 0; }
1,329,335
the-stack-v2-dedup
C
#include "StdInfoAndGrade_2.h" /* struct13_1 struct 성적{} ; struct 신상{ 번호 이름 주소 성적 구조체멤버변수[3] 3개 학년 */ void main() { int sNum = 0; Prof *pFrd = NULL; // Prof frd = { {0}, } sNum = inputNum(); //sNum = inputNum(); //동적 배열 만들기 pFrd = (Prof *)malloc(sNum * sizeof(Prof)); //Prof *pFrd = (Prof *)...
1,329,336
the-stack-v2-dedup
C
#include "uart1.h" //we use uart //for easier porting #define UARTx USART1 //uart module in use here //reset the uart //initialize uart1 void uart1_init(uint32_t baudrate) { //configure uart1 //route clock to uart1 RCC->APB2ENR |= RCC_APB2ENR_USART1EN; UARTx->CR1 &=~(1<<13); ...
1,329,337
the-stack-v2-dedup
C
/* * Synopsys DWC Ethernet Quality-of-Service v4.10a linux driver * * Copyright (C) 2016 Joao Pinto <jpinto@synopsys.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. * *...
1,329,338
the-stack-v2-dedup
C
#include <stdio.h> #include <stdbool.h> #include <math.h> int main(int argc, char** argv) { unsigned long long a = 1, b = 1, c; unsigned long long step = 0; while (true) { if (b > 9223372036854775807) { fprintf(stderr, "'b' too large at step %llu\n", step); fflush(stderr);...
1,329,339
the-stack-v2-dedup
C
#ifndef _LIB_H_ #define _LIB_H_ #include <stdint.h> //#define GPIOx_MODER //#define GPIOx_OTYPER //#define GPIOx_OSPEEDR //Output speed //#define GPIOx_PUPDR // //#define GPIOx_IDR //input data //#define GPIOx_ODR //output data //#define GPIOx_BSRR //Set - reset //#define GPIOx_LCKR //locker //#define GPIOx_AF...
1,329,340
the-stack-v2-dedup
C
#include <stdint.h> #include <string.h> #include <unistd.h> #include <stdio.h> #include <stdlib.h> #include <getopt.h> #include <fcntl.h> #include <errno.h> #include <sys/ioctl.h> #include <linux/types.h> #include <linux/spi/spidev.h> #include "temperature.h" int main(int argc, char **argv){ char *buffer; int file; ...
1,329,341
the-stack-v2-dedup
C
#include <bson.h> #include <bcon.h> #include <mongoc.h> #include <stdio.h> #include <string.h> #include <stdlib.h> #include "grid.h" char *getGridID(char *modelName, char *fileName, char str[25]){ const char *uri_str = "mongodb://localhost:27017"; mongoc_client_t *client; char *id_str; bson_error_t error; ...
1,329,342
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <math.h> #include <string.h> int main(){ int numcasos, i, tam; int low, high; int walls[51]; scanf("%d", &numcasos); for(i = 1; i <= numcasos; i++){ low = 0; high = 0; scanf("%d", &tam); for(int j = 0; j < tam; j++){ ...
1,329,343
the-stack-v2-dedup
C
#include <Oxidian/lib/lib_empty.h> unsigned int lib_empty_cempty(OEnvironment *Oenviron) { return ERR_NOLIB; } OCall lib_empty_calls[LIB_EMPTY_LNCALLS] = { {.name = "empty", .description = "doesn't exist :P", .function=lib_empty_cempty} };
1,329,344
the-stack-v2-dedup
C
/*{{{ module header */ /* * 16 bit integer arithmetic * Copyright (C) 1987 Inmos Limited * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your...
1,329,345
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <time.h> void sum_int_array(int* numbers, int length, int* sum); int main() { srand(time(0)); const int number_of_items = 200; int numbers[number_of_items]; for (int i = 0; i < number_of_items; ++i) { numbers[i] = rand() % 50; } int sum = 0; sum_int_ar...
1,329,346
the-stack-v2-dedup
C
#include "holberton.h" /** * *_strncat - concatenates two strings * * @dest: pointer * * @src: pointer * * @n: number of bytes * * Return: string */ char *_strncat(char *dest, char *src, int n) { int c, d; c = 0; d = 0; while (*(dest + c) != '\0') { c++; } while (d < n) { if (*(src + d) == '\0')...
1,329,347
the-stack-v2-dedup
C
#include <stdio.h> void strcatI(char* s, char* t); int main() { char uguu[100] = "uwu"; char* OwO = "Hello memes"; printf("a: %s b: %s\n", uguu, OwO); strcatI(uguu, OwO); printf("a: %s b: %s\n", uguu, OwO); } void strcatI(char* s, char* t) { //Find end of s while(*++s) ; /...
1,329,348
the-stack-v2-dedup
C
#define F_CPU 8e6 #include <avr/io.h> #include <util/delay.h> #include <avr/interrupt.h> #define LCD_E 3 #define LCD_RS 2 void lcd_strobe_lcd_e(void); void init_4bits_mode(void); void lcd_write_string(char *str); void lcd_write_data(unsigned char byte); void lcd_write_cmd(unsigned char byte); void lcd_strobe_lcd_e(v...
1,329,349
the-stack-v2-dedup
C
/* ********************************************************************************************************* * MICIRUM BOARD SUPPORT PACKAGE * * (c) Copyright 2014; Micrium, Inc.; Weston, FL * * All rights reserved. Protected by internationa...
1,329,350
the-stack-v2-dedup
C
/* * timer1.c * * Created on: May 4, 2014 * Author: Shawn Quinn */ #define __TIMER1_C__ #include "lpc-2478-stk.h" #include "init.h" #include "uw.h" #include "timer1.h" #include "print.h" // configure timer1 to generate an interrupt on match void initTimer1(uint32_t cclk) { uint32_t match; uint8_t ...
1,329,351
the-stack-v2-dedup
C
#ifndef __draw_H #define __draw_H #include <windows.h> #include <gfx.h> #include "util.h" void draw_object(context_t *context, int x, int y, uint32_t color) { gfx_fillrect(context, (x + 0.1) * 20, (y + 2.2) * 20, ((x + 0.1) * 20) + 20, ((y + 2.2) * 20) + 20, color); } void draw_background(context_t *context, windo...
1,329,352
the-stack-v2-dedup
C
/* ** EPITECH PROJECT, 2021 ** i_monsters_data.c ** File description: ** i_monsters_data function */ #include "my.h" #include "struct.h" void i_health_and_clock_limiter(scenes_t *scn, int i) { if (scn->objs[i]->type == SM_ENEMY) { scn->objs[i]->health = 5; scn->objs[i]->clock_limiter_anim = 40; ...
1,329,353
the-stack-v2-dedup
C
/** * @TODO comment * * */ #ifndef _TIMAIOS_HEADER_TIME_ #define _TIMAIOS_HEADER_TIME_ int tm_gettimeofday(); #endif
1,329,354
the-stack-v2-dedup
C
../../PathCover/PathCover/XHSoundManager.h
1,329,355
the-stack-v2-dedup
C
#include "camalloc.h" #include "shims.h" #include <string.h> #include <unistd.h> ssize_t read(int fd, void *buf, size_t count) { ca_nocipher(buf); ssize_t result = libc_read(fd, buf, count); /* if (fd == 0) { safe_print("Intercepted:"); write(1, buf, count); write(1, "\n", 1); } */ ca_recipher(buf); retu...
1,329,356
the-stack-v2-dedup
C
#include<stdio.h> int main() { int num, i; printf("Enter a number\n"); scanf("%d",&num); i=2; while(i<=num-1) { if(num % i==0) { printf("Not a prime number\n"); break; } i++; } if(i == num) printf("Prime number\n"); }
1,329,357
the-stack-v2-dedup
C
#ifndef TEST_H #define TEST_H #include <check.h> #include <sp-util.h> #include <stdlib.h> void array_suite(Suite *spawny_suite); void manager_suite(Suite *spawny_suite); void template_suite(Suite *spawny_suite); void spawnregistery_suite(Suite *spawny_suite); void util_suite(Suite *spawny_suite); #endif
1,329,358
the-stack-v2-dedup
C
/* Glidix GUI Copyright (c) 2014-2017, Madd Games. All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: * Redistributions of source code must retain the above copyright notice, this list of condi...
1,329,359
the-stack-v2-dedup
C
/* * thread header * * File: thread.h * Date: 2018-9-8 17:32:33 * */ #ifndef __THREAD_H__ #define __THREAD_H__ typedef void * threadHandle_t; threadHandle_t threadAddListeningFile(const char *name, int fd, void *data, void (*function)(void *)); void threadRemoveListeningFile(threadHandle_t handle); threadH...
1,329,360
the-stack-v2-dedup
C
long _modslong (long a, long b) { long r; r = (unsigned long)(a < 0 ? -a : a) % (unsigned long)(b < 0 ? -b : b); if (a < 0) return -r; else return r; }
1,329,361
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_strcmp.c :+: :+: :+: ...
1,329,362
the-stack-v2-dedup
C
#include <stdio.h> #include <cs50.h> int main (void) { for(int d=0;d<=1;d++) { printf("height:"); int h = GetInt(); if (h>23||h<0) { printf("wrong entery the hight must be integer no greater than 23\n"); d--; } else { for(int i=1;i<=h;i++) ...
1,329,363
the-stack-v2-dedup
C
#include <weapon.h> #include <ansi.h> inherit SWORD; void create() { set_name(MAG"黑玫瑰之劍"+NOR, ({ "black rose sword","sword" }) ); set_weight(4000); if( clonep() ) set_default_object(__FILE__); else { set("unit", "把"); set("long", "黑玫瑰之劍,受詛...
1,329,364
the-stack-v2-dedup
C
//---------------------------------------------------------- // // Name: Alan Cheng // SID: 861094564 // // CS 120B Final Project: GlowPong // // Filename: utilities.h // // Disclaimer: Me and Natalie made this for lab, and are currently // reusing it for the final project // //-----------------------------------...
1,329,365
the-stack-v2-dedup
C
#include "either.H" #include "test2.H" #include "either.tmpl" #include "orerror.tmpl" #include "serialise.tmpl" #include "test2.tmpl" class tracklife { public: bool &destruct; public: tracklife(bool &construct, bool &_destruct) : destruct(_destruct) { assert(!construct); construct = true; } public: ~track...
1,329,366
the-stack-v2-dedup
C
../../common/detector/ZXWhiteRectangleDetector.h
1,329,367
the-stack-v2-dedup
C
#include <stdio.h> #include "ansys.h" #define p(...) printf(__VA_ARGS__), fflush(stdout); static void b_task(void *d) { p("example: b_task: start\n"); ansys_yield(); p("example: b_task: end\n"); } static void a_task(void *d) { p("example: a_task: start\n"); ansys_yield(); p("example: a_task:...
1,329,368
the-stack-v2-dedup
C
// KeInitializePriQueue int __fastcall KeInitializePriQueue(int result, int a2) { _DWORD *v2; // r3 int v3; // r2 int v4; // r4 *(_BYTE *)result = 21; *(_BYTE *)(result + 2) = 103; *(_BYTE *)(result + 1) = 0; *(_DWORD *)(result + 4) = 0; *(_DWORD *)(result + 8) = result + 8; *(_DWORD *)(result + 1...
1,329,369
the-stack-v2-dedup
C
#include<stdio.h> #include<stdlib.h> #include<unistd.h> #include<fcntl.h> int main(void) { char *fname = "ssu_test.txt"; int fd; if((fd = creat(fname, 0666)) < 0){ //파일을 생성한다. 이미 있을 경우 내용 다 지움 printf("creat error for %s\n", fname); exit(1); } printf("First printf is on the screen.\n"); dup2(fd, 1); //파일 ...
1,329,370
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_sort_wordtab.c :+: :+: :+: ...
1,329,371
the-stack-v2-dedup
C
#ifndef RIBSTRUCT_H #define RIBSTRUCT_H #include <unit.h> // Структура содержит юнит, // предполагаемое расстояние до пункта назначения по X и Y, // орбиту и зону приземления struct ribStruct{ unit oneUnit; double diff_X; double diff_Y; int orbit; int area; }; #endif // RIBSTRUCT_H
1,329,372
the-stack-v2-dedup
C
//infix 수식을 postfix로 변환하는 프로그램 #include <stdio.h> #include <stdlib.h> #define MAX_STACK_SIZE 100 typedef char Element; Element data[MAX_STACK_SIZE]; int top; void error(char str[]) { printf("%s \n", str); exit(1); } void init_stack() {top = -1;} int is_empty() {return top == -1;} int is_full() {return top == ...
1,329,373
the-stack-v2-dedup
C
#include <linux/module.h> #include <linux/types.h> #include <linux/fs.h> #include <linux/errno.h> #include <linux/mm.h> #include <linux/sched.h> #include <linux/init.h> #include <linux/cdev.h> #include <asm/io.h> #include <asm/switch_to.h> #include <asm/uaccess.h> #include <linux/slab.h> #include <linux/poll.h> //---...
1,329,374
the-stack-v2-dedup
C
#ident "$Id: insert.c,v 5.1 2001/06/21 08:01:01 cha Exp $" /* * Inserts to the database * ******************************************************************************* * $Log: insert.c,v $ * Revision 5.1 2001/06/21 08:01:01 cha * Updated to handle correctly the Money datatype. * * Revision 5.0 2001/06/19 ...
1,329,375
the-stack-v2-dedup
C
#include "Programa.h" struct Programa { char nome[64]; Hash *variaveis; Hash *funcoes; int compilado; // 0 para nao. 1 para sim. MasterNode *aExec; }; Programa *criaPrograma(char *nome) { Programa *p = (Programa*) malloc (sizeof(Programa)); strcpy(p->nome,nome); p->compilado = 0; p->variaveis = criaHash(40...
1,329,376
the-stack-v2-dedup
C
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <time.h> #include <stdint.h> #include <string.h> //#include "versions.h" #include "can_check.h" void receive_t (Tst_trame data) { int i = 0; //printf (" %x\n",data.taille); for (i = 0; i < 6; i++) { printf ("%02x ", data.data[i]); } ...
1,329,377
the-stack-v2-dedup
C
/** * bus2.h */ #ifndef _BUS2_H_ #define _BUS2_H_ #include "avr.h" void bus2_init(); #endif /* _BUS2_H_ */
1,329,378
the-stack-v2-dedup
C
/*-------------------------------------------------------------------- This source distribution is placed in the public domain by its author, Jason Papadopoulos. You may use it for any purpose, free of charge, without having to notify anyone. I disclaim any responsibility for any errors, inconsistencies, and inaccuraci...
1,329,379
the-stack-v2-dedup
C
//To get what happening in the preprocessor (gcc -E) #include<sys/queue.h> //BSD libc in c for Linked List, queues,... #include<stdio.h> //Macro with for loops #define myloop for(int i = 0; i < 3; i++) //Question 6 #define square(x) x*x #define square2(x) (x*x) //Question 8 int X = 5; ...
1,329,380
the-stack-v2-dedup
C
#include<stdio.h> #include<stdlib.h> #include<math.h> #define MAX 2000000 int main() { long long *a, i, p, sum=0, limit; limit=sqrt(MAX); a=malloc(sizeof(long long)* MAX); for(i=0; i<MAX; i++) a[i]=i+1; for(i=2; i<=MAX/2; i++) { if(a[i]!= -1) { for(p=2; i*p<=...
1,329,381
the-stack-v2-dedup
C
#include <stdio.h> #include <stdlib.h> #include <strings.h> #include <string.h> #include <errno.h> #include "picross.h" #include "cwebserv.h" void _stradd(char **buf, size_t *bufend, size_t *buflen, const char *addition, size_t addlen) { // concatenates the string addition (with length addlen) into *buf ...
1,329,382
the-stack-v2-dedup
C
/* * Copyright (c) 2009 Daniel Mack <daniel@caiaq.de> * Copyright (C) 2010 Freescale Semiconductor, Inc. * * SPDX-License-Identifier: GPL-2.0+ */ #include <common.h> #include <usb.h> #include <errno.h> #include <linux/compiler.h> #include <usb/ehci-fsl.h> #include <asm/io.h> #include <asm/arch/imx-regs.h> #includ...
1,329,383
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_array_inner_op.c :+: :+: :+: ...
1,329,384
the-stack-v2-dedup
C
#region Local Var var uLocal_0 = 0; var uLocal_1 = 0; int iLocal_2 = 0; int iLocal_3 = 0; int iLocal_4 = 0; int iLocal_5 = 0; int iLocal_6 = 0; int iLocal_7 = 0; int iLocal_8 = 0; int iLocal_9 = 0; int iLocal_10 = 0; int iLocal_11 = 0; var uLocal_12 = 0; var uLocal_13 = 0; float fLocal_14 = 0f; var uLoc...
1,329,385
the-stack-v2-dedup
C
/* El juego de dados conocido como “craps” (tiro perdedor) es muy popular, realice un programa que simule dicho juego, a continuación se muestran las reglas para los jugadores. • Un jugador tira dos dados. Cada dato tiene seis caras. Las caras contienen 1, 2, 3, 4, 5 y 6 puntos. • Una vez que los dados se hayan detenid...
1,329,386
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* get_type.c :+: :+: :+: ...
1,329,387
the-stack-v2-dedup
C
/** * @file src/app/connected/applib/inc/transcoder/still_decode/ApplibTranscoder_Thumb_Basic.h * * The apis provide basic function for retrieving IDR frame * * History: * 2015/03/17 - [cichen] Create file * * Copyright (C) 2013, Ambarella, Inc. * * All rights reserved. No Part of this file may be reproduc...
1,329,388
the-stack-v2-dedup
C
/***************************************************************************** * Copyright Statement: * -------------------- * This software is protected by Copyright and the information contained * herein is confidential. The software may not be copied and the information * contained herein may not be used o...
1,329,389
the-stack-v2-dedup
C
#include <stdio.h> #include <signal.h> #include <sys/types.h> #include <sys/wait.h> #include <stdlib.h> #include <unistd.h> #include <time.h> #include <string.h> int isboltz(int x) { if (x%7 == 0) return 1; while(x != 0){ if (x%10 == 7) return 1; x /= 10; } return 0; } int main(int argc, char*...
1,329,390
the-stack-v2-dedup
C
#ifndef MAIN_H #define MAIN_H #include "types.h" #include "draw.h" typedef enum { MENU_DRAW, MENU, APP_INIT, PLAYING, DRAW_PAUSED, PAUSED, DRAW_RULES, RULES, LOST, } GameState; void drawMenu(); void drawPauseMenu(); void drawRules(); void drawLost(); void clearScreen(); void drawL...
1,329,391
the-stack-v2-dedup
C
/********************************************************/ /* */ /* WiSS Storage System */ /* Version SystemV-4.0, September 1990 */ /* */ /* COPYRIGH...
1,329,392
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_isdigit.c :+: :+: :+: ...
1,329,393
the-stack-v2-dedup
C
#include <stdio.h> int rev_ad(long int n) { long int sum = 0; while(n>0){ sum = sum*10+n%10; n = n/10; } return sum; } int main() { long int t, i, n, count, N, S, s; scanf("%ld", &t); for(i=1; i<= t; i++){ scanf("%ld", &n); N = n+rev_ad(n); count...
1,329,394
the-stack-v2-dedup
C
#include "synth.h" #include "heaplib.h" int inv(solution_t *sol, word_t args[NARGS]) { word_t res[NRES]; exec(&sol->progs[0], args, res); return res[0]; } int check(solution_t *sol, word_t args[NARGS]) { word_t res[NRES]; for (int i = 0; i < NARGS; i++) { if (!is_ptr(args[i])) { return 1; }...
1,329,395
the-stack-v2-dedup
C
#include "sys.h" #include "delay.h" #include "usart.h" #include "led.h" #include "beep.h" #include "key.h" #include "oled.h" int main(void) { u8 t; u8 len; u16 times=0; u16 distance, x, y; NVIC_PriorityGroupConfig(NVIC_PriorityGroup_2);//设置系统中断优先级分组2 delay_init(168); //延时初始化 uart_init(115200); //串口初始...
1,329,396
the-stack-v2-dedup
C
//Background converted using Mollusk's PAImageConverter //This Background uses editor_new_Pal int editor_new_Width = 256; int editor_new_Height = 192; const unsigned short editor_new_Map[768] __attribute__ ((aligned (4))) = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9...
1,329,397
the-stack-v2-dedup
C
/* ************************************************************************** */ /* */ /* ::: :::::::: */ /* ft_memdel.c :+: :+: :+: ...
1,329,398
the-stack-v2-dedup
C
#include "SortedList.h" //for the 4 functions that was implemented #include <getopt.h> //for getopt long options #include <pthread.h> //pthread library, remember to compile with -pthread #include <stdlib.h> #include <stdio.h>/* for printf */ #include <stdlib.h>/* for exit() definition */ #include <time.h>/* for clock_...
1,329,399