text stringlengths 3.08k 10.5k |
|---|
/****************************************************************************
*
* Copyright (c) 2012 PX4 Development Team. 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. Redistri... |
// SPDX-License-Identifier: GPL-2.0
/*
* Sensor HUB driver that discovers sensors behind a ChromeOS Embedded
* Controller.
*
* Copyright 2019 Google LLC
*/
#include <linux/init.h>
#include <linux/device.h>
#include <linux/module.h>
#include <linux/mfd/cros_ec.h>
#include <linux/platform_data/cros_ec_commands.h>
#... |
/*
* ASoC Driver for RPi-DAC.
*
* Author: <NAME> <<EMAIL>>
* Copyright 2013
*
* 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 distributed in the hope tha... |
#include <math.h> // fabsf
#include <stdbool.h>
#include "config.h"
#include "drv_reset.h"
#include "drv_time.h"
#include "flash.h"
#include "gesture_detect.h"
#include "gestures.h"
#include "pid.h"
#include "sixaxis.h"
#include "util.h"
extern int onground;
extern bool ledcommand;
extern int ledblink;
extern char au... |
/*
* (C) Copyright 2007-2008
* <NAME> <<EMAIL>>
* Lead Tech Design <www.leadtechdesign.com>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published ... |
/*********************************************************************************************
___ _ ___ _____ ___
| _`\ ( ) ( _`\(_ _)( _`\
| (_) ) _ ___ | |/') | (_(_) | | | (_(_)
| , / /'_`\ /'___)| , < | _)_ | | `\__ \
| |\ \ ( (_) )( (___ | |\`\ | ... |
#include "net.h"
#ifdef MODULE_CURR
#undef MODULE_CURR
#define MODULE_CURR MODULE_NET_TCP_CLIENT
#endif
int tcp_client_init(tcp_client_t **pp,tcp_client_config_t *config){
int ret = 0,errRet = 0;
R(NULL == pp);
R(NULL != *pp);
R(NULL == config);
R(0 >= config->readBufSize);
R(0 >= config->writ... |
#include <unistd.h>
#include <stdint.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#include <string.h>
#include "actions.h"
#include "parse.h"
#include "device.h"
#include "consts.h"
static void do_save();
static void do_load();
static voi... |
#include "prelesglobals.h"
/* Seasonality model of Mäkelä et al 2004 */
double fS_model(double *S, double T, p2 GPP_par) {
double fS;
*S = *S + (T-*S)/GPP_par.tau;
if (0 > *S-GPP_par.S0) fS=0; else fS= *S-GPP_par.S0;
if (1 < fS/GPP_par.Smax) fS=1; else fS=fS/GPP_par.Smax;
return(fS);
};
double fPhen... |
/*
* Copyright (c) 2003-2010 <NAME> (<EMAIL>)
*
* This source code is free software; you can redistribute it
* and/or modify it in source code form 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)
... |
/*
* QEMU seccomp mode 2 support with libseccomp
*
* Copyright IBM, Corp. 2012
*
* Authors:
* <NAME> <<EMAIL>>
*
* This work is licensed under the terms of the GNU GPL, version 2. See
* the COPYING file in the top-level directory.
*
* Contributions after 2012-01-13 are licensed under the terms of the
*... |
// Copyright (c) 2017-2021, Mudita Sp. z.o.o. All rights reserved.
// For licensing, see https://github.com/mudita/MuditaOS/LICENSE.md
/**
* @brief EInk ED028TC1 electronic paper display driver
* @details This is hardware specific electronic paper display ED028TC1 driver.
*
* @note All the commands implemented in ... |
/*
* Copyright (c) 2020 Raspberry Pi (Trading) Ltd.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include "pico.h"
#include "pico/time.h"
#include "hardware/structs/usb.h"
#include "hardware/gpio.h"
#include "hardware/structs/iobank0.h"
#include "hardware/structs/padsbank0.h"
#include "pico/fix/rp2040_usb_device_e... |
/***************************************************************************
* Copyright (C) 2010 <NAME> *
* <EMAIL> *
* *
* This program is free soft... |
/*
Teem: Tools to process and visualize scientific data and images
Copyright (C) 2008, 2007, 2006, 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 Ge... |
/* Keep these headers */
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>
#include <tice.h>
#include <debug.h>
/* Standard headers */
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* Put function prototypes here */
void printText(const char *text, uint8_t x, uint8_t y);
void... |
/*
Rotary_click.c
| Global Library Prefix | **ROTARY** |
|:---------------------:|:---------------------:|
| Version | **1.1.0** |
| Date | **Jan 2019.** |
| Developer | **<NAME>** |
---
**Version Info... |
/*
*
* Copyright 2015, Google Inc.
* 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... |
//
// Created by eugen on 5/6/2017.
//
#include "parser.h"
void
xtra_parser_brackets_exchage(xtra_parser_brackets_p brackets, xtra_sign_p sign)
{
enum xtra_sign_e type = sign->type;
if (type == XTRA_SIGN_SQUARE_L) {
brackets->square++;
} else if (type == XTRA_SIGN_SQUARE_R) {
... |
#pragma once
typedef unsigned char u8;
typedef unsigned short u16;
#include <switch.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_ttf.h>
#include <SDL2/SDL2_gfxPrimitives.h>
#define BUTTON_A 0xE0E0
#define BUTTON_B 0xE0E1
#define BUTTON_X 0xE0E2
#define BUTTON_Y 0xE0E3
#defi... |
/* P I X - B W . C
* BRL-CAD
*
* Copyright (c) 1986-2016 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as ... |
#pragma once
/*
here are the parts
*/
#if defined (__ORBIS__)
#include <ps4sdk.h>
#include <debugnet.h>
#define fprintf debugNetPrintf
#define ERROR DEBUGNET_ERROR
#define DEBUG DEBUGNET_DEBUG
#define INFO DEBUGNET_INFO
#include <orbisGl.h>
#else
#include <stdio.h>
#define debugNetPrintf fprintf... |
#include <ctype.h>
#include <stdio.h>
#include <strlib.h>
/* getline: get line into s, return length */
int getline(char *s, int lim)
{
char *p;
int c;
p = s;
while (--lim > 0 && (c = getchar()) != EOF && c != '\n')
*p++ = c;
if (c == '\n')
*p++ = c;
*p = '\0';
... |
/* PEG Markdown Highlight
* Copyright 2011-2016 <NAME> -- http://hasseg.org
* Licensed under the GPL2+ and MIT licenses (see LICENSE for more info).
*
* multithread_tester.c
*
* Test program that spawns multiple threads that run the parser
* simultaneously for a given number of iterations each.
*/
#include <... |
//
// Created by dsisejkovic on 09.01.16..
//
#include <stdio.h>
#include "Basic.h"
#include "WaveletTree.h"
#include "Tester.h"
#include "Timer.h"
#include "BatchTester.h"
#include <math.h>
void generateFunctionTest(char *input_file) {
char *input;
char *used_alphabet;
int input_len;
... |
#include "image.h"
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
static const int MAX_SIZE=1024*1024;
void Image_free(Image* img) {
free(img->data);
free(img->row_data);
free(img);
}
Image* Image_alloc(int rows, in... |
/*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
** **
** This file forms part of the Underworld geophysics modelling application. **
** ... |
#include <stdio.h>
#include <math.h>
#include "longsize.h"
/* *********
compile with:
gcc -fpic -shared -O2 local_sky_sub.c -o local_sky_sub.so
********* */
INT32 local_sky_sub(int agrc, void *argv[]);
int contains(INT32 *array, INT32 n, INT32 value);
/***********************************************/
/* this func... |
#include "hal.h"
#include "device/video.h"
#include "device/palette.h"
#include <string.h>
#include <stdlib.h>
int get_fps();
void SDL_BlitSurface(SDL_Surface *src, SDL_Rect *scrrect,
SDL_Surface *dst, SDL_Rect *dstrect) {
assert(dst && src);
/* TODO: Performs a fast blit from the source surface to the
* de... |
#include <string.h>
#include <tap.h>
#include "util.h"
#include "buffer.h"
#ifndef M_PI
#define M_PI 3.14159265358979323846
#endif
#define ALEN(a) (int) (sizeof(a) / sizeof(a[0]))
static void test_sizes(void) {
int sb = sizeof(Buffer);
int bde = BUFFER_DESIRED_SIZE;
int bda = BUFFER_DATA_SIZE;
int bf... |
#include "common.h"
// Max orders: 9 (so that order 8 = 1 MB)
#define MAX_ORDERS 9
typedef struct
{
pageinfo_t* first;
u8* bitmap;
} buddyorder_t;
static buddyorder_t orderinfo[MAX_ORDERS];
// Physical memory management mutex
static semaphore_t mmMutex = SEMAPHORE_STATIC_INIT(1);
static inline int _ToggleBit(int ... |
# include "header.h"
# include <stdio.h>
# include <string.h>
void mostraMenu(void){
printf("****BIBLIOTECA DO IST****\n");
printf("1 - Inserir novo livro\n");
printf("2 - Listar livros\n");
printf("3 - Procurar livro por isbn\n");
printf("4 - Procurar livro por título\n");
printf("5 - Alterar título do livro\n... |
/* See LICENSE for license details. */
/*
Module: bfst_tty.h
*/
/* Arbitrary sizes */
#define ESC_BUF_SIZ (128*BFST_UTF8_SIZE)
#define ESC_ARG_SIZ 16
#define STR_BUF_SIZ ESC_BUF_SIZ
#define STR_ARG_SIZ ESC_ARG_SIZ
/* macros */
#define IS_SET(p_term, flag) (((p_term)->mode & (flag)) != 0)
#define TIMEDIFF(t... |
/*****************************************************************************\
* efs - General purpose Embedded Filesystem library *
* --------------------- ----------------------------------- *
* *
... |
/*
* INET An implementation of the TCP/IP protocol suite for the LINUX
* operating system. INET is implemented using the BSD Socket
* interface as the means of communication with the user level.
*
* Ethernet-type device handling.
*
* Version: @(#)eth.c 1.0.7 05/25/93
*
* Authors: <NAME>, <<EMAIL>>
* <N... |
/* GStreamer
* Copyright (C) <1999> <NAME> <<EMAIL>>
* Copyright (C) <2007> <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, o... |
// Copyright (c) 2017 Qualcomm Technologies, Inc.
// All rights reserved.
// Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below)
// provided that the following conditions are met:
// Redistributions of source code must reta... |
/*
** $Id: ldump.c,v 2.37 2015/10/08 15:53:49 roberto Exp $
** save precompiled Lua chunks
** See Copyright Notice in lua.h
*/
#define ldump_c
#define LUA_CORE
#include "lprefix.h"
#include <stddef.h>
#include "lua.h"
#include "lobject.h"
#include "lstate.h"
#include "lundump.h"
typedef str... |
/*
* Copyright (c) 2012 <NAME> <<EMAIL>>
*
* 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
* version 2.1 of the License, or (at your option) any ... |
/* $OpenBSD: autoconf.c,v 1.37 2010/11/18 21:13:16 miod Exp $ */
/* $NetBSD: autoconf.c,v 1.1 2003/04/26 18:39:26 fvdl Exp $ */
/*-
* Copyright (c) 1990 The Regents of the University of California.
* All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* <NAME>.
*
* Redistribut... |
/*
* Copyright (C) 2017-2019 Alibaba Group Holding Limited
*/
/******************************************************************************
* @file tst_io.c
* @brief input/output for test
* @version V0.1
* @date 2020-01-01
***************************************************************************... |
/*
* CmpHMC5883.c
*
* Created: 03/07/2012 13:48:49
* Author: berryer
*/
/////////////////////////////////////////////INCLUDES/////////////////////////////////////////////
#include "CmpHMC5883.h"
#include "Drv/DrvTwi.h"
#include "Drv/DrvTick.h"
////////////////////////////////////////PRIVATE DEFINES/////////////... |
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<sys/socket.h>
#include<arpa/inet.h>
#include<unistd.h>
#include<pthread.h>
#include<time.h>
#include <sys/types.h>
#include <sys/stat.h>
#include"sds.h"
#include"sdsalloc.h"
sds folder;
char *tratahttp(char *menssagem_cliente, int client_sock);
int find... |
/* <NAME>
ID 1001541794 */
// The MIT License (MIT)
//
// Copyright (c) 2016, 2017 <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 limit... |
/*
* This file is part of lz77ppm, a simple implementation of the LZ77
* compression algorithm.
*
* This is free and unencumbered software released into the public domain.
* For more information, see the included UNLICENSE file.
*/
#define _BSD_SOURCE // Required on Linux for htobe64()
#ifdef __FreeBSD__
# inc... |
/* _PDCLIB_w32errno( DWORD )
This file is part of the Public Domain C Library (PDCLib).
Permission is granted to use, modify, and / or redistribute at will.
*/
#ifndef REGTEST
#include <errno.h>
#include <windows.h>
int _PDCLIB_w32errno( DWORD werror )
{
switch ( werror )
{
case E... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <mpi.h>
/**
* Funzione che esegue il prodotto matrice vettore
*/
void prod_mat_vett(double w[], double *a, int ROWS, int COLS, double v[])
{
int i, j;
for(i=0;i<ROWS;i++)
{
w[i]=0;
for(j=0;j<COLS;j++)
{
... |
// amigaps2
//
// Copyright (c) 2018 <NAME>
//
// This library is free software; you can redistribute it and/or modify it
// under the terms of the MIT license. See LICENSE for details.
#define F_CPU 16000000
#include <util/delay.h>
#include <avr/io.h>
#include <avr/interrupt.h>
#include "ps2.h"
#define CLOCK_BIT 4
... |
#include "surface.h"
#include <framebuffer.h>
#include <led_strip.h>
#include <soc/soc.h>
#include "settings.h"
#include "effect.h"
#define FRAME_TICKS (pdMS_TO_TICKS(1000 / vol_settings.fps))
#define BIT_PLAYING (1)
static led_strip_t strip;
static framebuffer_t framebuffer;
static EventGroupHandle_t state;
// fram... |
#include "gorilla/ga_internal.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
/* Circular Buffer Functions */
GaCircBuffer *ga_buffer_create(usz size) {
GaCircBuffer *ret;
if(!size || (size & (size - 1))) /* Must be power-of-two*/
return NULL;
ret = ga_alloc(sizeof(GaCircBuffer));
ret->data = ga_a... |
#include "ppm.h"
#include<stdio.h>
#include<stdlib.h>
#define CREATOR "RPFELGUEIRAS"
#define RGB_COMPONENT_COLOR 255
PPMImage *readStreamPPM(FILE *fp) {
char buff[16];
PPMImage *image;
int c, rgb_comp_color;
//open PPM file for reading
if (!fp) {
//fprintf(stderr, "Unable to open file '%s'\n", filename);
... |
/*
* c-periphery
* https://github.com/vsergeev/c-periphery
* License: MIT
*/
#include "test.h"
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/stat.h>
#include "../include/i2c.h"
const char *i2c_bus_path;
uint8_t eeprom_addres... |
/**
* @file demo-raw-usb.c
* @author <NAME> <<EMAIL>>
* @date 2012-10-16
*
* Description: Demonstrate how to exchange raw USB commands with a spectrometer.
*
* Note: This was mainly tested with a USB2000+. Other spectrometer protocols may
* vary; see your Data Sheet for details.
*
* LICENSE:
*
* SeaBre... |
#include "ledcom.h"
#include <assert.h>
/* TODO:
* - Using an LED as a light sensor
* - Two way communication using an LED
* - Change so this is non-blocking, a state-machine should
* control this.
* - Add a PWM mode for emitting mode?
*
* This LED controller uses two I/O pins so an LED can be used
* as both... |
/*
# This file is part of the Astrometry.net suite.
# Licensed under a 3-clause BSD style license - see LICENSE
*/
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <assert.h>
#include "tycho2.h"
#include "tycho2-... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf.c :+: :+: :+: ... |
#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 for all objects using the newer style for writing objects.
typedef struct _findnotes { // defines our object's internal variables for each instance in a patch
t... |
/**
* @file follower.c
* @author <NAME> (<EMAIL>)
* @author <NAME> (<EMAIL>)
**/
#include "follower.h"
#include <assert.h>
/**
* @brief receives message from sender i.e, leader.
*
* @param message_received Consists of request_type and payload
*/
void follower_receive_message(follower_message_t *... |
#include "kernel/task.h"
#include "kernel/syscall.h"
#include "kernel/lib/memory/map.h"
#include "kernel/lib/memory/mmu.h"
#include "kernel/lib/memory/layout.h"
#include "stdlib/assert.h"
#include "stdlib/string.h"
#include "stdlib/syscall.h"
#include "kernel/lib/console/terminal.h"
#define E_INVAL 1 // Invalid param... |
#define F_CPU 8000000UL
#include <avr/io.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <util/delay.h>
#include <avr/interrupt.h>
#include <stdio.h>
#define LCD_DPRT PORTB //LCD DATA PORT
#define LCD_DDDR DDRB //LCD DATA DDR
#define LCD_DPIN PINB //LCD DATA PIN
#define LCD_C... |
#include "biosvar.h" // GET_BDA
#include "output.h" // dprintf
#include "string.h" // memset16_far
#include "vgautil.h" // VBE_total_memory
#include "std/pmm.h" // struct pmmheader
#include "byteorder.h"
#include "fw/paravirt.h"
/* ---------------------------------------------------------------------- */
/* minimal qe... |
/****************************************************************************
* apps/testing/ostest/posixtimer.c
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ... |
/*
Copyright (c) by <NAME>,
All rights reserved.
License: http://www.opensource.org/licenses/bsd-license.php
*/
#include <cv.h>
#include <highgui.h>
#include <stdio.h>
#include <unistd.h>
#include "RaspiCamCV.h"
int main(int argc, char *argv[ ]){
RASPIVID_CONFIG * config = (RASPIVID_CONFIG*)malloc(sizeof(RASP... |
#include <Scene/Scene.h>
#include <Scene/Camera.h>
#include <Scene/Transform.h>
#include <Scene/Components.h>
#include <Engine/Job.h>
#include <Engine/Engine.h>
#include <Engine/Events.h>
#include <Engine/Version.h>
#include <Engine/ECSystem.h>
#include <Engine/Application.h>
#include <Input/Input.h>
#include <System/L... |
#include <LobotServoController.h>
#define COUNTER_BASED_FREQUENCY 500000
LobotServoController myse(Serial1);
int r = 1;
String incoming = ""; // for incoming serial string data
long counter = 0;
void setup() {
pinMode(13, OUTPUT);
Serial.begin(115200); // Communicate with PI
//while(!Serial);
Serial.set... |
/*-
* SPDX-License-Identifier: BSD-2-Clause-FreeBSD
*
* Copyright (c) 2015 <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 reta... |
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#include <unistd.h>
#include "alt_generalpurpose_io.h"
#include "hps_linux.h"
#include "hwlib.h"
#include "socal/alt_gpio.h"
#include "socal/hps.h"
#include "s... |
/****************************************************************************
* *
* cryptlib MD4 Hash Routines *
* Copyright <NAME> 1992-1996 *
* *
****************************************************************************/
#include <ctype.h>
#include <stdio.h>... |
#define _GNU_SOURCE
#include <sys/mman.h>
#include <stdio.h>
#undef _GNU_SOURCE
#include <stdlib.h>
#include <inttypes.h>
#include <dlfcn.h>
#include <omp.h>
#include <stdlib.h>
#include <stdio.h>
#include <inttypes.h>
#include <omp.h>
#include <math.h>
//
// Operations are split out to make them easier to spot with O... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* render_next_frame_bonus.c :+: :+: :+: ... |
/*
* Copyright (c) 2017 Semihalf.
* Copyright (c) 2017 Stormshield.
* 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
*... |
/* $XFree86: xc/programs/Xserver/Xprint/ps/PsFonts.c,v 1.8 2005/10/14 15:16:16 tsi Exp $ */
/*
Copyright 1996, 1998 The Open Group
Permission to use, copy, modify, distribute, and sell this software and its
documentation for any purpose is hereby granted without fee, provided that
the above copyright notice appear i... |
#include "sdl1_opengl.h"
#include "base/base.h"
#include <SDL/SDL_opengl.h>
typedef struct Ctx {
struct Base base;
GLuint texture;
} ctx_t;
#define VOID_TO_SELF(_private) ctx_t* self = (ctx_t*)_private;
static void quit(
void* _private
) {
VOID_TO_SELF(_private);
if (SDL_WasInit(SDL_INIT_VIDE... |
/**
* \file
* \brief Implementation of the backend functions for domain exclusive address
* spaces
*
* This backend of libbomp deals with worker domains instead of threads.
*/
/*
* Copyright (c) 2007, 2008, 2009, 2010, ETH Zurich.
* All rights reserved.
*
* This file is distributed under the terms in ... |
// Copyright (C) 2018 <NAME>. See included LICENSE file.
#define TA_OPEN_FILE_WITH_NULL_TERMINATOR 0x0001 // Opens a file with a null terminator at the end.
typedef struct taFS taFS;
typedef struct taFile taFile;
enum taSeekOrigin
{
taSeekOriginStart,
taSeekOriginCurrent,
taSeekOriginEnd,
};
typ... |
#include <stdbool.h>
#include <stdint.h>
#include <math.h>
#include <stdlib.h>
#include "bloom.h"
#include "stdfloat.h"
#define WORD 64
#define BLOOM_SHIFT 6
#define BUFFER_LENGTH 16
#define U8TO64_LE(p) \
(((uint64_t)((p)[0])) | ((uint64_t)((p)[1]) << 8) | \
((uin... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <errno.h>
#include "common.h"
#include "script.h"
#include "object.h"
static void escword(struct word *word, char *str, size_t max) {
char *out;
bool var;
if (str[0] == '$' && max > 1 && strspn(str+1, valid) >= max-1) {
word->type = WORD_VARIABL... |
/*
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The OpenAirInterface Software Alliance licenses this file to You under
* the Apache License... |
/* **********************************************************
* Copyright (c) 2011 Google, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following condi... |
#include "globals.h"
#include "functions.h"
//We will write data processing functions here
void test_getData(){
getTime();
}
void test_getERPS(){
g_fLatitude.bits32 = (float) 40;
g_fLongitude.bits32 = (float) 0;
}
void getTime(){
uint16_t elapsedMillis = millis() - g_wOffsetTime;
uint16_t elapsedTime = (elapsedM... |
/*
* memory.c
*
* PSXSDK malloc() family functions
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
extern int __bss_start[];
extern int __bss_end[];
unsigned int first_free_page;
// 1K granularity and "pages", so more allocations which are small can be done
unsigned char busy_pages[2048];
unsign... |
#include "crypto_uint32.h"
#include "ge.h"
#include "crypto_additions.h"
static unsigned char equal(signed char b,signed char c)
{
unsigned char ub = b;
unsigned char uc = c;
unsigned char x = ub ^ uc; /* 0: yes; 1..255: no */
crypto_uint32 y = x; /* 0: yes; 1..255: no */
y -= 1; /* 4294967295: yes; 0..254: ... |
/*
* Common user mode functions
* Copyright (c) 2001,2003,2004 <NAME> <<EMAIL>>
* Copyright (c) 2003,2013,2014 <NAME> <<EMAIL>>
*
* All rights reserved.
*
* This code may not be resdistributed without the permission of the copyright holders.
* Any student solutions using any of this code base constitute dervice... |
/*
* Copyright (C) 2008-2020 Advanced Micro Devices, Inc. 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,
* ... |
/* nettle-hash.c
General hashing tool.
Copyright (C) 2011, 2013 <NAME>
This file is part of GNU Nettle.
GNU Nettle is free software: you can redistribute it and/or
modify it under the terms of either:
* the GNU Lesser General Public License as published by the Free
Software Foundation; e... |
/*-
* Copyright (c) 2019 <NAME>, W8BSD
*
* 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 following ... |
#include <stdio.h>
#include <stdlib.h>
#include <malloc.h>
#include <string.h>
#include <stdint.h>
#include <libdragon.h>
static resolution_t res = RESOLUTION_320x240;
static bitdepth_t bit = DEPTH_32_BPP;
int filesize( FILE *pFile )
{
fseek( pFile, 0, SEEK_END );
int lSize = ftell( pFile );
rewind( pFile... |
/* e_rem_pio2f.c -- float version of e_rem_pio2.c
* Conversion to float by <NAME>, Cygnus Support, <EMAIL>.
* Debugged and optimized by <NAME>.
*/
/*
* ====================================================
* Copyright (C) 1993 by Sun Microsystems, Inc. All rights reserved.
*
* Developed at SunPro, a Sun Microsys... |
/* C routines for ElectricField.py */
#include "MMTK/universe.h"
#include "MMTK/forcefield.h"
#include "MMTK/forcefield_private.h"
/* This function does the actual energy (and gradient) calculation.
Everything else is just bookkeeping. */
static void
ef_evaluator(PyFFEnergyTermObject *self,
PyFFEvaluatorObje... |
#include <assert.h>
#include <pthread.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/time.h>
#include "zmq.h"
#include "core/op_common.h"
#include "core/op_log.h"
#include "core/op_socket.h"
#include "core/op_task.h"
#include "core/op_thread.h"
struct op_task_internal_args
{
task_fn* original_task;
s... |
//
// breakout.c
//
// Computer Science 50
// Problem Set 3
//
// standard libraries
#define _XOPEN_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
// Stanford Portable Library
#include <spl/gevents.h>
#include <spl/gobjects.h>
#include <spl/gwindow.h>
// height and width of game'... |
/* example structure for the Boss-Worker parallel programming model
* see Thread Time: The Multithreaded Programming Guide
* <NAME> and <NAME>
* 1997, Prentice Hall (www.prenhall.com)
* ISBN: 0-13-190067-6
* adapted by <NAME>, march 1999
*/
#include <stdio.h>
#include <stdlib.h>
#include <errno.h>
#incl... |
#define _GNU_SOURCE
#include <stddef.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <signal.h>
#include <unistd.h>
#include <dirent.h>
#include <sys/stat.h>
#include <locale.h>
//#include <libintl.h>
#include <assert.h>
#include <wordexp.h>
#include <onion/onion.h>
#include <onion/log.h>
#incl... |
/**********************************************************
*
* File : Net_Cli.c
* Author : <NAME> & <NAME>
*
* Description :
* Ce fichier contient les fonctions relatives à
* l'éxectution de la partie Network client de TOMM
*
* Projet : PSE ISMIN 2A
*
* Date : 19/ 11/ 2014
*
*************************************... |
/*
* http://slashdot.jp/~doda/journal/456908
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <sys/un.h>
#include <sys/param.h>
#include <windows.h>
#define AGENT_COPYDATA_ID 0x804e50ba
#define AGENT_MAX_MSGLEN 8192
#define SSH_AGENTPID_ENV_NAME "SSH_AGENT_PID"
#define SSH_AUTHSOCKET_ENV... |
#pragma once
#define AXIS_NUMBER 3
#define VECTOR_NUMBER 3
#define KD_RING_BUFFER_SIZE 256
#define MAX_KP_FM1 0.90f
#define MAX_KI_FM1 0.30f
#define MAX_KD_FM1 0.55f
#define MAX_KP 0.75f
#define MAX_KI 0.25f
#define MAX_KD 0.30f
/*
set yaw_kp1=19.000
set roll_kp1=26.000
set pitch_kp1=27.000
set yaw_ki1=30.000
set ... |
#pragma once
#include "image_formats.h"
#include <pigeon/util.h>
#include <pigeon/wgi/wgi.h>
#include <stdbool.h>
typedef struct PigeonWGITextureMeta {
unsigned int width;
unsigned int height;
PigeonWGIImageFormat format;
bool has_alpha;
bool has_mip_maps;
// The compressed texture data is always... |
/* ====================================================================
* Copyright (c) 1999-2001 Carnegie Mellon University. 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. Redi... |
#include "be_object.h"
#include "be_func.h"
#include "be_exec.h"
#include "be_map.h"
#include "be_vm.h"
#define map_check_data(vm, argc) \
if (!be_ismap(vm, -1) || be_top(vm) - 1 < argc) { \
be_return_nil(vm); \
}
#define map_check_ref(vm) ... |
/**
* BasicDR.h
*
* This file contains definitions for BasicDR.c
*/
#ifndef __GENERIC_TYPE_DEFS_H_
#include "GenericTypeDefs.h"
#endif
#include "MCI_Common.h"
#define BASICDR
#define COMMODITY_DATA_BUFFER_LENGTH 10
#define opc1index 4
#define opc2index 5
//how long before we assume there won't be ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.