text stringlengths 3.08k 10.5k |
|---|
/*
* © Copyright 2018 <NAME>
*
* 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, modify, merge, publish, distr... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/shm.h>
#include <sys/sem.h>
#include <sys/types.h>
#include <sys/wait.h>
#define BUF_SIZE 5
#define SHARED_MEM_SIZE (BUF_SIZE+1)*sizeof(int)
#define DEBUG 0// 1: True || 0: False
#define NUM_TESTS 15 // Number of tests to run. Requires DEBUG = ... |
/*** Copyright (c), The Regents of the University of California ***
*** For more information please refer to files in the COPYRIGHT directory ***/
/*
* ibun - bundle files operation
*/
#include "rodsClient.h"
#include "parseCommandLine.h"
#include "rodsPath.h"
#include "bunUtil.h"
void usage ();
int
mai... |
// Based on Cypress Semiconductor AN2336 ("PSoC®1 -Simplified FSK Detection")
#include "bfsk.h"
#include <math.h>
#include <stdint.h>
#include <stdbool.h>
struct bfsk {
/**
* BFSK parameters
*/
struct bfsk_params params;
/**
* Input sample rate
*/
float sample_rate;
/**
* Previous samples buffer
*... |
#include <stdio.h>
#include <unistd.h>
#include <string.h>
#include <stdbool.h>
#include <pulse/pulseaudio.h>
#include <ncurses.h>
#include <time.h>
#include <pulseaudio/pulsehandler.h>
#include <shared.h>
#include <processing.h>
#include <visualiser.h>
#include <settings.h>
// Prints a PulseAudio device to the logfi... |
#include <stdio.h>
#include <stdlib.h>
#include <assert.h>
#include <cvode/cvode.h>
#include <cvode/cvode_spbcgs.h>
#include <nvector/nvector_serial.h>
#include <sundials/sundials_types.h>
/* Change these if you are running insane parameters and Sundials is bailing */
#define ATOL 1e-12
#define RTOL 1e-8
/* r=mu/gam... |
/*
* Copyright (c) 2010 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <stdio.h>
#include <stdlib.h>
#include "native_client/src/include/portability.h"
#include "native_client/src/shared/platform/na... |
#include "../log.h"
#include "../net.h"
#define LOAD_TIMEOUT 15
#define lengthof(x) (sizeof(x)/sizeof(*(x)))
#define bitsize(e) (sizeof(e) * 8)
#define indexof(a, e) ((e) - (a))
#define String_eq(a, b) ((a).length == (b).length && memcmp((a).data, (b).data, (b).length) == 0)
#define String_is(a, str) ((a).length == (... |
/*----------------------------------------------------------------------------
* Name: usbmain.c
* Purpose: USB Audio Class Demo
* Version: V1.20
*----------------------------------------------------------------------------
* This software is supplied "AS IS" without any warranties, express,
* implie... |
/*
* Dakota Shell Parser
*
* Copyright (c) 2021 <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dakota/shell.h>
#include <dakota/util.h>
struct shell {
FILE *in;
size_t nchars, last;
char *line;
size_t nw... |
#include "sfs_free_bit_map.h"
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "disk_emu.h"
// 'private' - limit scope to current file
static unsigned char* free_bit_map = NULL; // One free bit map for [inode_bits, data_bits]
static int data_num_bytes = 0;
static int inode_num_... |
// SPDX-License-Identifier: BSD-3-Clause
//
// Copyright(c) 2019 Intel Corporation. All rights reserved.
//
// Author: <NAME> <<EMAIL>>
/* Topology parser */
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <stddef.h>
#include <errno.h>
#include <unistd.h>
#include <string.h>
#include <math.h>
#inc... |
// Copyright 2015-2016 Espressif Systems (Shanghai) PTE LTD
//
// 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 required by app... |
/*++
/* NAME
/* postscreen_haproxy 3
/* SUMMARY
/* haproxy protocol adapter
/* SYNOPSIS
/* #include <postscreen_haproxy.h>
/*
/* void psc_endpt_haproxy_lookup(smtp_client_stream, lookup_done)
/* VSTRING *smtp_client_stream;
/* void (*lookup_done)(status, smtp_client_stream,
/* smtp_client_addr, smtp_client_port,
/* ... |
/* testSqlDbDotTable - Invoke various jksql functions with db.table as table to make sure db.table notation is supported. */
#include "common.h"
#include "hdb.h"
#include "options.h"
#include "jksql.h"
void usage()
/* Explain usage and exit. */
{
errAbort(
"testSqlDbDotTable - Invoke various jksql functions with db.... |
#include <math.h>
#include <stdio.h>
#include <gsl/gsl_blas.h>
#include <gsl/gsl_matrix.h>
#include <gsl/gsl_sf_pow_int.h>
#include <gsl/gsl_vector.h>
#include <argtable2.h>
#include "qdm.h"
void
qdm_ispline_vector(
gsl_vector *result,
const double tau,
const size_t spline_df,
const gsl_vector *knot... |
/*
* File: elf.h
* Description: Used for parsing ELF files
* *****************************************************************************
* Copyright 2021 <NAME>
* Check the LICENSE file that came with this program for licensing terms
*/
#pragma once
enum ELFSectionHeaderType {
ELF_SECTION_HEADER_TYPE_NULL ... |
/*
* This is a RANDOMLY GENERATED PROGRAM.
*
* Generator: csmith 2.0.0
* svn version: exported
* Options: --check-global -s 915
* Seed: 915
*/
#include "random_runtime.h"
long __undefined;
/* --- Struct/Union Declarations --- */
/* --- GLOBAL VARIABLES --- */
volatile uint16_t g_2[7] = {0x4469L, 0x44... |
#include <string.h> // memcpy
#include <unistd.h> // sleep
#include "erl_driver.h"
#include "erl_interface.h"
#include "baseline_drv_sample.h"
struct _driver_data {
char *buf;
int len;
};
typedef struct _driver_data driver_data_t;
static void encode_error(ei_x_buff *x, const char *error) {
ei_x_encode_tuple... |
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <string.h>
#include <float.h>
const float CIRCLE_STEP = 0.1;
int nearly_equal(float a, float b, float epsilon){
float diff = fabs(a - b);
if (a == b){
return 1;
}
else if ( a == 0 || diff < FLT_MIN){
return diff < (epsilon * FLT_MIN);
}
else... |
#include <stdlib.h>
#include <stdio.h>
#include <pcap.h>
#ifdef WIN32
#include <tchar.h>
BOOL LoadNpcapDlls()
{
_TCHAR npcap_dir[512];
UINT len;
len = GetSystemDirectory(npcap_dir, 480);
if (!len) {
fprintf(stderr, "Error in GetSystemDirectory: %x", GetLastError());
return FALSE;
}
_tcscat_s... |
/*****************************************************************************\
** **
** FILE: ansi.c **
** AUTHORS: Alexios **
**... |
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <fnmatch.h>
#include <sys/utsname.h>
#include <stdio.h>
#include "find.h"
#include "module.h"
#include "cache.h"
static bool _append_alias(const char *module,
const char *alias,
cache_entry_t *entr... |
/* Hello World Example
This example code is in the Public Domain (or CC0 licensed, at your option.)
Unless required by applicable law or agreed to in writing, this
software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
CONDITIONS OF ANY KIND, either express or implied.
*/
#include <stdio.h>
#... |
/*
* UART_drv.c
*
* Created on: 1 дек. 2020 г.
* Author: wl
*/
#include "msp.h"
#include "UART_drv.h"
void UART_drv_Init(uart_handle_t * huart) {
huart->EUSCI_BASE->CTLW0 = EUSCI_A_CTLW0_SWRST;// 0x0001; // hold the USCI module in reset mode
huart->EUSCI_BASE->CTLW0 = EUSCI_A_... |
// Copyright 2017 The Australian National University
//
// 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 required by appli... |
/*
Provides:
struct finalizer { ... } Fnl
GC_set_finalizer
reset_finalizer_tree
finalizers
num_fnls
Requires:
is_finalizable_page(gc, p)
is_in_gen_half(p, gc)
park
*/
#define Tree Fnl
#define Splay_Item(t) ((intptr_t)t->p)
#define Set_Splay_Item(t, v) (t)->p = (v... |
/**
* \file
* \brief Mirror an NFS handle into ramfs
*/
/*
* Copyright (c) 2014, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, Haldeneggsteig 4, CH-8092 Zurich... |
/*
* flagset.c -- very big flags array handler
* Part of the GNU netcat project
*
* Author: <NAME> <<EMAIL>>
* Copyright (C) 2002 <NAME>
*
* $Id: flagset.c,v 1.7 2003/12/10 16:18:07 themnemonic Exp $
*/
/***************************************************************************
* ... |
#include "config.h"
#ifndef RCSVR_LITE
#include "net.h"
#endif
#include "mem.h"
#include "trophy.h"
#include "cheat.h"
#include "util.h"
#include "debug.h"
#include "ui.h"
#include "blit.h"
#include "lang.h"
#include "font_pgf.h"
#include "../version.h"
#include <vitasdk.h>
#include <taihen.h>
#ifndef RCSVR_LITE
#... |
#include <stdio.h>
#include <sys/stat.h>
#include <sys/types.h>
#include "parser.h"
#include "Instruction.h"
#include "InstructionList.h"
#include "Mips.h"
void giveTab(){
printf("\t");
}
void giveEnter(){
giveTab();
printf("addi $a0, $0, '\\n'\n");
mipsSyscall(11);
}
int getLabel()... |
#include "AudioAfe.h"
#include "AudioRom.h"
#include "audio.h"
#if 0
BOOL bDL1toI2sDacOutOn(SAMPLINGRATE_T eSampleRate)
{
INT32 smapleCount = TBL_SZ_48KHz_1K;
MEMIF_CONFIG_T memCfg;
printk("[bDL1toI2sDacOutOn] SampleRate:%d\n", u4SamplingRateHz[eSampleRate]);
// put sine table into memory
memcpy((... |
/*
* cache.c - LFU and LRU cache for web proxy, double linked list implementation.
*/
/* $begin cache.c */
#include "cache.h"
/* LFU cache */
Node_t *LFU_head;
Node_t *LFU_tail;
volatile int LFU_len;
volatile size_t LFU_size;
/* LRU cache */
Node_t *LRU_head;
Node_t *LRU_tail;
volatile int LRU_len;
volatile size_t ... |
/* KallistiOS ##version##
inet_pton.c
Copyright (C) 2007, 2010 <NAME>
*/
#include <arpa/inet.h>
#include <errno.h>
static int inet_pton4(const char *src, void *dst) {
int parts[4] = { 0 };
int count = 0;
struct in_addr *addr = (struct in_addr *)dst;
for(; *src && count < 4; ++src) {
i... |
/* Kernel includes. */
#include "FreeRTOS.h"
#include "task.h"
/* Hardware specific includes. */
#include "ConfigPerformance.h"
/* Core configuratin fuse settings */
// FDEVOPT
#pragma config SOSCHP = OFF // Secondary Oscillator High Power Enable bit (SOSC oprerates in normal power mode.)
#pragma config A... |
/*
* Copyright (c) 2008, 2013 Genome Research Ltd.
* Author(s): <NAME>
*
* 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,
* ... |
/*****************************************************************************\
** **
** FILE: plugindef.c **
** AUTHORS: Alexios **
**... |
#include "parsing.h"
// parses an argument of the command stream input
static char* get_token(char* buf, int idx) {
char* tok;
int i;
tok = (char*)calloc(ARGSIZE, sizeof(char));
i = 0;
while (buf[idx] != SPACE && buf[idx] != END_STRING) {
tok[i] = buf[idx];
i++; idx++;
}
return tok;
}
// parse flow re... |
/*
* Library: libcrc
* File: src/crcccitt32.c
* Author: <NAME>
*
* This file is licensed under the MIT License as stated below
*
* Copyright (c) 1999-2016 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Sof... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include "nss_lcmapsd.h"
/**
* Reads the config file into buffer
* \param buffer will be malloced and contain the contents of the config file
* \return 0 on success, -1 I/... |
/* #include "config.h" */
#include "socket_log.h"
#include "communication.h"
#include "mls.h"
#include "util.h"
#include <unistd.h>
#include <sys/socket.h>
#include <fcntl.h>
int trace_slog;
void (*slog_cb) (int fd, char *buf, int size) = 0;
#define MAX_CLIENT_SOCKETS 100
struct socket_log_state {
XtAppContext ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "util.h"
#define MAX_ENTITY 256
typedef struct animal {
char name[32];
char type[40];
void (*unique_ability)(char *);
} Animal;
typedef struct plant {
char type[20];
char description[60];
} Plant;
typedef struct node {
void... |
/*
Copyright (C) 1996, 1997, 1998, 1999, 2000 <NAME>
This 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, or (at your option) any later
version.
This is distributed in... |
#include <limits.h>
#include <math.h>
#include <genmap-impl.h>
//
// TODO: use a separate function to generate init vector
//
int GenmapFiedlerRQI(genmap_handle h, struct comm *gsc, int max_iter,
int global) {
GenmapInt lelt = genmap_get_nel(h);
genmap_vector initVec;
genmap_vector_create(&i... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <math.h>
#define SCX 1
#define SCY 1
#define SCZ 1
#define CX 3
#define CY 3
#define CZ 3
struct vec3_t
{
double x;
double y;
double z;
};
struct vec3_int_t
{
int x;
int y;
int z;
};
struct vec3_t vec3_sub(struct vec3_t a,... |
/* this function will get the input and write it to a file. This will be
* used to get input from a formatted window and create a new file entry
* in the specified workfile.
*/
#include <stdio.h>
#include <curses.h>
#include "contents.h"
#include "maillist.h"
void add_rec(win2, row, col, screen_num)
WINDOW *win2;
... |
// The Verilog PLI Handbook - Section 3.13.1
/**********************************************************************
* $show_all_signals example 1 -- PLI application using VPI routines
*
* C source to scan through a module and list the names of all nets,
* reg and variables in the module, with their current logic ... |
/**
* @author $Format: %an <%ae>$
* @date $Format: %ad$
* @version $Format: %h$
* @brief
* @see Compilation
* @see CmakeCompilation
*/
#include "AIOTypes.h"
#include <aiousb.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include "AIOChannelMask.h"
#include "aiousb.h"
t... |
#include <stdio.h>
#include <windows.h>
void addgoods(int a, int b[100], int c[100], char d[100], char f[100][100]) {
int i, e;
int confirm = 1;
printf(" Add Articles\n\n\n");
do {
system("cls");
printf("Enter new code for the article:\n");
scanf("%d", &a);
printf("Enter the rate of the item:\n");
s... |
/*
* Copyright (C) 2015-2019 Alibaba Group Holding Limited
*/
#include <errno.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "jse_common.h"
#include "cJSON.h"
#define APP_PACKAGE_FILE_NAME JSE_FS_ROOT_DIR "/package.json"
#define MAX_FILE_NAME_LEN 127
static char js_app_f... |
/* vim: ft=c et ts=8 sts=4 sw=4 cino=
*
* Copyright 2011, 2012 Couchbase, Inc.
*
* 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
*
... |
/*
<NAME> A01422326
<NAME> A01410695
<NAME> A01024192
Proyect: Whiskey Poker
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
// Sockets libraries
#include <netdb.h>
#include <arpa/inet.h>
// Custom libraries
#include "codes.h"
#include "sockets.h"
#define BUFFER_SIZ... |
/* Implementation : PYTHON */
#include <string.h>
#include <stdlib.h>
#include "Python.h"
#include <float.h>
#include <numpy/arrayobject.h>
#include "dm15temp.h"
static PyObject *_wrap_dm15temp(PyObject *self, PyObject *args) {
PyObject * _resultobj;
int _result;
int size;
double dm15;
double sh... |
/**************************************************************************
* Copyright (C) 2020-2020 Junlon2006
*
* 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 L... |
/*
* libgwater-wayland - Wayland GSource
*
* Copyright © 2014-2017 Quentin "<NAME>" Glidic
*
* 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 limi... |
/**
******************************************************************************
* @file HASH/SHA256/main.c
* @author MCD Application Team
* @version V2.0.6
* @date 25-June-2013
* @brief Main program body
******************************************************************************
* @attent... |
/*
* Copyright (c) 2016-2017, Wind River Systems, Inc.
*
* 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 t... |
#ifdef CONFIG_ELBC_BR0_OR0
#define CONFIG_SYS_BR0_PRELIM (\
CONFIG_BR0_OR0_BASE |\
CONFIG_BR0_PORTSIZE |\
CONFIG_BR0_ERRORCHECKING |\
CONFIG_BR0_WRITE_PROTECT_BIT |\
CONFIG_BR0_MACHINE |\
CONFIG_BR0_ATOMIC |\
CONFIG_BR0_VALID_BIT \
)
#define CONFIG_SYS_OR0_PRELIM (\
CONFIG_OR0_AM |\
CONFIG_OR0_XAM |\
CONFIG_O... |
/*! \file field_arr_mem_mgr.c
*
* Field array memory manager API implementation
*
* Interface to the field array memory manager
*/
/*
* This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
*
* Copyright 2007-2020 Broadcom Inc. All r... |
#include <rtc.h>
#include <string.h>
#include <kheap.h>
// Global var, store current date and time
datetime_t current_datetime;
char * weekday_map[7] = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"};
/*
* Check if rtc is updating time currently
* */
int is_updating_rtc() {
outportb(CMOS_ADDR, 0x0A);
uint... |
/*----------------------------------------------------------------------------
* File: ooaofooa_S_SS_class.c
*
* Class: Subsystem (S_SS)
* Component: ooaofooa
*
* your copyright statement can go here (from te_copyright.body)
*----------------------------------------------------------------------... |
#include "pjcommon.h"
//#include "Function_define.h"
bit BIT_TMP;
void SystemInit(void)
{
InitClock();
PwmInit();
GPIO_User_Init();
TimerTickInit();
Timer_Timming_Hw_Init();
/*INIT UART*/
InitialUART0_Timer3(9600);
TI = 1; // Important, use prinft function must set TI=1;
... |
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
static struct termios oldterminfo;
char *serialdev = "/dev/cuaU0";
int rts,rtsRequest = 0;
int dtr,dtrRequest = 0;
int le,leRequest... |
/*
* ui_statusbar.c
* Copyright 2010-2011 <NAME>, <NAME>, and <NAME>
*
* 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 o... |
/*
Teem: Tools to process and visualize scientific data and images
Copyright (C) 2005 <NAME>
Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
(LGPL) as... |
#include <Windows.h>
#include <stdio.h>
#include <aclapi.h>
#define BUFF_SIZE 1024
BOOL GenerateEveryoneSecAttr(PSECURITY_ATTRIBUTES sa) {
PSID pEveryoneSID = NULL;
PACL pACL = NULL;
PSECURITY_DESCRIPTOR pSD = NULL;
EXPLICIT_ACCESS ea[1];
SID_IDENTIFIER_AUTHORITY SIDAuthWorld =SECURITY_WORLD_SID_AUTHORITY;
SID... |
// gcc -std=c11 -mssse3 -Werror -Wall -o counter counter.c
#include <stdio.h>
#include <emmintrin.h>
#include <tmmintrin.h>
#include <time.h>
#include <limits.h>
#define LENGTH (1 << 28)
/**
* (Count by byte)
*
* Counts words in string.
*
* This function counts words in given
* string by bytes. The criteria of... |
#include <u.h>
#include <libc.h>
#include <thread.h>
#include "dat.h"
#include "fns.h"
int
copydentry(Fs *fs, FLoc *a, Loc *b, char *nname)
{
Buf *ba, *bb, *bc;
Dentry *d;
int i, rc;
FLoc c;
if(!namevalid(nname)){
werrstr(Einval);
return -1;
}
ba = getbuf(fs->d, a->blk, TDENTRY, 0);
if(ba == nil)
return... |
/*
* Copyright 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 <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 ab... |
#include <assert.h>
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "buffer.h"
#if !defined(va_copy)
// need this if we want to compile for C89
#define va_copy(d,s) __va_copy(d,s)
#endif
#define BUFFER_DEFAULT_CAPACITY BUFFER_DESIRED_SIZE // default size for Buffer
#define BUFF... |
/*
TestFramerate.c: test/sample program for framerate manager
Copyright (C) 2012-2014 <NAME>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is granted to anyone to use this s... |
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#include <stdarg.h>
#include <string.h>
#include "orka-config.h"
#include "orka-utils.h"
#include "json-actor.h"
static bool g_first_run = true; // used to delete existent dump files
static void
noop_json_dump(bool is_response, int httpcode, struct orka_co... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdint.h>
#include <math.h>
#include "api.h"
#define NTESTS 1
static void write_canary(unsigned char *d)
{
*((uint64_t *) d)= 0x0123456789ABCDEF;
}
static int check_canary(unsigned char *d)
{
if(*(uint64_t *) d != 0x01234567... |
// C_call_CSL.h Copyright 2014 <NAME>
/*
This is not so much an interface from C to Reduce/CSL, but more of a way for
C to *control* Reduce via a set of procedure calls. See csl/cslbase/proc.h.
Example: call f(x,y) from C, where "f" is defined in Reduce.
double nlopt_tst_f(double x... |
/* get the structure and function definitions for BlockSolve */
#include "BSprivate.h"
/* set up max stencil sizes, etc */
#define MAX_LEN 27
/* point on the grid */
typedef struct __point {
int num;
int type;
} point;
/* grid structure for each worker */
typedef struct __par_grid {
int worker_x;
int worker_y;
... |
/**************************************************************************************
9600bps Term for Raspberry Pi
Copyright (c) 2015-2016 <NAME>
http://www.geocities.jp/bokunimowakaru/
**********************************... |
/*
* Vector table for a STM32/Cortex-M3 processor.
*/
/*
* Top of the stack address has to be provided by the linker.
* It is defined in the linker script file.
*/
extern int _stack;
/*
* Default Handler for unhandled exeptions/interrupts.
*/
static void default_handler() {
while(1);
}
/*
* Startup func... |
/******************************************************************************
Filename : platform_TMS320C6678.h
Author : pry
Date : 24/06/2017
Licence : The Unlicense; see LICENSE for details.
Description: The configuration file for TMS320C6678.
*********************************************************... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* main.c :+: :+: :+: ... |
/*!
* thread_pool.c - thread pool for lcdb
* Copyright (c) 2022, <NAME> (MIT License).
* https://github.com/chjj/lcdb
*/
#include <stdlib.h>
#include <string.h>
#include "internal.h"
#include "port.h"
#include "thread_pool.h"
/*
* Work
*/
typedef struct ldb_work_s {
ldb_work_f *func;
void *arg;
struct ld... |
/* $XFree86: xc/programs/Xserver/hw/xfree86/SuperProbe/MemProbe.c,v 3.4 1996/12/23 06:31:18 dawes Exp $ */
/*
* (c) Copyright 1993,1994 by <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to... |
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <ngx_config.h>
#include <ngx_core.h>
#include <ngx_http.h>
#include <ngx_socket.h>
#include "ngx_http_rwd_module.h"
#include "ngx_http_rwd_config.h"
#include "ngx_http_rwd_block.h"
#include "ngx_http_rwd_copy_request.h"
#define NGX_HTTP_RWD_... |
#include "stdio.h"
#include "stdlib.h"
#include "board.h"
#include "string.h"
#include "search.h"
#define MAX_LINE_LEN 81
//firstLIne is a pointer to a buffer where we store the first line
int parseTest(const char* filename, char* firstLine, PlatoBoard * board) {
FILE * fp;
if (!(fp = fopen(filename, "r"))) {
pri... |
/*
Legal Notice: Some portions of the source code contained in this file were
derived from the source code of Encryption for the Masses 2.02a, which is
Copyright (c) 1998-2000 <NAME> and which is governed by the 'License
Agreement for Encryption for the Masses'. Modifications and additions to
the original source c... |
/* toolwrapper.c -- a native tool wrapper for VMs that support the JNI
invocation interface
Copyright (C) 2006 Free Software Foundation, Inc.
This file is part of GNU Classpath.
GNU Classpath is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as publish... |
/*
* Copyright (c) 1988, 1993
* The Regents of the University of California. 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 copyr... |
// SPDX-License-Identifier: GPL-2.0-only
/*
* intel-mid_wdt: generic Intel MID SCU watchdog driver
*
* Platforms supported so far:
* - Merrifield only
*
* Copyright (C) 2014 Intel Corporation. All rights reserved.
* Contact: <NAME> <<EMAIL>>
*/
#include <linux/interrupt.h>
#include <li... |
/**
******************************************************************************
* File Name : main.c
* Description : Main program body
******************************************************************************
*
* COPYRIGHT(c) 2016 STMicroelectronics
*
* Redistribution and use in ... |
/*
* SSA/ASS demuxer
* Copyright (c) 2008 <NAME>
* Copyright (c) 2014 <NAME>
*
* This file is part of FFmpeg.
*
* FFmpeg 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
* vers... |
/*----------------------------------------------------------------------------
* File: ooaofooa_R_AONE_class.c
*
* Class: Class As Associated One Side (R_AONE)
* Component: ooaofooa
*
* your copyright statement can go here (from te_copyright.body)
*-----------------------------------------------... |
/*
* Copyright (C) 2016 <NAME> <<EMAIL>>
*
* This program is free software. It comes without any warranty,
* to the extent permitted by applicable law. You can redistribute
* it and/or modify it under the terms of the WTFPL, Version 2, as
* published by Sam Hocevar. See the accompanying LICENSE file or
* http://... |
/*
eBPF process_exit example
Copyright (c) Microsoft Corporation
All rights reserved.
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
... |
/*
* This is a RANDOMLY GENERATED PROGRAM.
*
* Generator: csmith 2.3.0
* Git version: 30dccd7
* Options: --output C.c --no-argc --no-arrays --no-bitfields --no-checksum --no-comma-operators --no-compound-assignment --no-divs --no-float --no-structs --no-unions --no-packed-struct --no-pointers --no-builtins --no-... |
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
#define SEC_DAY 86400
#define fprintf(...)
static struct tm _timevalue;
static int year_is_leap(int year) {
return ((year % 4 == 0) && ((year % 100 != 0) || (year % 400 == 0)));
}
// 0 was a Thursday
static int day_of_week(long seconds) {
long day = sec... |
/*
* mkbrnimg.c - partially based on OpenWrt's wndr3700.c
*
* Copyright (C) 2011 <NAME> <<EMAIL>>
*
* 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.
*
* This program is distri... |
/* quote.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__1 = 1;
static integer c__0 = 0;
/* $Procedure QUOTE ( Enclose in quotes ) */
/* Subroutine */ int quote... |
/**
* \file
* \brief Provides a generic startup function for the ARM OMAP platform
*/
/*
* Copyright (c) 2013, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in the attached LICENSE file.
* If you do not find this file, copies can be found by writing to:
* ETH Zurich D-INFK, Ha... |
/*
* Copyright 2002 <NAME>, SuSE Labs.
* Thanks to <NAME> for precious feedback.
*/
#include <linux/config.h>
#include <linux/mm.h>
#include <linux/sched.h>
#include <linux/highmem.h>
#include <linux/module.h>
#include <asm/uaccess.h>
#include <asm/processor.h>
#include <asm/io.h>
static inline pte_t *lookup_ad... |
#define BGAL_NULL 0 //end of prog string
#define BGAL_STOP 1 //stop execution and return
#define BGAL_NOP 2 //do nothing
#define BGAL_NOP1 3 //do nothing (resv)
#define BGAL_ADD 4
#define BGAL_SUB 5
#define BGAL_DIV 6
#define BGAL_MUL 7
#define BGAL_XOR 8
#define BGAL_MOD 9
#define BGAL_AND 10
#define BGAL_OR 11
#d... |
/* SPDX-License-Identifier: BSD-2-Clause */
#include <tilck_gen_headers/config_boot.h>
#include <tilck/common/basic_defs.h>
#include <tilck/common/assert.h>
#include <tilck/common/string_util.h>
#include <tilck/common/printk.h>
#include "common_int.h"
#define TILCK_MIN_RES_X 640
#define... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.