text stringlengths 3.08k 10.5k |
|---|
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
typedef uint8_t** Grid;
const uint8_t grid[9][9] = {
{8,0,0, 0,0,0, 0,0,0},
{0,0,3, 6,0,0, 0,0,0},
{0,7,0, 0,9,0, 2,0,0},
{0,5,0, 0,0,7, 0,0,0},
{0,0,0, 0,4,5, 7,0,0},
{0,0,0, 1,0,0, 0,3,0},
{0,0,1, 0,0,0, 0,6,8},
{0,0,8, 5,0,0, 0,1,0},
... |
#include "raytracer.h"
/**
* Calculates the ray corresponding to the (0,0) pixel
*
* @param A: Image plane
* @param B: Origin point of the image
*
* @return the ray corresponding to the (0,0) pixel
*/
Line calculateFirstRay (Plane image, Point origin){
Line firstRay;
Vector directionVector;
firstRay.pt = ... |
/******************************************************************************
*
* Copyright (C) 2015 The Android Open Source Project
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at:
... |
#include "stdinc.h"
#include "channel.h"
#include "client.h"
#include "hash.h"
#include "match.h"
#include "ircd.h"
#include "numeric.h"
#include "send.h"
#include "s_newconf.h"
#include "s_conf.h"
#include "s_serv.h"
#include "msg.h"
#include "parse.h"
#include "modules.h"
#include "packet.h"
#include "tgchange.h"
#in... |
#include <nuon/dma.h>
#include <nuon/bios.h>
#include <nuon/mml2d.h>
#include <nuon/mutil.h>
#include <nuon/msprintf.h>
#include <stdio.h>
#define YSTART (25) // Y-pos of top of color square
#define X_TEXT1 (55) // X-pos of "Y" value display
#define Y_TEXT1_TOP (25) // Y-pos of top of "Y" value display... |
/* Copyright (C) 2011-2016 OldTimes Software
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 option) any later version.
This program is distributed ... |
/** t-openpgp.c -- OpenPGP regression test **/
#include "gnutls_int.h"
#include "errors.h"
#include "mpi.h"
#include "cert.h"
#include "datum.h"
#include "global.h"
#include "auth/cert.h"
#include "openpgp.h"
#include <str.h>
#include <stdio.h>
#include <gcrypt.h>
#include <time.h>
#include <assert.h>
static const c... |
/* SPDX-License-Identifier: BSD-2-Clause */
#pragma once
#include <tilck/common/basic_defs.h>
#include <tilck/kernel/signal.h>
#include <features.h> // system header
#if defined(__GLIBC__) && !defined(__USE_LARGEFILE64)
#define __USE_LARGEFILE64
#endif
#include <sys/types.h> // system header
#include <sys/tim... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdarg.h>
#include <stddef.h>
/*
* mhash.h has a habit of pulling in assert(). Let's hope it's a define,
* and that we can undef it, since Varnish has a better one.
*/
#include <mhash.h>
#ifdef assert
# undef assert
#endif
#include "vrt.h"
#inclu... |
/**
* \file
*
* \brief XMEGA E Quadrature decoder test signal generation main file. It
* generates a quadrature encoded signal used for decoder testing.
*
* Copyright (C) 2014 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and bin... |
#include <kernel/drivers/rtc/clock.h>
#include "math.h"
#include "rand.h"
double pow(double x, double pow) {
double ret = x;
for (int i = 0; i < pow; i++) {
ret *= x;
}
return ret;
}
unsigned long factorial(unsigned long x) {
if (x == 0) return 1;
return (x * factorial(x - 1));
/*
int ret = 1;
for (int i =... |
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
#define niub 14944926
#define longniub 8
#define dim 4
#define tol 10e-10
void buildMatrix( double** );
void print( double** );
int indmaxabs( double**, int );
int palu( double** , int* );
void separate( double** , double** );
double det( double** );
void solveU(... |
/**
* <NAME> <<EMAIL>>
**/
#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <errno.h>
#include "dllist.h"
#define START_TEST printf("start %s....", __func__)
#define FIN_TEST printf("end\n")
void test_createEmptyDLList() {
DLList*... |
/**
@file
plussz2.c - a version of plussz2 that demonstrates the use of proxy inlets.
see plussz.c for more comments and information.
@ingroup examples
*/
#include "ext.h" // you must include this - it contains the external object's link to available Max functions
#include "ext_obex.h" // this is required fo... |
/*
* Copyright (C) 2009-2011 <NAME> <nick<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE A... |
/*
* Copyright (C) 2020 Southern Storm Software, Pty Ltd.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, ... |
/* $Id: bootp.h 69500 2017-10-28 15:14:05Z vboxsync $ */
/** @file
* NAT - BOOTP/DHCP server emulation (declarations/defines).
*/
/*
* Copyright (C) 2006-2017 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free softwar... |
/*-
* Copyright (c) 1999 <NAME>
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions a... |
/*
* This file is part of the UCB release of Plan 9. It is subject to the license
* terms in the LICENSE file found in the top-level directory of this
* distribution and at http://akaros.cs.berkeley.edu/files/Plan9License. No
* part of the UCB release of Plan 9, including this file, may be copied,
* modified, prop... |
#include "target.h"
#include "../tools/aes_128/aes_128.h"
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <stdlib.h>
/*
* Decode a secret byte by bitfliping the (block-1) corresponding byte in order to create a valid padding.
* From the padding length of byte value, we th... |
/*
* Sound/Music functions
*
* Components:
* Arduino board
* 8-Ohm Speaker
*
* Wiring:
* Pin 10 goes to speaker's "+" pole
* Speaker's "-" pole goes to GND (ground) via 100 Ohm resistor
*
* Based on:
* http://itp.nyu.edu/physcomp/labs/labs-arduino-digital-and-analog/tone-output-using-an-arduino/... |
/*
Copyright (C) 2014 by <NAME> <<EMAIL>>
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 option) any later version.
This program is distributed in the h... |
/*
* Copyright (c) 2011, Intel Corporation
* 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 li... |
/* $NetBSD: cpus.h,v 1.5 1997/10/14 09:20:08 mark Exp $ */
/*
* Copyright (c) 1995 <NAME>.
* Copyright (c) 1995 Brini.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributio... |
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "imp.h"
extern ct_imp g_ct_tbb_imp;
extern ct_imp g_ct_serial_imp;
extern ct_imp g_ct_openmp_imp;
extern ct_imp g_ct_shuffle_imp;
extern ct_imp g_ct_valgrind_imp;
extern ct_imp g_ct_pthreads_imp;
ct_imp* g_ct_imps[] = {
&g_ct_tbb_imp,
&g_ct_s... |
/*
* Copyright (c) 2012-2017 Andes Technology Corporation
* All rights reserved.
*
*/
#include "gpio_ae250.h"
#define NDS_GPIO_DRV_VERSION NDS_DRIVER_VERSION_MAJOR_MINOR(2,9)
// driver version
static const NDS_DRIVER_VERSION gpio_driver_version = {NDS_GPIO_API_VERSION, NDS_GPIO_DRV_VERSION};
static GPIO_INFO gp... |
/*
* Copyright (c) 2012-2014 Apple Inc. All Rights Reserved.
*
* @APPLE_LICENSE_HEADER_START@
*
* This file contains Original Code and/or Modifications of Original Code
* as defined in and that are subject to the Apple Public Source License
* Version 2.0 (the 'License'). You may not use this file except in
* c... |
/*
* File: receiver.c
* Author: TJP873
* CMPT 434 - Assignment 2, Part A
*
* Some code based on http://beej.us/guide/bgnet/output/html/singlepage/bgnet.html
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <string.h>
#include <sys/types.h>
#include <sys/socket.h>
#inc... |
#pragma once
#include <sys/types.h>
#include <libgte.h>
#include <libgpu.h>
#include "engine/filesystem.h"
#include "engine/surfacelist.h"
#define GFX_MAX_SURFACES 40
#define GFX_MAIN_BANK "\\MAIN\\MAIN.GFX;1"
#define GFX_FONT_WIDTH 6
#define GFX_FONT_HEIGHT 12
#define GFX_RGB(r, g, b) ((((b) >> 3) << 10) | (((g) >... |
#include"suspect_path.h"
/*===================================*/
#include"pmodel.h"
#include"pmodel_aux.h"
#include"../../include/micromegas_aux.h"
#include<sys/wait.h>
#include<unistd.h>
#define FIN "suspect2_lha.in"
#define FOUT "suspect2_lha.out"
static int SystemCall(int mode)
{
char buff[2000];
int err;
... |
//Neutron Project
//General keyboard driver
//Particular interfaces (PS/2, USB)
// are handled by their respective drivers
#include "./kbd.h"
#include "../../stdlib.h"
void krnl_dump(void);
/*
* Neutron key number to character map
*/
static kbd_scan_char_map_t kbd_scan_char_map[] = {
{KBD_SCAN_A, 'a', 'A'}, ... |
//
// Created by <NAME> on 03.03.15.
// Copyright (c) 2015. All rights reserved.
// OpenMesh library is required, Code partly taken from OpenFlipper
//
// Make sure you build OpenMesh library in Release mode, otherwise the
// dynamic casting won't work under Matlab and you get a segmentation fault
#include <stdin... |
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2010-2014 Intel Corporation
*/
#include <stdio.h>
#include <errno.h>
#include <stdint.h>
#include <rte_cpuflags.h>
#include <rte_debug.h>
#include "test.h"
/* convenience define */
#define CHECK_FOR_FLAG(x) \
result = rte_cpu_get_flag_enabled(x); \
... |
/*
Standard environment.
Routines for standard operators and procedures.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include "alisp.h"
atom_t* global_env;
atom_t* active_env;
/* Create global environment. */
void globenv_init() {
if (global_env) {
printf("\x1b[95m" "F... |
#include <stdlib.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include "JuniorLib.h"
#include "FactorialExample.h"
// Primitive Examples
void fromIntegerExample1() {
struct BoxedValue* anf_0 = applyClosure(fromInteger, numInt);
struct BoxedValue* anf_1 = mkInt(4);
struct BoxedValue* anf_2 =... |
#include <assert.h>
#include <stdint.h>
#include <stdio.h>
#include <string.h>
#include "yaz0.h"
// decoder implementation by thakis of http://www.amnoid.de
// src points to the yaz0 source data (to the "real" source data, not at the header!)
// dst points to a buffer uncompressedSize bytes large (you get uncompress... |
/*
* Copyright (C) 2015 University of Oregon
*
* You may distribute under the terms of either the GNU General Public
* License or the Apache License, as specified in the LICENSE file.
*
* For more information, see the LICENSE file.
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.... |
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2010,2012,2013 Free Software Foundation, Inc.
*
* GRUB 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 3 of the License, or
* ... |
/* asm2bf
*
* Copyright (C) <NAME> 2017-2020 & maviek 2019.
* License: MIT
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without restriction, including without limitation the rights... |
/* driver for fdjac2 example. */
/* The test works by running chkder both on the Jacobian computed
by forward-differences and on the real Jacobian */
#include <stdio.h>
#include <math.h>
#include <assert.h>
#include <cminpack.h>
#define real __cminpack_real__
/* the following struct defines the data... |
/*
* sortLambdaQP.c
*
* Code generation for function 'sortLambdaQP'
*
*/
/* Include files */
#include "sortLambdaQP.h"
#include "eml_int_forloop_overflow_check.h"
#include "rt_nonfinite.h"
#include "runOpt.h"
#include "runOpt_data.h"
#include "xcopy.h"
#include <string.h>
/* Variable Definitions */
static emlrtR... |
/*
* Copyright (C) 2010-2020 Arm Limited or its affiliates. All rights reserved.
* Copyright (c) 2019 Nuclei Limited. All rights reserved.
*
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the License); you may
* not use this file except in compliance with the License.
... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
//#include <conio.h>
#include <stdlib.h>
//functions
void Fhelp();
void Fhangman(int display);
int Fplaygame();
int main()
{
int option, i = 1;
do {
printf("{} {} {}{} {} {} {}}}}} {} {} {}{} {} {}\n{} {} {}... |
/* $OpenBSD: ezload.c,v 1.6 2002/07/25 04:07:32 nate Exp $ */
/* $NetBSD: ezload.c,v 1.5 2002/07/11 21:14:25 augustss Exp $ */
/*
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by <NAME> <<EMAIL>>.
*
* Redist... |
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
enum Piece {
Empty,
Black,
White,
};
typedef struct Position_t {
int x, y;
} Position;
///////////////////////////////////////////////
struct Node_t {
Position pos;
struct Node_t *next;
};
void releaseNode(struct ... |
/* base class for all Fourier stuff
*
* properties:
* - single output image
*/
/*
Copyright (C) 1991-2005 The National Gallery
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Found... |
/**
* @file linuxUDP.c
* Copyright 2009-2013 The MathWorks, Inc.
*/
#include <assert.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <netdb.h>
#include <netinet/in.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/time.h>
#include <fcntl.h>
#include "HostLib_Network.h"
#include ... |
/* $NetBSD: pvresize.c,v 1.1.1.2 2009/12/02 00:25:54 haad Exp $ */
/*
* Copyright (C) 2001-2004 Sistina Software, Inc. All rights reserved.
* Copyright (C) 2004-2005 Red Hat, Inc. All rights reserved.
* Copyright (C) 2005 <NAME>. All rights reserved.
*
* This file is part of LVM2.
*
* This copyrighted material ... |
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include "alist.h"
#define SIZE 20
typedef unsigned int uint;
uint NUM_ERRORS = 0;
typedef struct box box_t;
struct box {
uint item;
uint tag;
};
void* mod_box(void* a_box);
bool last_three_quarters(void* a_box);
bool tag_too_big... |
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
// No headers? Are you serious?!
#define MAIN
#include "state.c"
#include "dict.c"
#include "node.c"
// Where's the makefile? Oh, you gotta be kidding me.
// gcc -std=gnu99 -Wall -O3 inspect.c -o inspect; inspect 4 4
#define PRISONER... |
/* $OpenBSD: trm_pci.c,v 1.4 2006/11/28 23:59:45 dlg Exp $
* ------------------------------------------------------------
* O.S : OpenBSD
* FILE NAME : trm_pci.c
* BY : <NAME> (<EMAIL>)
* Description: Device Driver for Tekram DC395U/UW/F,DC315/U
* ... |
#include "assets/texture_atlas.h"
#include <assert.h>
#include <limits.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
texture_atlas_t* texture_atlas_new(const size_t width,
const size_t height,
const size_t depth)
{
texture_atlas_... |
#include <errno.h>
#include <getopt.h>
#include <limits.h>
#include <netdb.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <signal.h>
#include <unistd.h>
#ifndef SOCKET
#include <arpa/inet.h>
#include <sys/socket.h>
#include <sys/types.h>
#endif
#define PROGRAM_NAME "httpd_dayo"
#de... |
/*
* This file is part of HuDK.
* ASM and C open source software development kit for the NEC PC Engine.
* Licensed under the MIT License
* (c) 2016-2020 MooZ
*/
#include "hudk.h"
// Joypad types
#define JOYPAD_2 0
#define JOYPAD_6 1
#define JOYPAD_BOX_WIDTH 32
#define JOYPAD_BOX_HEIGHT 4
#define JOYPAD_BOX_X 2
... |
/* $Id: gcr.c,v 1.3 1999/05/31 23:35:32 sybalsky Exp $ (C) Copyright Venue, All Rights Reserved */
static char *id = "$Id: gcr.c,v 1.3 1999/05/31 23:35:32 sybalsky Exp $ Copyright (C) Venue";
/************************************************************************/
/* */
/* (C) Copyright 1989-95 Venue. All R... |
#define _GNU_SOURCE
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <mpi.h>
#define NB_SPAWN 4
static void do_parent(char *argv[], int rank, int count);
static void do_target(char *argv[], MPI_Comm parent);
static char *cmd_argv1 = "b";
static char *cmd_ar... |
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdlib.h>
#include <unistd.h>
#include <pthread.h>
#include <string.h>
#include <fcntl.h>
#include <errno.h>
#include <sys/time.h>
#include <gst/gst.h>
#include <glib.h>
#define FIFO_FILE "/tmp/myfifo"
int init_daemon(void)
{
int i;
pi... |
#include "main.h"
#include "dfrobot_imu.h"
#include "bno055.h"
#define IMU_ADDRESS (BNO055_I2C_ADDR_LO << 1)
//Variables for GYRO Settings
uint8_t GYRO_Bandwith = GBW_116Hz;
uint8_t GYRO_Range = GFS_2000DPS;
uint8_t GYRO_Mode = NormalG;
//Variables for BNO055 Settings
uint8_t Power_Mode = Normalpwr;
uint8_t Operatio... |
/* MN10300 Userspace accessor functions
*
* Copyright (C) 2007 Matsushita Electric Industrial Co., Ltd.
* Copyright (C) 2007 Red Hat, Inc. All Rights Reserved.
* Written by <NAME> (<EMAIL>)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public Lic... |
/*
* Copyright (c) 2010, Linux Box Corporation.
* All Rights Reserved.
*
* Portions Copyright (c) 2007, <NAME>,
* RZG, Max-Planck-Institut f. Plasmaphysik.
* All Rights Reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following con... |
/*----------------------------------------------------------------------
sysdep.c
This file contains necessary system dependent routines.
Notes on string handling:
- Native - means the "natural" character set/encoding for the
platform, nowadays often UTF-8, but that was not the case in the
beginning.
... |
/*****************************************************************************
* | File : DEV_Config.c
* | Author : Waveshare team
* | Function : Hardware underlying interface
* | Info :
*----------------
* | This version: V3.0
* | Date : 2019-07-31
* | Info :
#
# Permiss... |
/* GCVideo DVI Firmware
Copyright (C) 2015-2020, <NAME> <<EMAIL>>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice... |
#include "vt.h"
//#define DEBUG
//
void vtPrintCharacter(void *pointer, char c, int x, int y) {
struct virtualTerminal *vt = (struct virtualTerminal*) pointer;
SLsmg_gotorc(vt->y + y, vt->x + x);
#ifdef DEBUG
fprintf(stderr, "Printing: %c\n", c);
#endif
SLsmg_write_char(c);
}
void vtPrintString(void *pointer, cha... |
/* Enumerate states in winning set.
*
* An example of using the gr1c API. Provide the specification by invoking with
* a file name. It prints states with variable ordering as in the specification.
*
*
* SCL; 2017
*/
#include <stdlib.h>
#include <stdio.h>
#include "solve.h"
#include "gr1c_util.h"
extern int yy... |
/*
* Copyright (c) 2012-2016 The Khronos Group Inc.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and/or associated documentation files (the
* "Materials"), to deal in the Materials without restriction, including
* without limitation the rights to use, copy, ... |
/**************************************************************************//**
* @file Smpl_DrvACMP.c
* @version V2.00
* $Revision: 6 $
* $Date: 8/09/12 7:11p $
* @brief M051 Series ACMP Driver Sample Code
*
* @note
* Copyright (C) 2011 Nuvoton Technology Corp. All rights reserved.
*
*****... |
/*
* Copyright 2015 <NAME>
* 2015 <NAME>
* 2016-2017 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup drivers_dht
* @{
*... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <fcntl.h>
#include <string.h>
#include <ctype.h>
#define nBytes 256
#define ERROR 1
#define SUCCESS 0
#define maxWordLen 31
#define maxColLen 1
#define WORDSSTORED 4000
#define STOPWORDS 154
void wordCounter(char *file);
void listPrinter(char *lis... |
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <malloc.h>
#ifdef USE_SSE3
#include <x86intrin.h>
#include <emmintrin.h>
#include <pmmintrin.h>
#endif
#include "dwt.h"
// Believe it or not, but stdlib.h does not specify function prototypes!
// So this one here is to avoid warning about implicit func... |
/* buddy.h - Buddy allocator for Mink.
*
* This file is taken directly from <NAME>'s JMTK tutorial
* code. Copyright (c)2012 <NAME>.
*/
#include "assert.h"
#include "hal.h"
#include "sys.h"
#include "adt/buddy.h"
#define BUDDY(x) (x ^ 1)
#define INC_ORDER(x) (x << 1)
#define DEC_ORDER(x) (x >> 1)
static unsig... |
#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... |
/*
*
Copyright (c) 2019, <NAME> <<EMAIL>>
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this
list of conditions and the... |
/*++
Copyright (C) 1996-1999 Microsoft Corporation
Module Name:
strings.c
Abstract:
String constants used by the functions in the PDH.DLL library
--*/
#include <windows.h>
#include "strings.h"
LPCWSTR cszAppShortName = (LPCWSTR) L"PDH";
// registry path, key and value strings
LPC... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <json/printbuf.h>
#include "parsley.h"
#include "xml2json.h"
#include <libxslt/xslt.h>
#include <libxslt/xsltInternals.h>
#include <libxslt/transform.h>
#include <libxml/parser.h>
#include <libxml/HTMLparser.h>
#include <libxml/HTMLtree.h>
#include <li... |
/*
* This tests out the threading capability
*/
#include "test_hss.h"
#include "hss.h"
#include "hss_thread.h"
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
/* This will do an initial check if threading is enabled */
/* If it's not, there's no point in these tests */
bool check_threading_on(bool fast_f... |
/*
* This file is modification of pyA20 library.
*/
#include "pinout.h"
#define SUNXI_GPIO_BASE 0x01c20800
struct sunxi_gpio {
unsigned int cfg[4];
unsigned int dat;
unsigned int drv[2];
unsigned int pull[2];
};
struct sunxi_gpio_int {
unsigned int cfg[3];
unsigned int ctl;
unsigned int sta;
unsigned int d... |
/*
*
* Copyright 2017 Samsung Electronics All Rights Reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless require... |
/*
* Copyright (c) 2016 <NAME>
*
* Copyright(C) Caldera International Inc. 2001-2002. 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 and documen... |
#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... |
#include <signal.h>
#include "tree.h"
#include "array.h"
#include "stack.h"
#include "parse/term.h"
#include "closure.h"
#include "exception.h"
#include "operations.h"
#include "evaluate.h"
extern bool isIO;
static volatile bool INTERRUPT = false;
typedef const Array Globals;
static Node* evaluateClosure(Closure* clo... |
/*
* libhugetlbfs - Easy use of Linux hugepages
* Copyright (C) 2005-2006 <NAME> & <NAME>, IBM Corporation.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* as published by the Free Software Foundation; either version 2.1 of
... |
#include <stdio.h>
#include <stdlib.h>
#define MAX_PATH_LENGTH 6
#define PRINTDPMODE 0
typedef struct _position{
int x;
int y;
}position;
//global variable
int path_index = 0;
position path[MAX_PATH_LENGTH];
int max(int a, int b){
return a > b ? a : b;
}
void freeMemory(int **array, int m){
for(int i = 0; i < ... |
#include <stdio.h>
#include <math.h>
/*=========================================================================
Constants and definitions:
==========================================================================*/
#define N 50
#define M 50
#define RECT 4
#define TOP 0
#define LEFT 1
#define BOTTOM 2
#define RIGHT... |
/*========================================================*
* Program: list1513.c *
* Book: Teach Yourself C in 21 Days *
* Purpose: Implementing a linked list *
*========================================================*/
#include <stdi... |
#include "util.h"
#include "species.h"
void merge_blocks(struct block_list *blkhead, int start, int terminal) {
struct block_list *p, *q;
struct seg_list *b;
int i, j;
if (terminal < start)
fatalf("DIE: start >terminal %d %d", start, terminal);
for (p = blkhead; p != NULL; p = p->next)
if (p->id == start)
... |
/* SPDX-License-Identifier: BSD-2-Clause */
/***********************************************************************
* Copyright 2017-2018, Fraunhofer SIT sponsored by Infineon Technologies AG
* Copyright (c) 2017-2018, Intel Corporation
*
* All rights reserved.
****************************************************... |
/*
* Test for ECC-604: GRIB decoding/encoding sequentially and parallel with POSIX threads
*/
#include <time.h>
#include <pthread.h>
#include <assert.h>
#include <unistd.h>
#include "grib_api.h"
/* These are passed in via argv */
static size_t NUM_THREADS = 0;
static size_t FILES_PER_ITERATION = 0;
static c... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <fcntl.h>
#include <errno.h>
#include <cpio.h>
struct mkinitrfs_args {
const char *init;
};
struct cpio_newc_header {
uint32_t ino;
uint32_t mode;
uint32_t uid;
uint32_t gid;
uint32_... |
/*
* BSD LICENSE
*
* Copyright(c) 2016-2017 Netronome.
* 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 copyri... |
/*
Copyright (c) 2015 <NAME>. All rights reserved.
Developed by: <NAME>
aka Vercas
http://vercas.com | https://github.com/vercas/Beelzebub
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
... |
#include "skat/card.h"
#include "skat/game_rules.h"
const char *const CARD_TYPE_NAMES = "789DK0AB";
const uint8_t CARD_SCORES[] = {0, 0, 0, 3, 4, 10, 11, 2};
const uint8_t COMPARE_CARD_TYPE_NULL[] = {0, 1, 2, 5, 6, 3, 7, 4};
const char *const CARD_COLOR_NAMES = "KaHePiKr";
int
card_get(const card_id *const cid, card ... |
#include "utils.h"
Point point_translate(Point p, Rect r) {
return point_make(
p.x - rect_min_x(r),
p.y - rect_min_y(r)
);
}
Size screen_resolution(void) {
return size_make(1920, 1080);
}
uint8_t screen_bytes_per_pixel(void) {
return 4;
}
bool rect_contains_rect(Rect a, Rect b) {
... |
/* $Id: monitors.c,v 1.2 2004/07/07 03:11:19 pturner Exp $
* Monitors
*
*/
#include <stdio.h>
#ifndef WIN32
#include <sys/param.h>
#endif
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <time.h>
#include <fcntl.h>
#ifndef WIN32
#include <sys/time.h>
#endif... |
#include <stdlib.h>
#include <fmilib.h>
#include <stdio.h>
#include "config_test.h"
static const int SHOULD_FAIL_NAME_CHECK = 0;
static const int SHOULD_PASS_NAME_CHECK = 1;
static int name_check_passed;
static char *expected_message = "Invalid structured ScalarVariable name";
static char *name_check_test_directory;
... |
#include <sort.h>
#define SWAP(x, y) \
do { \
typeof(x) _x = x; \
typeof(y) _y = y; \
x = _y; \
y = _x; \
} while (0)
typedef int COMP_FUNC(void **a, void **b);
sort_t *sort_create() {
sort_t *sort = (sort_t *)malloc(sizeof(sort_t));
sort->count = 0;
so... |
#include "salon.h"
/* Note :
* Place des int aleatoires dans le tableau si il n'y a pas eu initialisation
* */
int is_full(Couleur matrice[TAILLE_LIGNE][TAILLE_COLONNE], int x)
{
return (matrice[x][0] != BLANC);
}
int is_win(Couleur grille[TAILLE_LIGNE][TAILLE_COLONNE])
{
int y = 0;
int x = 0;
int size = 1;... |
#include "superTourn.h"
#define calcWaitTime(x) x == 0 ? 0 : 1000 / x
void initConfig(char* filePath)
{
SC_UP = SDL_SCANCODE_W;
SC_DOWN = SDL_SCANCODE_S;
SC_LEFT = SDL_SCANCODE_A;
SC_RIGHT = SDL_SCANCODE_D;
SC_INTERACT = SDL_SCANCODE_SPACE;
SC_MENU = SDL_SCANCODE_ESCAPE;
SC_ATTACK = SDL_SC... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <fcntl.h>
#include <errno.h>
#include "fat.h"
#include "block.h"
#include "block_pc.h"
#include "partition.h"
#include "mbr.h"
/**************************************************************
* Filesystem image structure:
*
* root /+-> ROFILE.TXT
... |
/*
* This is a RANDOMLY GENERATED PROGRAM.
*
* Generator: csmith 2.2.0
* Git version: dcef523
* Options: (none)
* Seed: 4053553616
*/
#include "csmith.h"
static long __undefined;
/* --- Struct/Union Declarations --- */
/* --- GLOBAL VARIABLES --- */
static int32_t * volatile g_5 = (void*)0;/* VOLATILE... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.