text
stringlengths
3.12k
18.7k
// Copyright (C) 2020-2020 <NAME>. All rights reserved. // // This file is subject to the terms and conditions defined in file 'LICENSE', // which is part of this source code package. #include <string.h> #include "lmic.h" #include "eefs/eefs.h" #include "micro-ecc/uECC.h" #include "eckm.h" #include "svcdefs.h" // f...
#include <stdio.h> #include <stdlib.h> #include <ctype.h> float saldo = 0.0; int emprestimo1pagos = 0, emprestimo2pagos = 0, emprestimo3pagos = 0, emprestimo4pagos = 0, emprestimo5pagos = 0; float emprestimoDevendo1 = 0, emprestimoDevendo2 = 0, emprestimoDevendo3 = 0, emprestimoDevendo4 = 0, emprestim...
/***************************************************************************** * Copyright (c) 2016 The University of Tokyo * This software is released under the MIT License, see LICENSE.txt *****************************************************************************/ #include <stdio.h> #include <stdlib.h> #includ...
#include "Graphics.h" #include "VBE.h" #include "character.h" #include "mouse.h" #include "windows.h" #include "defs.h" #include "bitmap.h" extern ushort* BACKGROUND; ushort savemouse[20][20]; int ct1=0; int ct2=0; wndList WList; static uchar MouseBuf[MOUSE_WIDTH * MOUSE_HEIGHT ] = { 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0...
/* gcc dhry1.c cpuidc64.o cpuida64.o -m64 -lrt -lc -lm -o dhry1 * * "DHRYSTONE" Benchmark Program for PCs * #define Version not used */ // VERSION #define _CRT_SECURE_NO_WARNINGS 1 #ifdef WIN32 #include <Windows.h> #else #include <sys/time.h> #endif #ifdef CNNT #define options "Non-optimised" #else //...
/* * health.c */ #include <siri/health.h> #include <siri/siri.h> #include <siri/net/tcp.h> #include <logger/logger.h> #define OK_RESPONSE \ "HTTP/1.1 200 OK\r\n" \ "Content-Type: text/plain\r\n" \ "Content-Length: 3\r\n" \ "\r\n" \ "OK\n" #define NOK_RESPONSE \ "HTTP/1.1 503 Service Unavaila...
#include "daemonize.h" #define SFMT (sizeof(key_t) == sizeof(int)) \ ? "%8i %c:%-8d %c:%-8d %d" \ : "%8li %c:%-8d %c:%-8d %d" static void handler(int sig, siginfo_t* siginfo, void* ucontext) { syslog(LOG_ERR, "Got signal %d at address: 0x%lx\n", sig, (long)siginfo->si_addr); struct sigaction sa; ...
#include "ARMCM0plus.h" #include "tetris.h" #include "randoms.h" #include <stdbool.h> #include <stdlib.h> #include "SEGGER_RTT.h" #define ASSERT(x) \ do { \ if (!(x)) { ...
#include "usart.h" UART_HandleTypeDef huart1; UART_HandleTypeDef huart3; DMA_HandleTypeDef hdma_usart1_rx; DMA_HandleTypeDef hdma_usart1_tx; UART_RxBufferTypeDef uart1_rx_buffer; /* 重定向std输出流到 USART1 */ size_t _write(int file, const uint8_t *pBuffer, size_t len) { HAL_UART_Transmit(&huart1, pBuffer, len, 0xFF); ...
// Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. // Copyright (c) Express Logic. All rights reserved. // Please contact <EMAIL> for any questions or use the support portal at www.rtos.com /* This file is used for po...
#include <stdlib.h> #include <string.h> #include <errno.h> #include <stdio.h> #include <SDL2/SDL.h> #include <SDL2/SDL_image.h> #include "Shared.h" enum { WINDOW_WIDTH = 800, WINDOW_HEIGHT = 600 }; static SDL_Window *win; static struct SHR_Screen screen; static struct SHR_Image ball_img; enum { PARTICLE_BATC...
#include "shell.h" #include "drivers/screen.h" #include "drivers/console.h" #include "builtins.h" #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdbool.h> #include <k/syscalls.h> #include <k/io.h> #include <k/finfo.h> #define CMD_MAX_SIZE (SCREEN_WIDTH * 3) #define CMD_MAX_ARGS 32 #define BUIL...
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <sys/socket.h> #include <linux/sockios.h> #include <netdb.h> #include <net/if.h> #include <netinet/ip.h> #include <netinet/ip_icmp.h> #include <netinet/in.h> #include <arpa/inet.h> #include <linux/types.h> #inclu...
/* * This is a RANDOMLY GENERATED PROGRAM. * * Generator: csmith 2.0.0 * svn version: exported * Options: --check-global -s 802 * Seed: 802 */ #include "random_runtime.h" long __undefined; /* --- Struct/Union Declarations --- */ struct S0 { volatile uint64_t f0; int32_t f1; }; /* --- GLOBAL ...
/* gpio control from pad. (C) 2018 TANIGUCHI, Kazushige */ #include <stdint.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <fcntl.h> #include <errno.h> #include <signal.h> #include <sys/epoll.h> #include <sys/signalfd.h> #include <getopt.h> #incl...
/* Copyright (C) 2006, 2011 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C 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 <getopt.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <pwd.h> #include <unistd.h> #include <sys/select.h> #include <sys/time.h> #include <errno.h> #include <time.h> #include <libpq-fe.h> #ifndef EXIT_SUCCESS #define EXIT_SUCCESS 0 #endif #ifndef EXIT_FAILURE #define EXIT_FAILURE 1 #...
/* * Copyright 2017 <NAME> * * 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 applicable law or agreed to in wr...
#include <stdio.h> #include <string.h> #include "variables.h" #include "tokens.h" #include "expression.h" #include "globals.h" #include <stdlib.h> // I think I can safely get rid of type and value... //state machine: Line number //first expression // expression - read next, no longer first expression //flow...
// code found on the internet at the adress: // http://people.sc.fsu.edu/~jburkardt/c_src/mpi/monte_carlo_mpi.c // i don't own this code, but keep it there as an example # include <math.h> # include <mpi.h> # include <stdio.h> # include <stdlib.h> # include <time.h> # define DEBUG 0 # define CHUNKSIZE ...
/* src/config.h. Generated by configure. */ /* src/config.h.in. Generated from configure.in by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ /* #undef CRAY_STACKSEG_END */ /* Define to 1...
/* * This file is part of the coreboot project. * * Copyright 2013 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 of the License. * * This program is distribute...
#include "dg.h" static void dump_dggrid ( void ); static void dump_nfile ( void ); static void dump_dgfile ( void ); static void dump_dgarea ( void ); static void dump_dgsubg ( void ); static void dump_dginpt ( void ); static void dump_dgtabl ( void ); static void dump_dgstck ( void ); static FILE *logfp; void dg_d...
/* * journal.c - compressed crash journal, used for intelligent crash * handling * ************************ * journal format: * start=<time and date> * total=<count> * <pid> <name> <count> <time and date1> <time and date2> ... * <pid> <name> <count> <time and date1> <time and date2> ... */ #include <stdde...
/***************************************************************************** ****************************************************************************** * * Device driver exec for Windows Performance Counter Access * * With thanks to <NAME> of HUMUSOFT s.r.o. * *****************************...
# include <stdlib.h> # include <stdio.h> # include <time.h> # include <omp.h> int main ( int argc, char *argv[] ); int circuit_value ( int n, int bvec[] ); void i4_to_bvec ( int i4, int n, int bvec[] ); void timestamp ( void ); /******************************************************************************/ int main...
/* * Copyright (c) 2012-2014 , JANET(UK) * 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 ...
/*! \file 3D connected component labelling Each foreground voxel receives a label indicating its membership in a connected component. The algorithm is based on depth first search. \par Reference: <NAME> (1998). "Volumetric Image Analysis", <NAME> & Sons, Chichester, England. \par Author: <NAME>, MPI-CBS */ /* Fro...
/** * developer: <EMAIL> * date: 21/10/2021 * * Development approach: * Create a wireframe of the scanner. * This is only how I would prefer to implement it * and maybe not the most efficient or optimized way to do it. * Later on we can make any changes and the scanner * won't be that big of a component ...
#include "stdlib.h" #include "string.h" #include "assert.h" #include "stdio.h" #include "arch.h" #define MF_INUSE 1 #define MF_ALL (MF_INUSE) #define fl_next(fl) ((struct freelist *)(((size_t)(fl)->next)&~MF_ALL)) #define fl_used(fl) (((size_t)(fl)->next)&MF_INUSE) #define fl_make_next(fl, nptr) (struct freelist *)(((...
#include "buddy.h" #include "tools.h" int cal_order(int size) { int targetlevel = 0; int add1_flag = 0; while (size >> 1) { if (size & 1) add1_flag = 1; ++targetlevel; size >>= 1; } return targetlevel + add1_flag; } void buddy_init(int num_pages){ unsigned long addr = LOW_MEMORY; ...
/* * Copyright (c) Facebook, Inc. and its affiliates. * All rights reserved. * * This source code is licensed under the BSD-style license found in the * LICENSE file in the root directory of this source tree. */ #include <assert.h> #include <math.h> #include <stdbool.h> #include <stddef.h> #include <stdint.h> #i...
/*D*********************************************************** * Modul: GUI - dialog uinput.c * * Receive data from the database daemon (DBI) * The wrapped action depends on COMMTYP * * Copyright: yafra.org, Basel, Switzerland *******************************************************...
/* * setpwnam.c -- edit an entry in a password database. * * (c) 1994 <NAME> <<EMAIL>> * This file 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, or (at...
//-------------------------------------------- //// NAME: <NAME> //// CLASS: XIb //// NUMBER: 13 //// PROBLEM: #3 //// FILE NAME: starcraft3.c //// FILE PURPOSE: //// Implements a simple, multithreaded prototype of the StarCraft game. ////--------------------------------------------- #include <stdio.h> #include <uni...
#include "riscv.h" uint32_t x[NREG]; uint32_t csr[NCSR]; char *r_name[] = {"x0", "ra", "sp", "gp", "tp", "t0", "t1", "t2", "s0", "s1", "a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7", "s2", "s3", "s4", "s5", "s6", "s7", "s8", "s9", "s10", "s11", "t3", "t4", "t5"...
// // ls.c // // List directory contents // // Copyright (C) 2012 <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 copyrig...
extern ulong FPcontrol(ulong,ulong); extern ulong FPstatus(ulong,ulong); extern void FPsave(void*); extern void FPrestore(void*); extern void Sleep(Rendez*, int (*)(void*), void*); extern void Wakeup(Rendez*); extern void FPinit(void); extern void addprog(Proc*); extern Block* allocb(int); extern int canlock(Lock*); ex...
#ifndef CIA_IRQ_ALARM #define CIA_IRQ_TIMER_A (1 << 0) #define CIA_IRQ_TIMER_B (1 << 1) #define CIA_IRQ_ALARM (1 << 2) #define CIA_IRQ_SERIAL (1 << 3) #define CIA_TIMER_A_RUNNING(cia) ((cia)->timer_a_ctrl & 1) #define CIA_TIMER_B_RUNNING(cia) ((cia)->timer_b_ctrl & 1) #endif static inline uint8_t CIA_NAME(inc_bc...
/* Glidix GUI Copyright (c) 2014-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: * Redistributions of source code must retain the above copyright notice, this list of condition...
#pragma once #include <stdio.h> #include <stdlib.h> #include <string.h> #include <stdint.h> #include <limits.h> #include <assert.h> #include <inttypes.h> #include <unistd.h> #include <pthread.h> #include <fcntl.h> #include <sys/time.h> #include <sys/mman.h> #include <netinet/tcp.h> #include <sys/epoll.h> #include <sy...
/*************************************************************************** * Copyright (C) 2008 by <NAME> * * <EMAIL> * * * * This program is free software;...
/* CF3 Copyright (c) 2015 ishiura-lab. Released under the MIT license. https://github.com/ishiura-compiler/CF3/MIT-LICENSE.md */ #include<stdio.h> #include<stdint.h> #include<stdlib.h> #include"test1.h" static volatile uint8_t x306 = 56U; int32_t t1 = 1432; uint64_t t2 = 202517398553336LLU; volatile uint64_t t3 ...
/* * 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), University of Bologna and ETH Zurich * 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 ...
/* No copyright is claimed in the United States under Title 17, U.S. Code. All Other Rights Reserved. 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 limitat...
#include <stdio.h> // malloc() #include <stdlib.h> // CHAR_BIT #include <limits.h> // memcpy(), strcpy() #include <string.h> // uint32_t #include <stdint.h> // bool #include <stdbool.h> // Defines things like BLOCK_SIZE, etc. #include "constants.h" // Defines structures for filesystem components (blocks, inodes,...
#define _GNU_SOURCE #include <getopt.h> #include <unistd.h> #include <math.h> #include <time.h> #include <sys/time.h> #include <sys/mman.h> #include <sched.h> #include <pthread.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <sys/types.h> #include <arpa/inet.h> #include <netd...
// SPDX-License-Identifier: GPL-2.0-or-later /* * Copyright (c) 2017 Google, Inc. */ /* * Regression test for two related bugs: * * (1) CVE-2017-15299, fixed by commit 60ff5b2f547a ("KEYS: don't let add_key() * update an uninstantiated key") * (2) CVE-2017-15951, fixed by commit 363b02dab09b ("KEYS: Fix rac...
extern void PUT32 ( unsigned int, unsigned int ); extern unsigned int GET32 ( unsigned int ); extern void dummy ( unsigned int ); #define GPFSEL1 0x20200004 #define GPSET0 0x2020001C #define GPCLR0 0x20200028 #define GPPUD 0x20200094 #define GPPUDCLK0 0x20200098 #define AUX_ENABLES 0x20215004 #define AU...
/* Copyright (c) 2011 The LevelDB Authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. See the AUTHORS file for names of contributors. */ #include "sqlite3.h" #include "bench_common.h" #include <getopt.h> #include <unistd.h> #include <ma...
/* * calc_dict.c * Abbreviation dictionary calculation, part of * Tao-Deng-Stonebraker algorithm for * approximate string JOINs with abbreviations * * IDENTIFICATION * contrib/mipt-asj/asj/calc_dict.c */ #include "calc_dict.h" /** * @brief qsort comparator for pairs (full, abbreviation) ...
#include "main.h" #define RS_INS 0x00 #define RS_DATA 0x40 #define SPI_COMMAND_SIZE 3 ADC_HandleTypeDef hadc1; SPI_HandleTypeDef hspi1; UART_HandleTypeDef huart2; void SystemClock_Config(void); static void MX_GPIO_Init(void); static void MX_USART2_UART_Init(void); static void MX_SPI1_Init(void); static void MX_ADC...
// keymap_verbose.h : Defines additional DirectInput scan codes for the // hardware switches, to ensure that all switches are exercised for the // purpose of verbose logging. // #pragma once // Player 1 #ifndef P1_START #define P1_START 0xff #define P1_START_FLAGS KEYEVENTF_SCANCODE #endif ...
/* -*- C -*- */ /* * Copyright (c) 2012-2020 Seagate Technology LLC and/or its Affiliates * * 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...
/* * Copyright (C) 1997 Massachusetts Institute of Technology * * This software is being provided by the copyright holders under the * following license. By obtaining, using and/or copying this software, * you agree that you have read, understood, and will comply with the * following terms and conditions: * *...
/**********************************************************************************/ /* MIT License */ /* */ /* Copyright (c) 2021 <NAME>, <NAME> */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining a copy */ /* of this software and associ...
/* * Based off tests/lib/libc/gen/posix_spawn/t_spawn.c */ /* $NetBSD: t_spawn.c,v 1.1 2012/02/13 21:03:08 martin Exp $ */ /*- * Copyright (c) 2012 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by <NAME> <<EMAIL>> and * <NAME> ...
#include <stdlib.h> #include <stdio.h> #include <stdbool.h> #include <assert.h> #define PANIC(...) \ fprintf(stderr, __VA_ARGS__); \ exit(EXIT_FAILURE); typedef enum TokenType { TOKEN_MUL, TOKEN_ADD, TOKEN_INT, TOKEN_LPAREN, TOKEN_RPAREN, TOKEN_END_OF_LINE, TOKEN_END_OF_FILE } Toke...
#include "spvm_unicode.h" /* SPVM_UNICODE is originally copied from utf8proc utf8proc license https://github.com/JuliaStrings/utf8proc Copyright © 2014-2018 by <NAME>, <NAME>, <NAME>, <NAME>, and other contributors listed in the git history. Permission is hereby granted, free of charge, to any person obtaining a c...
/* * arch/mips/galileo/compressed/burner.c * * By RidgeRun Inc (Leveraged from Galileo's main.c, misc.c, etc). * * Burn image from ram to flash * For use with Galileo EVB64120A MIPS eval board. */ #include <asm/types.h> #include <asm/byteorder.h> #include <asm/galileo-boards/evb64120A/eeprom_param.h> #includ...
#include "classgroup.h" #include "HKZbasis.c" //#include "BKZ50.c" //#include "BKZ40.c" mpz_t cn, half_cn, twopow258, babai_Ainv_row[NUM_PRIMES]; mpf_t IP[NUM_PRIMES],B[NUM_PRIMES*NUM_PRIMES]; const char A[NUM_PRIMES*NUM_PRIMES]; // clear classgroup variables void clear_classgroup(){ mpz_clear(cn); mpz_clear(twop...
#include <assert.h> #include <errno.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <malloc.h> #include <extlog.h> #include "regs.h" #include "sys.h" #include "ptmalloc.h" #ifndef MALLINFO_OFFSET #error "MALLINFO_OFFSET is not defined" #endif #ifndef MP__OFFSET #error "MP__OFFSET is not defined...
/* * Copyright (c) 2017, 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 source code must retain the above copyright notice, * this list of c...
//Program to setup and control the Ortec 974 counter //while plotting the results in real time //<NAME> 23-Oct-2013 #include <stdlib.h> #include <stdio.h> #include <ctype.h> #include <errno.h> #include <unistd.h> #include <stdint.h> #include <string.h> #include <getopt.h> #include <gpib/ib.h> #define strsize 40 #def...
#include <stdio.h> #include <stdlib.h> #include <unistd.h> #include <sys/socket.h> #include <sys/types.h> #include <netinet/in.h> #include <arpa/inet.h> #include <ctype.h> #include <string.h> #include <pthread.h> #include <json-c/json.h> #define SEEK_DEVICE "SeekDevice" #define NETWORK_CONFIG "NetworkCo...
/* Copyright (c) 2015-2016, Apple 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, this list of conditions and the follow...
// text_renderer.c #include "text_renderer.h" #include <stdlib.h> #include <memory.h> typedef struct text_draw_command { loaded_mesh* mesh; material* material; matrix4 transform; uint32 element_offset; uint32 element_count; } text_draw_command; text_renderer text_renderer_create(uint32 text_...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include <stm32f4xx_hal.h> #include "main.h" #include "ff.h" #include "defs.h" #include "delay.h" #include "leds.h" #include "byte_queue.h" #include "gpio_helpers.h" #include "utility.h" #include "logprintf.h" #include "sd_spi.h" #includ...
#include <stdlib.h> #include <stdio.h> #include <math.h> #include "esp_log.h" #include "driver/i2c.h" #include "sdkconfig.h" #include "mpu6050.h" int interrupt_threshold = 30; // From 0 to 255 float x, y, z, accel; short value; i2c_cmd_handle_t cmd; bool check_mpu6050() { int ret; i2c_cmd_handle_t cmd = i2c_cmd_...
/*------------------------------------------------------------------------------ * * Copyright (c) 2011, EURid. All rights reserved. * The YADIFA TM software product is provided under the BSD 3-clause license: * * Redistribution and use in source and binary forms, with or without * modification, are permitted provide...
/* @(#) Filter functions * &(#) va_alist is a series of double variables * @(#) * @(#) Used to filter image in in the frequency domain, writes * @(#) the result in image out * @(#) * @(#) int im_flt_image_freq( in, out, flag, num_args, va_alist ) * @(#) IMAGE *in, *out; * @(#) enum mask_type flag; * @(#) int n...
/* //todo -. sky box; -. lights -. physics -. chunk -. net -. support Lua or Lisp -. small games -. noise - world (biomes, environment) -. mmorpg */ #include "stdio.h" #include "angle_gl.h" #include "shader.h" #include "texture.h" #include <cglm/cglm.h> #include <stb_image.h> #include "window.h" #in...
/* * Copyright (C) 2019 FIX94 * * This software may be modified and distributed under the terms * of the MIT license. See the LICENSE file for details. */ #include <stdio.h> #include <malloc.h> #include <inttypes.h> #include <string.h> #include <stdbool.h> #include "../decmp/decmp.h" #include "../emu/emu_cmp.h" ...
#include <core/types.h> #include <core/string.h> #include <core/mp.h> #include <cpu/cpu.h> #include <cpu/cpuinfo.h> #include <core/console.h> /* Coprocessor 0 product ID fields. */ #define CP0_PRID_OPTIONS(p) (((p) >> 24) & 0xff) #define CP0_PRID_COMPANY(p) (((p) >> 16) & 0xff) #define CP0_PRID_TYPE(p) (((p) >> ...
/** @file wireless.h @brief Driver for the TI MSP430-CC2500 Wireless Chipset @date 2015/04/14 */ #include "stm32f4xx.h" #include "stm32f4xx_conf.h" #include "stm32f4xx_exti.h" #include "misc.h" /** @def CC2500_SPI The SPI used for communication with the CC2500 chipset */ #define CC2500_SPI SPI4 /** @de...
/* shield.c: SHIELD IMPLEMENTATION * * $Id: //info.ravenbrook.com/project/mps/version/1.113/code/shield.c#1 $ * Copyright (c) 2001 Ravenbrook Limited. See end of file for license. * * See: idea.shield, design.mps.shield. * * This implementation of the shield avoids suspending threads for * as long as possible....
/* kozoume.c Copyright 2018 <NAME> 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 applicable law or agreed to in writing, so...
/* Copyright 2021 Cartesi 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 applicable law or agreed to in writ...
#include "rpi.h" #include "fat32.h" #include "fat32-helpers.h" /****************************************************************************** * boot record helpers. */ #define is_pow2(x) (((x) & -(x)) == (x)) static int is_fat32(int t) { return t == 0xb; } void fat32_volume_id_check(fat32_boot_sec_t *b) { // ...
/** * (C) Copyright 2019 Intel Corporation. * * 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 applicable law or...
/* File: edit.c COPYING: Full text of the copyrights statement at the bottom of the file Project: WW Started: 6th October, 1999 Descrition: Edit functions */ #include "global.h" #include "file.h" #include "nav.h" #include "block.h" #include "undo.h" #include "search.h" #include "edit.h" /* ***********************...
/* USER CODE BEGIN Header */ /** ****************************************************************************** * @file stm32l5xx_hal_msp.c * @brief This file provides code for the MSP Initialization * and de-Initialization codes. **************************************************...
#include "game.h" #include "backend/video.h" #include "ai.h" #include "block.h" #include "font.h" #include "network.h" #include "piece.h" #include "player.h" #include "states.h" #include "tileset.h" Game game; Image *backgroundGfx; static void gameRestart() { boardInit(&player1.board, BOARD_OFFSET_X_P1, BOARD_OFFSET...
/** ****************************************************************************** * @file CAN/DualCAN/main.c * @author MCD Application Team * @version V3.6.0 * @date 20-September-2021 * @brief Main program body *****************************************************************************...
/*--------------------------------------------------------------------------- * Pointer Registration Table * *--------------------------------------------------------------------------- * Several actions in the driver involve a depth search through all * mappings and arrays referenced from one object, including th...
#include <math.h> // acos function continuously extended beyond -1 and 1. float safe_acos(float number_more_or_less_between_one_and_minus_one){ return (fabs(number_more_or_less_between_one_and_minus_one) < 1) ? acos(number_more_or_less_between_one_and_minus_one) : 0; return 0; } int smallpow(int x, int p){ int ret...
/******************************************************************************* * Copyright (c) 2011, <NAME> - www.xs-labs.com * Distributed under the Boost Software License, Version 1.0. * * Boost Software License - Version 1.0 - August 17th, 2003 * * Permission is hereby granted, free of charge, to any perso...
/** * \file main.c * * Cortex-M7 main.c file */ /* Includes ------------------------------------------------------------------*/ #include "main.h" #include "common.h" /* Private variables ---------------------------------------------------------*/ UART_HandleTypeDef huart3; /* Ringbuffer variables */ ...
// ---------------------------------------------------------------------------- // Copyright 2019 Drunella // // 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/...
/* dkilo - A text editor built using kilo's foundations * * Author: <NAME> * ******************************************************************************* * Copyright (C) 2016 <NAME> <antirez at gmail dot com> * * All rights reserved. * * Redistribution and use in source and binary forms, with or without * ...
/* * Copyright (c) 2021, <NAME> <<EMAIL>> * * SPDX-License-Identifier: BSD-2-Clause */ #include <dirent.h> #include <fcntl.h> #include <stdbool.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <time.h> #include <unistd.h> #define SUBSYSTEM_COUNT 5 #define USAGE "Usage %s:\n --rebase Reba...
/* * Copyright (c) 2015 <NAME> */ #include <ngx_config.h> #include <ngx_core.h> #include <ngx_http.h> #include <nginx.h> #include <ifaddrs.h> #include <net/if.h> #if (NGX_LINUX) #include <linux/if_link.h> #define NGX_AF_LINK AF_PACKET #define ngx_get_ifa_tx_bytes(ifa) \ ((uint64_t)((struct rtnl_link_stat...
/** * Copyright (c) 2015-2018 wimtecc, <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, merg...
/* srv.c - DNS SRV code * Copyright (C) 2003, 2009 Free Software Foundation, Inc. * * This file is part of GNUPG. * * GNUPG 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 Licens...
#include "ri_karatsuba.h" #include <assert.h> #include <string.h> #define RIKARATSUBA_ALIGNMENT 16 /* 2値のうちの最大を取る */ #define MAX(x,y) (((x) > (y)) ? (x) : (y)) /* nの倍数切り上げ */ #define ROUNDUP(val, n) ((((val) + ((n) - 1)) / (n)) * (n)) struct RIKaratsuba { float *coefficients; /* 畳み込み係数 */ uint32_t num_coeffi...
/* ppmtoleaf.c - read a portable pixmap and produce a ileaf img file * * Copyright (C) 1994 by <NAME>. * * Permission to use, copy, modify, and distribute this software and its * documentation for any purpose and without fee is hereby granted, provided * that the above copyright notice appear in all copies and th...
/** * Copyright (c) 2018, rectcircle. All rights reserved. * * @file test-lrucache.cpp * @author rectcircle * @date 2018-10-06 * @version 0.0.1 */ #include "simpledatabase.h" #include "test.h" #include <stdio.h> #include <unistd.h> //=========test All========= void *printDatabaseItem(struct Entry *entry, vo...
/* Copyright 2010-2013 SourceGear, LLC 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 applicable law or agreed to in writing, softwar...
/*- * Copyright (c) 1988 <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...