text stringlengths 3.08k 10.5k |
|---|
/*
* \copydoc python.c
*/
#include <stdlib.h>
#ifdef HAVE_KDBCONFIG_H
#include "kdbconfig.h"
#endif
#include <tests_plugin.h>
static void init_env()
{
setenv("PYTHONDONTWRITEBYTECODE", "1", 1);
setenv("PYTHONPATH", ".", 1);
}
char filebuf[KDB_MAX_PATH_LENGTH];
static char *srcdir_rewrite = NULL;
static char *p... |
/* Custom chip driver 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 <std... |
// Copyright (c) 2021. Pfizer Inc. All rights reserved.
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <math.h>
#include <float.h>
/* for reading from ActiGraph files */
#include <zip.h>
/*
======================================
GENERAL
======================================
*/
#... |
/***********************************************************************
**
** REBOL [R3] Language Interpreter and Run-time Environment
**
** Copyright 2012 REBOL Technologies
** REBOL is a trademark of REBOL Technologies
**
** Licensed under the Apache License, Version 2.0 (the "License");
** you may not use this... |
/* System definitions for code taken from the GNU C Library
Copyright 2017-2021 Free Software Foundation, Inc.
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 3 of the ... |
#include "osx64.h"
#include <dirent.h>
#include <errno.h>
#include <regex.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#define V_BUILD_PKG_DIR_NAME "/tree_x86_64/packages"
#define V_BUILD_PATCH_DIR_NAME "/patches"
#define V_BUILD_ARCHIVE... |
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "nghq/nghq.h"
#include "crypto_fns_openssl.h"
#include "signature_fns.h"
static char *
_add_header_block(char *result, size_t *len, const char *hdr,
const nghq_header **headers, size_t headers_length)
{
bool found_header = f... |
/*10) El TAD Lista Ordenada, es similar a la lista simple, pero cada elemento que se ingresa tiene un campo
clave. La función insertar analiza ese campo clave para ingresar el elemento en la posición correcta. La función
insertar ya no recibe la posición del elemento. Para comparar los elementos existe la función Com... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolar... |
/**
* @file pwm.c
* @brief
*
* DAPLink Interface Firmware
* Copyright 2021 Micro:bit Educational Foundation
* 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.
* You may obtain a copy of... |
#include "stdinc.h"
#include "dat.h"
#include "fns.h"
enum
{
Top = 1,
Bottom = 1,
Left = 40,
Right = 0,
MinWidth = Left+Right+2,
MinHeight = Top+Bottom+2,
DefaultWidth = Left+Right+500,
DefaultHeight = Top+Bottom+40
};
QLock memdrawlock;
static Memsubfont *smallfont;
static Memimage *black;
... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolar... |
/*
* Copyright (C) 2016 Fundacion Inria Chile
*
* 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 cpu_stm32l1
* @ingroup drivers_periph_adc
* @{
*
* @file
* @brief... |
/*-----------------------------------------------------------------------------
* $RCSfile: HelloSecService.c,v $
*
* See Copyright for the status of this software.
*
* The OpenSOAP Project
* http://opensoap.jp/
*-----------------------------------------------------------------------------
*/
#include <OpenSOA... |
#include "stm32f1xx_hal.h"
#include <math.h>
//------------------------------------------------
#define BME280_ADDRESS 0xEC
//------------------------------------------------
#define BME280_id 0xD0
#define BME280_hum_lsb 0xFE
#define BME280_hum_msb 0xFD
#define BME280_temp_xlsb 0xFC
#define BME280_temp_lsb 0xFB
#de... |
#include <stdlib.h>
#include <stdio.h>
#include "fetch_env.h"
#include "test.h"
#include "api.h"
#define TEST_SST_INIT (0)
#define TEST_SST_READ (1)
#define TEST_SST_WRITE (2)
#define TEST_SST_VERIFY (3)
#define TEST_PRI_INIT (4)
#define TEST_PRI_READ (5)
#define TEST_PRI_WRITE (6)
#define TEST_PRI_VERIFY (7)
... |
/* display test
*
* this is meant to be a low level test of the vector display!!!
*/
#include <stdlib.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <SDL2/SDL.h>
#include <hashbrown/display/display.h>
#define WIDTH 480
#define HEIGHT 360
#define MOUSE_FORCE 1
#define MOUSE_DAMPING 1
ty... |
static const char help[] =
"Solves elasto-plastic torsion problem in 2D using SNESVI. Option prefix -el_.\n"
"Equation is - grad^2 u = f(x,y) where f(x,y) = 2 C. Zero Dirichlet\n"
"boundary conditions. Domain Omega = (0,1)x(0,1). Constraint is upper bound\n"
" u(x,y) <= dist((x,y), bdry Omega) = psi(x,y).\n"
"... |
/*********************************************************************************
MIT License
Copyright (c) 2019 <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, inclu... |
#include<stdio.h>
#include<stdlib.h>
#include<assert.h>
#define MAX 32767
#define NIL -1
typedef struct info
{
int parent;
int vertex;
int weight;
}info;
typedef struct alist
{
int vertex;
int weight;
struct alist *next;
}alist;
void dijkstra(info *vertexlist,alist **adjlist,int n,int r);
voi... |
/**
* \file pmic.c
*
* \brief PMIC APIs
*
* This file contains API's to access PMIC registers
*/
/*
* Copyright (C) 2010 Texas Instruments Incorporated - http://www.ti.com/
*/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the followin... |
#include "utilities/string.h"
#include "utilities/test_helpers.h"
#include <stdio.h>
#include <string.h>
int test_string_append() {
string s = string_new("hello");
string world_cstr = string_wrap_cstring(" world");
string_append(&s, &world_cstr);
string hello_world_cstr = string_wrap_cstring("hello world");
... |
// SPDX-License-Identifier: GPL-2.0
#include <common.h>
#include <dm.h>
#include <regmap.h>
#include <syscon.h>
#include <dm/pinctrl.h>
#define BCM6838_CMD_LOAD_MUX 0x21
#define BCM6838_FUNC_OFFS 12
#define BCM6838_FUNC_MASK (0x37 << BCM6838_FUNC_OFFS)
#define BCM6838_PIN_OFFS ... |
/*------------------------------------------------------------------------------
* gengrid.c : generate ionosphere grid correction
*
* Copyright (C) 2012 by T.TAKASU, All rights reserved.
*
* version : $Revision:$ $Date:$
* history : 2012/09/15 1.0 new
*--------------------------------------------------------... |
/*
* Copyright (c) 2012-2017, RISE SICS AB
* 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 c... |
/* Copyright(c) 1986 Association of Universities for Research in Astronomy Inc.
*/
#include <ctype.h>
#include <stdio.h>
#include <signal.h>
#include <fcntl.h>
#include <unistd.h>
#include <sys/time.h>
#include <sys/resource.h>
#define import_spp
#define import_xwhen
#define import_kernel
#define import_knames
#incl... |
#import <string.h>
#define PI 3.141592f
#define HALF_PI (PI / 2.0f)
#define THIRD_PI (PI / 3.0f)
#define TWO_PI (PI * 2.0f)
#define QUARTER_PI (PI / 4.0f)
#define DEG_TO_RAD (PI/180.0f)
#define RAD_TO_DEG (180.0f/PI)
#define SINCOS_PRECISION (0.5f)
#define TEXT_FILE "TheGreatMigration.txt"
static const int ... |
/* Epidemic simulation
* $ cc -Ofast -march=native epidemic.c -lm
* $ ./a.out | mpv --no-correct-pts --fps=60 -
* $ ./a.out | x264 -o simulation.mp4 --fps 60 --frames 2700 /dev/stdin
*/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#define SIZE 1080
#d... |
#include "core.h"
#include "load_bmp.h"
#include "glyph.h"
#include "print_time.h"
#include "construct_absolute_paths.h"
#include "audio.h"
#define PATH_BUFFER_SIZE 100
//Gets initalised in init()
static SDL_Window* gWindow;
SDL_Surface* gWindowSurface;
SDL_Surface* gFontSurface;
SDL_Surface* gClockBgSurface;
stati... |
/* parser.c
** strophe XMPP client library -- xml parser handlers and utility functions
**
** Copyright (C) 2005-2009 Collecta, Inc.
**
** This software is provided AS-IS with no warranty, either express
** or implied.
**
** This software is distributed under license and may not be copied,
** modified or distribut... |
/* ChaCha20 (C99)
* This is free and unencumbered software released into the public domain.
*/
#include <stdint.h>
#define CHACHA20_KEYSIZE 32
#define CHACHA20_IVSIZE 8
#ifndef CHACHA20_ROUNDS
# define CHACHA20_ROUNDS 20
#endif
struct chacha20 {
uint32_t input[16];
unsigned char output[64];
int outl... |
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2007-2010 coresystems GmbH
* Copyright (C) 2011 Google Inc
*
* 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; version 2 o... |
/*
* vl_bench.c
*
* Created on: May 29, 2020
* Author: tonglin
*/
#include <math.h>
#include <stdlib.h>
#include <string.h>
#include <hdf5.h>
#include <hdf5_hl.h>
#include "../commons/h5bench_util.h"
#include "../commons/async_adaptor.h"
#define ERROR_RETURN do{\
printf("%s:L%d: failed.\n", __... |
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <errno.h>
#include <assert.h>
#include <time.h>
#include "image.h"
int image_alloc(struct img_ctx** ret) {
int err = 0;
struct img_ctx* ctx = malloc(sizeof(struct img_ctx));
if(!ctx) {
err = -ENOMEM;
goto fail;
}
MagickW... |
/* Copyright (c) 2014, <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 condi... |
/*
*Filename: batmon.c
*Author: <NAME>
*Year: 2014
*/
#include "batmon.h"
#include "main.h"
#define BAT_ADC_RESOLUTION 0xFFF+1
#define BAT_ADC_INSTANCE ADC1
#define BAT_ADC_ENABLEPERIPHCLK __ADC1_CLK_ENABLE
#define BAT_VOL_ADC_CHANNEL ADC_CHANNEL_1
#define BAT_VOL_PORTINSTANCE GPIOA
#define BAT_VOL_PORT... |
/**
* ravel-packet.c: Implementation of RavelPacket
*
*/
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include "api/packet.h"
#include "api/intrinsics.h"
#include "api/system.h"
#define TIER 0 // 8 bits for tier ID
#define SRC 1 // 32 bits for source
#define DST 5 // 8 bits for destination
#define... |
#include <assert.h>
#include <stdio.h>
#include <stdbool.h>
#include <string.h>
#include <stdlib.h>
#include "hexsockaddr.h"
void test_hexsockaddr4_new_1(void) {
hexsockaddr_t sa;
hexsockaddr_new(AF_INET, 0, &sa);
char tmp[256];
fprintf(stdout, "%s\n", hexsockaddr_fmt(tmp, sizeof(tmp), false, &sa));... |
#include <errno.h>
#include <grp.h>
#include <poll.h>
#include <pwd.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/stat.h>
#include <sys/un.h>
#include "client.h"
#include "log.h"
#include "poller.h"
#include "server.h"
#define LISTEN_BACKLOG 16... |
#include "render.h"
// each layer stores a list of sprites to be drawn at that layer
list *sprite_layers[SPRITE_LAYER_LIMIT * 2 + 1];
static double elapsed_time; // time for current update (draw) call
static void draw_sprite(sprite *s);
static list* get_sprite_layer(int layernum);
static ALLEGRO_FONT *debug_font;
vo... |
#include <avr/io.h>
#include <avr/interrupt.h>
#include <avr/eeprom.h>
#include <stdint.h>
#include "DCC_Decoder.h"
#include "DCC_Config.h"
#include "Motor.h"
#include "FX.h"
#include "globals.h"
//extern uint8_t DCC_CV29;
uint16_t prevtime;
uint16_t bit_timings[] = {0xFFFF, 0xFFFF}; //initialize to ones, just becaus... |
/* Copyright (c) 2022, <NAME>
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <unistd.h>
#include "classifier_term.h"
extern uint64_t received_total;
extern uint64_t received_pkt_total;
int init_posix(uint16_t port)
{
nfp_ifnet_t ifnet = NFP_IFNET_INVALID;
struct nfp_sockaddr_in add... |
#include "../include/complete.h"
#include "../include/shell.h"
#include "../include/tree.h"
#include "../include/utils.h"
/**
* @brief Checks if file located at specified path is executable
*
* @param path
* @param file_name
* @return true
* @return false
*/
bool check_if_executable(char *path, char *file_... |
/************************************************
*Author: <NAME>
*Organization: Bobcat Robotics
*Date: 26 Feb 2020
*Description: this file is being written as a driver for the fairyweight robot
* Uncle Traveling Matt but it should serve as a general purpose program for
* tank-style drive with a 3-channel mixed c... |
#include <string.h>
#include <LCUI_Build.h>
#include <LCUI/LCUI.h>
#include <LCUI/timer.h>
#include <LCUI/display.h>
#include <LCUI/gui/widget.h>
#include "test.h"
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 640
#define WIDGET_WIDTH 100
#define WIDGET_HEIGHT 100
#define DELTA 3.1415f
static struct {
int step;
i... |
#include <stdlib.h>
#include <unistd.h>
#include <stdio.h>
#include <assert.h>
struct chunk {
int size;
struct chunk *next;
int internal;
};
struct chunklist {
int size;
int length;
int internal;
struct chunk *first_chunk;
struct chunklist *next;
};
struct chunklist* chunk_list = NULL;
/**
... |
#include <u.h>
#include <libc.h>
#include "impl.h"
#define kuten208(high, low) ((high)*100 + (low) - 3232)
enum {
K201head = 0xA1,
K201tail = 0xDF,
SHhead = 0x81,
SHtail = 0xEA, /* tcs=0xEF */
SHinvalid = 0xA0,
SLhead = 0x40,
SLtail = 0xFC,
SLinvalid = 0x7F,
};
static Rune k201tab[] = {
[0xa1] = L'。', /*... |
#include "engine.h"
#include "logging.h"
#include <SDL2/SDL.h>
#include <SDL2/SDL_image.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
static bool init_sdl(void);
static bool init_window(SDL_Window **window, const int width, const int height,
const char *title);
static bool ini... |
/// Controls (source)
/// (c) 2018 <NAME>
#include "controls.h"
#include "stdlib.h"
#include "math.h"
#include "stdio.h"
#include "stdbool.h"
/// Amount of keys
#define KEYMAX 256
/// Button max
#define BUTTONMAX 4
/// Joystick button max
#define JOYMAX 12
/// An array of keys
static STATE keystate[KEYMAX];
/// An ... |
#include "app_list.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include <sys/wait.h>
#include <signal.h>
int al_create(struct al_item **apps, const char *dir, const char *name, struct al_item *next, struct al_item *previous)
{
int dirlen = 0;
if (dir != NULL)
di... |
#include "client.h"
Message create_message(int id, int t, int pid, pthread_t tid){
int res = -1;
Message message = {id, pid, tid, t, res};
return message;
}
int open_public_fifo(char* fifo_path){
while(1){
public_fifo = open(fifo_path, O_WRONLY | O_NONBLOCK);
if(!running)
... |
#include "mruby.h"
#include "mruby/variable.h"
#include "mruby/class.h"
#include "mruby/string.h"
#include "mruby/array.h"
#include "mruby/data.h"
#include <string.h>
#ifdef SOFTDEVICE_PRESENT
// #include "nrf_util_platform.h"
// #include "nrf_gpio.h"
#include "nrf_drv_twi.h"
#include "nrf_delay.h"
#include ... |
/*
* This program gets the largest product of a subarray of size 'k'
* in a given array of integers. For more information on this problem
* please refer to the following link:-
* http://www.geeksforgeeks.org/largest-product-subarray-size-k/
*/
#include<stdio.h>
#include<stdlib.h>
#include<stdbool.h>
#include<asser... |
#include <stdint.h>
#define QUEUE_LENGTH 32
#ifndef NUM_CORES
#define NUM_CORES 2
#endif
#define NUM_READERS (NUM_CORES/2)
#define NUM_WRITERS (NUM_CORES/2)
#define NUM_OPS 10
// this is just a circular queue
// we dequeue at the head index and enqueue from the tail index
typedef struct {
uint64_t head_index;
... |
/*
* Copyright (c) 2017, OpenAV Productions,
* <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
* ... |
#include <string.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/wait.h>
#include <stdbool.h>
#include "history.h"
#include "parser.h"
int execute(char *command, int in_background, char *redirection_filename, int fdout);
void SIGQUIT_handler(int);
... |
/* SPDX-License-Identifier: Apache-2.0
* Copyright © 2021 VMware, Inc.
*/
#pragma once
#include "dns.h"
#include "netdev.h"
#include "network.h"
#include "network-route.h"
int manager_set_link_mtu(const IfNameIndex *ifnameidx, uint32_t mtu);
int manager_set_link_mac_addr(const IfNameIndex *ifnameidx, const char *m... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_printf.c :+: :+: :+: ... |
// original gameboy
#include <gb/gb.h>
#include "music.h"
#include "music/the_journey_begins.c"
#include "pix/win_gbc_data.c"
#include "pix/win_gbc_pal.c"
#include "pix/win_gbc_inv_data.c"
#define WIN_START 0
#define WIN_INV_START 96
typedef struct {
const char name[21];
const Song *song;
} Track;
Track tr... |
/*
* Simple client example using fatfs to access filesystem on SD card
*/
#include "printf.h"
#include "strings.h"
#include "uart.h"
#include "ff.h"
static const char *name_of(FILINFO *f)
{
return ((f->fattrib & AM_LFN) || (f->lfname && *f->lfname)) ? f->lfname : f->fname;
}
static bool is_dir(FILINFO *f)
{
... |
/*
* Copyright 2018-2020 Redis Labs Ltd. and Contributors
*
* This file is available under the Redis Labs Source Available License Agreement
*/
#pragma once
#include "../record.h"
#include "../../util/arr.h"
#include "../../redismodule.h"
#include "../../schema/schema.h"
#include "../../graph/query_graph.... |
#include <gtk/gtk.h>
#include <stdio.h>
#include <gdk-pixbuf/gdk-pixbuf.h>
#include <stdlib.h>
#include <glib.h>
#include <gio/gio.h>
#include <string.h>
#include <sys/stat.h>
const char* extensions[] = {".jpg", ".bmp", ".png", ".jpeg", ".gif"};
GtkWindow *w = NULL;
GtkImage *i = NULL;
GList *imageList = NULL;
... |
/**
* @file main.c
* @brief TODO.
*
*/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
#include <signal.h>
#include <termios.h>
#include <fcntl.h>
#include <assert.h>
#include "xsparser/xsparser.h"
#include "xsparser/xsmessage.h"
static volatile sig_atomic_t g_exit_signaled;
static... |
/* COMP 530 - Assignment 4
* <NAME>
*
* Description:
* This program uses different processes to accomplish the task of reading in
* data, processing it, and outputing it in a specific format. Pipes are used
* to pass data between processes.
*
* UNC Honor Pledge: I certify that no unauthorized assistance h... |
/*
* telemetry_manager.c
*/
#include "telemetry_manager.h"
#include "radio.h"
#include "peripheral_assigner.h"
typedef enum {
NA = 0,
RelativePose,
AbsolutePose,
GPR,
Monitoring
} message_id;
static struct message_header_t {
uint8_t message_id;
uint16_t payload_len;
} message_header;
static struct pose_pa... |
/*
GNU GO - the game of Go (Wei-Chi)
Version 1.1 last revised 3-1-89
Copyright (C) Free Software Foundation, Inc.
written by <NAME>
modified by <NAME>
documented by <NAME>
*/
/*
This program is free software; yo... |
/**
* References:
* - https://en.wikibooks.org/wiki/Creating_a_Virtual_Machine/Register_VM_in_C
*
* Notes:
* - Registers begin with r, r0, r1, r2
* - Immediate values begin with #, #100, #200
* - Memory addresses begin with @, @1000, @1004
*/
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#i... |
/**
* @file evmOMAPL137_ddr.c
*
* @brief DDR initialization routines for OMAPL137 EVM
*
* ============================================================================
*/
/******************************************************************************
* Copyright (c) 2016 Texas Instruments Incorporated - htt... |
/********************************************************************************************************
* @file ble_config.h
*
* @brief This is the header file for BLE SDK
*
* @author BLE GROUP
* @date 2020.06
*
* @par Copyright (c) 2020, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
*
* ... |
/*
* Copyright (C) 2001 <NAME> (<EMAIL>)
*/
#include "drda.h"
#include <unistd.h>
#include <sys/socket.h>
#include <string.h>
#include <pwd.h>
#include <sys/types.h>
#include <stdlib.h>
#include <ctype.h>
void drda_set_user(DRDA *drda, char *usrid)
{
if (drda->usrid) { free(drda->usrid); }
drda->usrid = strdup(u... |
#include "gfunc.h"
#define GRAPHICS_FUNCTION 27
#define GRAPHICS_FUNCTION_LOCK 0
#define GRAPHICS_FUNCTION_UNLOCK 1
#define GRAPHICS_FUNCTION_SETRES 2
#define GRAPHICS_FUNCTION_COPY 3
uint16_t framebuffer_width = 0;
uint16_t framebuffer_height = 0;
uint8_t framebuffer_bpp = 0;
uint32_t framebuffer_pitch = 0;
void * ... |
#include "displayVisualization.h"
#include "console.h"
#include "consoleio.h"
#include "pixelmap.h"
#define clamp(n, low, high) (n > high ? high : (n < low ? low : n))
extern uint8_t scanMode;
void displayVisualizerInit(DisplayVisualizer *dv, AngleFinder *angleFinderX, AngleFinder *angleFinderY, WS2812Driver * ws281... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2014-2020 <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, ... |
/** @file syscall.c
This file contains wrappers for all system/service calls, as well as the
implementation of the system call framework itself
*/
/*
Copyright 2015, Google Inc.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the Lic... |
/* SPDX-License-Identifier: Unlicense */
/**
* @file
* Example/test for test-tun
*/
#include <stdio.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include "tun-open.h"
#define CHK(var, call) \
do { \
var = call; \
if (var < 0) { \
fprintf(stderr, "%s... |
/* Copyright (c) <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 and the follo... |
/* ------------------------------------------------------------------------ */
/**
@file ts3w.c
@author <NAME>
@brief Implements an easy to use teamspeak3 server wrapper.
This utility short circuit the teamspeak3 server software default
startscript by exposing a standard command line interface. A... |
#include "server/control.h"
#include "server/helper.h"
#include "server/manager.h"
#include <ctype.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <event2/listener.h>
#include <event2/buffer.h>
const char controller_help_msg[] =
"Support commands: PING | GET SERVERS | SET SERVER $idx\n";
static void acc... |
/*
* Copyright (c) 2013-2015 <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,
* publ... |
/*
FreeRTOS V9.0.0 - Copyright (C) 2016 Real Time Engineers Ltd.
All rights reserved
VISIT http://www.FreeRTOS.org TO ENSURE YOU ARE USING THE LATEST VERSION.
This file is part of the FreeRTOS distribution.
FreeRTOS is free software; you can redistribute it and/or modify it under
the terms of... |
/*
* Copyright (c) 1989, 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... |
/*
* shards.c - SiriDB shards.
*
* author : <NAME>
* email : <EMAIL>
* copyright : 2016, Transceptor Technology
*
* changes
* - initial version, 04-04-2016
*
* Info shards->mutex:
*
* Main thread:
* siridb->shards : read (lock) write (lock)
* Other threads:
* siri... |
#include <windows.h>
#include <winioctl.h>
#include <stdio.h>
#include <tchar.h>
#include <Sddl.h>
#include "KernelArch.h"
#include "KernelExploit.h"
DWORD LocalCopyMemory(PVOID dest, PVOID src, DWORD size)
{
DWORD i;
PCHAR pDest = dest, pSrc = src;
for(i=0; i<size;i++)
pDest[i]=pSrc[i];
ret... |
/* mconf.h
*
* Common include file for math routines
*
*
*
* SYNOPSIS:
*
* #include "mconf.h"
*
*
*
* DESCRIPTION:
*
* This file contains definitions for error codes that are
* passed to the common error handling routine mtherr()
* (which see).
*
* The file also includes a conditional assembly d... |
#include <stdio.h>
#include <stdlib.h>
#define MAX_COLLARTZ 1000000
#define MAX_SEQUENCE 2000
#define MAX_ITERATE 100000
typedef struct{
int nr;
int steps;
int ups;
int downs;
int max;
int max_odd;
} COLLARTZ;
typedef struct{
int nr;
int steps;
int ups;
int max;
} C_SEQUENCE;
... |
/*
* Copyright (c) 2017 <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 condi... |
// Testing functions for rtsctsMac
// 7/1/08
// <NAME>
#include "xparameters.h"
#include "warpphy.h"
///array of test variables
unsigned int tvar[16] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0};
///print an address
void printAddr(unsigned char * addr) {
xil_printf("\r\n%02x %02x %02x %02x %02x %02x",
addr[0], addr[... |
/**************************************************************************
*
* Copyright 2003 Tungsten Graphics, Inc., <NAME>, Texas.
* All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the
* "Software")... |
#include <ruby/ruby.h>
#include <ruby/io.h>
#include <ctype.h>
#include "dl.h"
VALUE rb_mDL;
VALUE rb_eDLError;
VALUE rb_eDLTypeError;
ID rbdl_id_cdecl;
ID rbdl_id_stdcall;
VALUE
rb_dl_dlopen(int argc, VALUE argv[], VALUE self)
{
return rb_class_new_instance(argc, argv, rb_cDLHandle);
}
/*
* call-seq: DL.mallo... |
#include "esp_system.h"
//#include "esp_crc.h"
#include "esp_log.h"
#include "esp_debug_helpers.h"
#include "esp_sleep.h"
#include "esp_task.h"
#include "esp_task_wdt.h"
#include "esp_timer.h"
#include "esp_int_wdt.h"
#include "esp_interface.h"
#include "esp_ipc.h"
#include "esp_pm.h"
#ifdef ESP_IDF_COMP_SPI_FLASH_E... |
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2019 <NAME> for Adafruit Industries
* Copyright (c) 2018 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation... |
//**********************************************************************;
// Copyright (c) 2016, 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:
//
// 1. Redistributions of s... |
#include "IPC.h"
#include "naiveConsole.h"
#include "stdio.h"
char * pipeNames[MAX_PIPES];
Pipe * pipes[MAX_PIPES];
int lastPipeName=0;
int ipcAdminMutex;
void initializePipes()
{
int i ;
for(i = 0 ; i < MAX_PIPES ; i++){
pipeNames[i] = "/n";
pipes[i] = NULL;
}
ipcAdminMutex = ge... |
#include <stdio.h>
#include <string.h>
#include "sdkconfig.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "freertos/semphr.h"
#include "esp_system.h"
#include "esp_spi_flash.h"
#define SIZE (32u)
typedef struct our_semaphore {
StaticSemaphore_t mutex;
SemaphoreHandle_t mutex_hnd;
unsigned ... |
/* bashgetopt.c -- `getopt' for use by the builtins. */
/* Copyright (C) 1992 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
Bash 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 Found... |
/* +---------------------------------------------------------------------------+
| Mobile Robot Programming Toolkit (MRPT) |
| http://www.mrpt.org/ |
| ... |
// Microsoft Public License (MS-PL) - Copyright (C) <NAME>
// This file is subject to the terms and conditions defined in
// file 'LICENSE', which is part of this source code package.
#include <stdlib.h>
#include "pv8sdk.h"
#include "pv8sdk.lua.h"
#include "pv8sdk.sdl2.h"
#include "util.h"
#include "importutil.h"
#de... |
/*
* ISC License
*
* Copyright (C) 1985-2018 by
* <NAME>
* <NAME>
* Delft University of Technology
*
* Permission to use, copy, modify, and/or 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 c... |
/* SPDX-License-Identifier: BSD-2 */
/*******************************************************************************
* Copyright 2017-2018, Fraunhofer SIT sponsored by Infineon Technologies AG
* All rights reserved.
*******************************************************************************/
#include <stdlib.h... |
/* $Xorg: GetAtomNm.c,v 1.5 2001/02/09 02:03:33 xorgcvs Exp $ */
/*
Copyright 1986, 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 in all copies and that both ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.