text
stringlengths
3.08k
10.5k
#include "wav.h" #include <stdlib.h> /* * Write a standard 44-byte PCM format RIFF/WAVE header to the beginning. Again, * the seek position will be left at the beginning of the data section, so one * can immediately begin writing samples. * * @param wav *Wav The wav context * */ void write_wav_hdr(Wav *wav) { ...
// Copyright (c) 2018, X Wrangler authors // // 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, pu...
#include <inc/lib.h> const char *msg = "This is the NEW message of the day!\n\n"; #define FVA ((struct Fd*)0xCCCCC000) static int xopen(const char *path, int mode) { extern union Fsipc fsipcbuf; envid_t fsenv; strcpy(fsipcbuf.open.req_path, path); fsipcbuf.open.req_omode = mode; fsenv = ipc_find_env(ENV_TYPE...
#include <u.h> #include <libc.h> #include <bio.h> #include <ctype.h> #include "ndb.h" #include "ndbhf.h" /* * Parse a data base entry. Entries may span multiple * lines. An entry starts on a left margin. All subsequent * lines must be indented by white space. An entry consists * of tuples of the forms: * ...
/* File: mpi_trap.c * * Purpose: Implement parallel trapezoidal rule allowing user input * of data * * Input: a, b, n * Output: Estimate of the area between x = a, x = b, x-axis, * and graph of f(x) using the trapezoidal rule and n * trapezoids. * * Compile: mpicc -g -Wall -o...
#include "arch/io.h" #include "drivers.h" #include "kernel.h" #include <stdio.h> uint32_t get_physaddr(uint32_t virtualaddr) { uint32_t pdindex = virtualaddr >> 22; uint32_t ptindex = virtualaddr >> 12 & 0x03FF; uint32_t *pd = (uint32_t *)0xFFFFF000; // Here you need to check whether the PD entry is ...
/* Lua CUTIL - a util library for Lua * * Copyright (c) 2016 chenweiqi * * The MIT License (MIT) * Permission is hereby granted, free of charge, to any person obtaining * a copy of this software and associated documentation files (the * "Software"), to deal in the Software without restriction, including * with...
#include <ctype.h> #include <stdlib.h> #include <signal.h> #include <sys/types.h> #include <sys/stat.h> #include <fcntl.h> #include "mpg123.h" int tabsel_123[2][3][16] = { { {0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,}, {0,32,48,56, 64, 80, 96,112,128,160,192,224,256,320,384,}, {0,32,40,48...
/* The MIT License (MIT) Copyright (c) 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, publis...
/** * \file * * \brief Unit tests for ADC2 driver. * * Copyright (c) 2013-2014 Atmel Corporation. All rights reserved. * * \asf_license_start * * \page License * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met:...
#include <stdio.h> #include <string.h> #include "shader.h" #include "shared.h" #include "output/shared/graphical.h" void xava_gl_module_shader_load( xava_gl_module_program *program, sgl_shader_type type, sgl_shader_stage stage, const char *name, XAVAGLModule *module, XA...
/* * cortex.c * * STM32 ARM Cortex management. * * Written & released by <NAME> <<EMAIL>> * * This is free and unencumbered software released into the public domain. * See the file COPYING for more details, or visit <http://unlicense.org>. */ struct extra_exception_frame { uint32_t r4, r5, r6, r7, r8,...
/*! * @file main.c * @brief Color13 Click example * * # Description * This application showcases ability of click board to read RGB and IR data * from device. Also it can be configured to read proximity data and * ALS data in lux units. * * The demo application is composed of two sections : * * ## Applicatio...
#define DEBUG_THIS_FILE DEBUG_SCHEDULER_FILE #include <string.h> #include <stdlib.h> #include <stdio.h> #include <stdint.h> #include <stdbool.h> #include "global.h" #include "debug.h" #include "scheduler.h" #define SCHEDULER_TIM TIM9 #define SCHEDULER_TIM_IRQn TIM1_BRK_TIM9_IRQn /*----------------------...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <assert.h> #include "./lcs.h" /* Compute the right and bottom boundaries of the rectangle with length x_len * by y_len, starting at x_index, y_index. * * Pre-condition: The top and left boundaries of this rectangle are already * computed. */ voi...
/* Copyright 2016, <NAME>. * All rights reserved. * * This file is part sAPI library for microcontrollers. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * 1. Redistributions of source code must retain the ab...
/* _LzwDecompress cseg 000007F4 0000017E _LzwBuffFill cseg 00000972 00000041 _LzwReadNext cseg 000009B3 0000004E _LzwBuffShift cseg 00000A01 00000030 */ #include "../agi.h" #include "../res/res.h" #include "../sys/endian.h" #...
#include "types.h" #include "stat.h" #include "user.h" #define PGSIZE 4096 #define LOOPLENGTH 16//MAX_PSYC_PAGES // policy tests #define PAGE_NUM(addr) ((uint)(addr) & ~0xFFF) #define TEST_POOL 500 #define ARR_SIZE 70000 static unsigned long int next = 1; int protect_page_test() { printf(1, "...
# include <omp.h> # include <math.h> # include <stdio.h> # include <stdlib.h> # define THREADS 8 void printa_matriz(size_t n, size_t m, double **mat) { for(size_t i = 0; i < n; i++) { for(size_t j = 0; j < m; j++) printf(" %lf\t", mat[i][j]); printf("\n"); } } // Média aritmétic...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <ctype.h> #include "table_generator.h" /* * Reads file generated by parser generator 'shitty_compiler_compiler.py' * and generates parse table for 'parser.c' */ char** rules; int* reduction_rules; int* n_pop_states; int** action_table; int n_state...
/************************************************************************* * $Id: event-rfpulse.c,v 1.8 2006/12/18 15:10:36 yougz Exp $ ************************************************************************** This software is governed by the CeCILL license under French law and abiding by the rules of distribu...
/***************************************************************************//** * @file main.c * @brief This example demonstrates the single direct register LDMA transfer. * See readme.txt for details. ******************************************************************************* * # License * <b>Copyright 2020...
#include <assert.h> #include <stdint.h> #include <stdio.h> #include <stdlib.h> #define TEN_MILLION 10000000u uint8_t match(const uint8_t *score_board, const uint64_t score_board_used_size, const uint8_t *match_list, const uint8_t match_list_size, const uint8_t score_len_diff) { uint8_t i; uint8_t score_at_i; if ...
#include <assert.h> #include "cglm/mat4.h" #include "smAttribute.h" #include "smCamera.h" #include "smCameraP.h" #include "smInput.h" #include "smShader.h" #include "smShaderProgram.h" #include "smText.h" #include "smUniform.h" #include "center.h" #include "scene.h" #include "math/smMath.h" typedef struct { scen...
#include "smalldoku-core-ui/smalldoku-core-graphics.h" #define RGB(r, g, b) (0xFF000000 | ((r & 0xFF) << 16) | ((g & 0xFF) << 8) | (b & 0xFF)) const static smalldoku_uint32_t SCALE = 80; const static smalldoku_uint32_t GRID_WIDTH = SCALE * SMALLDOKU_GRID_WIDTH; const static smalldoku_uint32_t GRID_HEIGHT = SCALE * SM...
/*********************************************************************************** Author: <NAME>. Description: Simple Matrix Date: 22/01/2021 ************************************************************************************/ #include <stdio.h> #include <stdlib.h> #define VET_BUFFER 10 #d...
#include "config.h" #include <stdio.h> #include "mp_msg.h" //----------------------- mp3 audio frame header parser ----------------------- static int tabsel_123[2][3][16] = { { {0,32,64,96,128,160,192,224,256,288,320,352,384,416,448,0}, {0,32,48,56, 64, 80, 96,112,128,160,192,224,256,320,384,0}, {0,32,4...
/* * Copyright (C) 2013 Red Hat * Author: <NAME> <<EMAIL>> * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 as published by * the Free Software Foundation. * * This program is distributed in the hope that it will be useful,...
/* * The MIT License (MIT) * * Copyright (c) 2017 <NAME> <<EMAIL>> * * Permission is hereby granted, free of charge, to any person obtaining a copy * of this software and associated documentation files (the "Software"), to deal * in the Software without restriction, including without limitation the rights * to ...
/* badlags_s.c =========== Author: R.J.Barnes & <NAME>, <NAME>, Original code <NAME> */ /* LICENSE AND DISCLAIMER Copyright (c) 2012 The Johns Hopkins University/Applied Physics Laboratory This file is part of the Radar Software Toolkit (RST). RST is free software: you can redistribute it an...
#ifdef CONFIG_HAS_CC3220SDK #include <kernel.h> #include <misc/printk.h> #include <ti/drivers/net/wifi/simplelink.h> #include <ti/drivers/net/wifi/bsd/sys/socket.h> #include <ti/drivers/net/wifi/bsd/netinet/in.h> #include <ti/drivers/net/wifi/bsd/arpa/inet.h> #define printf printk #define UART_PRINT printk #define perr...
#include <stdlib.h> #include <stdio.h> #include <string.h> #include <math.h> #include <sys/time.h> // #include <sys/resource.h> #include <unistd.h> #include <assert.h> #ifdef __MTA__ #include <sys/mta_task.h> #include <machine/runtime.h> #endif #include "globals.h" #include "defs.h" int main(int argc, char **argv) ...
// <NAME> - Septembre 2020 #include <stdio.h> // Utilisation de putchar et getchar SEULEMENT #include <string.h> // pour les macros de test #include "nombre_signe.h" // Macros de test des fonctions char tab[30]; // Macros de test des fonctions #define testEQ(ok,res) sprintf(tab,"%d",res); printString("E:"); prin...
#include <sys/types.h> #include <libspu.h> #include "engine/common.h" #include "engine/spu.h" // still faster to operate the voices using the registers // than to get through libspu's attribute bullshit #define SPU_VOICE_BASE ((volatile u16 *)(0x1F801C00)) #define SPU_KEY_ON_LO ((volatile u16 *)(0x1F801D88)) #define...
/* Copyright (c) 2004 The Regents of the University of Michigan. 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...
/******************************************************************************* * Copyright (c) 2018 IBM Corp. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * and Eclipse Distribution License v1.0 which accompany this d...
/* * Copyright (c) 2005-2021 Imperas Software Ltd., www.imperas.com * * 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 requir...
/* SPDX-License-Identifier: BSD-2-Clause */ /******************************************************************************* * Copyright 2017-2018, Fraunhofer SIT sponsored by Infineon Technologies AG * All rights reserved. *******************************************************************************/ #ifdef HAVE...
/** * Copyright (c) 2014-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: * 1. Redistributions of source code must retain the above copyright notice, * this list of conditio...
/* SPDX-License-Identifier: GPL-2.0 */ /* * BlueZ - Bluetooth protocol stack for Linux * * Copyright (C) 2021 Intel Corporation */ typedef int (*hci_cmd_sync_work_func_t)(struct hci_dev *hdev, void *data); typedef void (*hci_cmd_sync_work_destroy_t)(struct hci_dev *hdev, void *data, int err); struct hci_...
/* * Generated by asn1c-0.9.24 (http://lionet.info/asn1c) * From ASN.1 module "S1AP-IEs" * found in "S1AP-IEs.asn" */ #include "S1ap-PLMNidentity.h" int S1ap_PLMNidentity_constraint(asn_TYPE_descriptor_t *td, const void *sptr, asn_app_constraint_failed_f *ctfailcb, ...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <errno.h> #include <unistd.h> #include <net/if.h> #include <sys/time.h> #include "../ext/seqnum_cache.h" #include "../ext/uthash.h" #include "../log.h" #include "../utils.h" #include "../net.h" #include "../tun.h" #include "../unix.h" #include "../con...
// vi:nu:et:sts=4 ts=4 sw=4 /* * Generated 12/18/2019 08:00:17 */ // All code under test must be linked into the Unit Test bundle // Test Macros: // TINYTEST_ASSERT(condition) // TINYTEST_ASSERT_MSG(condition,msg) // TINYTEST_EQUAL(expected, actual) // TINYTEST_EQUAL_MSG(expecte...
#include <lib.h> const char *msg = "This is the NEW message of the day!\n\n"; #define FVA ((struct Fd *)0xCCCCC000) static int xopen(const char *path, int mode) { extern union Fsipc fsipcbuf; envid_t fs_env; strcpy(fsipcbuf.open.req_path, path); fsipcbuf.open.req_omode = mode; fs_env = ipc_find_env(ENV_TYPE_F...
/* Copyright (C) <2014> Intel Corporation * Copyright (C) <2014> <NAME> <<EMAIL>> * * Author: <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 ...
/* ** Copyright (C) 2014-2019 Cisco and/or its affiliates. All rights reserved. ** Copyright (C) 2005-2013 Sourcefire, Inc. ** ** 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. You m...
#include <stdlib.h> #include <sys/socket.h> #include <stdbool.h> #include "http_request.h" #include "string_util.h" #include "log.h" #include "configuration.h" #include "attrs_map.h" #include "mpart_body_processor.h" #include "net.h" #include "routing_engine.h" #include "../deps/multipart-parser-c/multipart_parser.h"...
#include "stdint.h" #include "vdp.h" #include "res_tset.h" extern volatile uint8_t vblank; static volatile uint16_t* const vdp_data_port = (uint16_t*) 0xC00000; static volatile uint16_t* const vdp_ctrl_port = (uint16_t*) 0xC00004; // 4 byte ctrl port (the extra 2 bytes are a mirror of first 2) static volatile uint32_...
#include <xc.h> #include "hw_i2c.h" #include "main.h" #include "hw_uart.h" #define PCF8583_WRITE_ADDRESS 0xA0 #define PCF8583_READ_ADDRESS 0xA1 // Registers #define PCF8583_CTRL_STATUS_REG 0x00 #define PCF8583_SECONDS_REG 0x02 #define PCF8583_MINUTES_REG 0x03 #define PCF8583_HOURS_REG ...
/* packet-symantec.c * Routines for dissection of packets from the Axent Raptor firewall/ * Symantec Enterprise Firewall/Symantec Gateway Security appliance * v2/Symantec Gateway Security appliance v3. * * Wireshark - Network traffic analyzer * By <NAME> <<EMAIL>> * * This program is free software; you can redi...
/* The VDRIVER - A Classic Video Game Engine By <NAME> and Divine Entertainment (1997-2000) Support: If you find problems with this code, send mail to: <EMAIL> For additional information and updates, see our website: http://www.divent.org Disclaimer: I could put things here that would make me soun...
#include "mpu6050.h" #define W_MPU6050_ADDRESS 0xD0 #define R_MPU6050_ADDRESS 0xD1 #define MPU6050_REG_WHOAMI 0x75 #define MPU6050_REG_SENSOR_DAT 0x3B #define PWR_MGMT_1 0x6B #define MPU6050_REG_USERC 0x6A #define MPU6050_REG_SMPRT 0x19 #define MPU6050_REG_CONFIG 0x1A #define MPU6050_REG_GY...
/*********************************************************************** Copyright (c) 2006-2011, Skype Limited. 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 retai...
/* $OpenBSD: ka660.c,v 1.1 2001/02/24 10:31:58 hugh Exp $ */ /* $NetBSD: ka660.c,v 1.3 2000/06/29 07:14:27 mrg Exp $ */ /* * Copyright (c) 2000 Ludd, University of Lule}, Sweden. * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided tha...
/* * The MIT License (MIT) * * Copyright (c) 2019 <NAME> (tinyusb.org) * * 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 ...
/* Created (MFS based): * February 2010 (<NAME>) */ #include "fs.h" #include "buf.h" #include "inode.h" #include "super.h" /*===========================================================================* * get_block * *===========================================================================*/ struc...
/* * Copyright (C) 2014 <NAME> et al. (see AUTHORS) * * This program 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 later version...
/******************************************************************************* Copyright (c) 2011, 2012 <NAME> <<EMAIL>> Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restricti...
/**************************************************************************//** * @file main.c * @version V3.00 * @brief * Show how to use I2C Signle byte API Read and Write data to Slave * Needs to work with I2C_Slave sample code. * * SPDX-License-Identifier: Apache-2.0 * @copyright (C...
/****************************************************************************** * * Copyright (C) 2018-2019 Xilinx, Inc. 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"), to deal * in the Softwar...
#include <auth.h> #include <fcall.h> enum { NFidHash = 503, }; typedef struct Con Con; typedef struct DirBuf DirBuf; typedef struct Excl Excl; typedef struct Fid Fid; typedef struct Fsys Fsys; typedef struct Msg Msg; #pragma incomplete DirBuf #pragma incomplete Excl #pragma incomplete Fsys struct Msg { uchar* dat...
/*- * See the file LICENSE for redistribution information. * * Copyright (c) 1996, 2016 Oracle and/or its affiliates. All rights reserved. * * $Id$ */ #include "db_config.h" #include "db_int.h" /* * __db_tablesize -- * Choose a size for the hash table. * * PUBLIC: u_int32_t __db_tablesize __P((u_int32_t))...
/** * @file main.c * SSL Socket Example * @author <NAME> * */ #include <stdio.h> #include <unistd.h> #include <string.h> #include <lib.h> #include <ril.h> #include <os_api.h> #include <network.h> #include <net/sockets.h> /** * Server IP */ #define SERVER_IP "tcpbin.com" /** * Server Port */ #define SERVER_...
/* Dump registers. Copyright (C) 1998-2015 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by <NAME> <<EMAIL>>, 1998. 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 b...
/* $NetBSD: cgfourteenreg.h,v 1.1 1996/09/30 22:41:02 abrown Exp $ */ /* * Copyright (c) 1996 * The President and Fellows of Harvard College. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met...
/* * This file is part of the GROMACS molecular simulation package. * * Copyright (c) 1991-2000, University of Groningen, The Netherlands. * Copyright (c) 2001-2004, The GROMACS development team. * Copyright (c) 2013,2014,2015,2016,2017 by the GROMACS development team. * Copyright (c) 2018,2019,2020, by the GROMA...
/** * Copyright (c) 2014 - 2017, Nordic Semiconductor ASA * * 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...
/* unity.c * * Relative error approximations for function arguments near * unity. * * log1p(x) = log(1+x) * expm1(x) = exp(x) - 1 * cosm1(x) = cos(x) - 1 * lgam1p(x) = lgam(1+x) * */ /* Scipy changes: * - 06-10-2016: added lgam1p */ #include ...
/* * Copyright (c) 2021 hpmicro * * SPDX-License-Identifier: BSD-3-Clause * */ #include "board.h" #include "hpm_debug_console.h" #include "hpm_spi_drv.h" typedef enum { spi_op_write = 0, spi_op_read, spi_op_no_data } spi_op_t; void spi_transfer_mode_print(spi_control_config_t *config) { uint8_t ...
#ifdef __ARM_NEON #include <arm_neon.h> #else #error("arm neon not supported") #endif /* Block sizes */ #define mc 256 #define kc 128 /* Create macros so that the matrices are stored in row-major order */ #define A(i,j) a[ (i)*lda + (j) ] #define B(i,j) b[ (i)*ldb + (j) ] #define C(i,j) c[ (i)*ldc + (...
/* Five degree accuracy, trig function verses lookup table. * * On linux, may require something like * CFLAGS="-std=c99 -lm -lrt -D_XOPEN_SOURCE -D_POSIX_C_SOURCE=199309" make five-degrees * * to compile (what is with all the defines and such complications?!). * Also, Mac OS X only in 10.12 got clock_gettime, o...
/** * @file tweakuriutil.c * @ingroup tweak-api * * @brief populate/filter/sort utilities for collections of tweak uris. * * @copyright 2018-2021 Cogent Embedded Inc. ALL RIGHTS RESERVED. * * This file is a part of Cogent Tweak Tool feature. * * It is subject to the license terms in the LICENSE file found in ...
/* $OpenBSD: db_watch.c,v 1.10 2010/11/27 19:59:11 miod Exp $ */ /* $NetBSD: db_watch.c,v 1.9 1996/03/30 22:30:12 christos Exp $ */ /* * Mach Operating System * Copyright (c) 1993,1992,1991,1990 Carnegie Mellon University * All Rights Reserved. * * Permission to use, copy, modify and distribute this software an...
#include "lib9.h" #include <libcrypt.h> static void encode(uchar*, ulong*, ulong); static void decode(ulong*, uchar*, ulong); static void sha1block(uchar *p, ulong len, SHAstate *s) { ulong a, b, c, d, e, tmp; uchar *end; ulong *wp, *wend; ulong w[80]; /* at this point, we have a multple of 64 bytes */ for(end...
// SPDX-License-Identifier: GPL-2.0 // Copyright (C) 2019 Arm Ltd. #include <linux/arm-smccc.h> #include <linux/kvm_host.h> #include <asm/kvm_emulate.h> #include <kvm/arm_hypercalls.h> #include <kvm/arm_psci.h> static void kvm_ptp_get_time(struct kvm_vcpu *vcpu, u64 *val) { struct system_time_snapshot systime_snap...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include <math.h> #include "tool.h" #include "parameter.h" /* Calculate Euclidean distance between each item of vecteur * @param vector of data Item, vector of neuron Item, size of vector */ float euclidean_distance(float * d_item, float * n_item, int size...
/* Unix SMB/Netbios implementation. Version 1.9. Security context tests Copyright (C) <NAME> 2000 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the Lice...
#include "ucg.h" #include <stdlib.h> #include <stdio.h> extern const ucg_fntpgm_uint8_t *ucg_font_array[]; extern char *ucg_font_name[]; void pic_gen_short_desc(const ucg_pgm_uint8_t *font, const char *fname) { char s[256]; ucg_t ucg; ucg_int_t dx; tga_init(1024,500); ucg_Init(&ucg, ucg_dev_tga, ucg_e...
/* * Vp9 invisible (alt-ref) frame to superframe merge bitstream filter * Copyright (c) 2016 <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 Foun...
/* * CDDL HEADER START * * The contents of this file are subject to the terms of the * Common Development and Distribution License, Version 1.0 only * (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 * o...
#include "fd_spi_flash.h" #include "fd_delay.h" #include <string.h> void fd_spi_flash_wake(fd_spim_device_t *device, uint32_t wake_delay_us) { uint8_t tx_bytes[] = {FD_SPI_FLASH_RELEASE_POWER_DOWN, 0, 0, 0}; uint8_t device_id; fd_spim_device_select(device); fd_spim_bus_sequence_txn_rxn(device->bus, t...
/* * sys-copyself.c * * Copyright(c) 2007-2020 <NAME> <<EMAIL>> * Official site: http://xboot.org * Mobile phone: +86-18665388956 * QQ: 8192542 * * 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 ...
#include <stdbool.h> #include <stdint.h> #include "nrf.h" #include "nrf_assert.h" #include "nrf_gpiote.h" #include "nrf_gpio.h" #include "nordic_common.h" #include "nrf.h" #include "nrf_delay.h" #include "app_error.h" #include "nrf51_bitfields.h" #include "ble.h" #include "ble_srv_common.h" #include "ble_a...
#include <stdio.h> #include <omp.h> #include <stdlib.h> #include <string.h> #include <time.h> void printMatrix(double** matrix, int n, FILE *fp) { if (fp != NULL) { for (int i = 0; i < n; i++) { for (int j = 0; j < n+1; j++) { fprintf(fp, "%f, ",matrix[i][j]); } ...
#include <stdio.h> #include <stdlib.h> #include <string.h> #include "rxvm.h" #include "vm.h" #define VM_TABLE_SIZE(size) ((size * 2) + (sizeof(int) * size * 2)) const int udiff = 'Z' - 'A'; static int ccs_match (uint8_t icase, char *ccs, char c) { while (*ccs) { if (char_match(icase, *ccs, c)) ...
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause) // Copyright (c) 2020 <NAME> // // Based on filelife(8) from BCC by <NAME> & <NAME>. // 20-Mar-2020 <NAME> Created this. #include <argp.h> #include <signal.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #include <unistd.h> #include <time.h> #incl...
/* * @file */ /****************************************************************************** * Copyright (c) Open Connectivity Foundation (OCF), AllJoyn Open Source * Project (AJOSP) Contributors and others. * * SPDX-License-Identifier: Apache-2.0 * * All rights reserved. This program and the acco...
// SPDX-License-Identifier: GPL-2.0 // Copyright (C) 2018 Hangzhou C-SKY Microsystems co.,ltd. #include <linux/init.h> #include <linux/mm.h> #include <linux/module.h> #include <linux/sched.h> #include <asm/mmu_context.h> #include <asm/pgtable.h> #include <asm/setup.h> #define CSKY_TLB_SIZE CONFIG_CPU_TLB_SIZE void ...
/*D*********************************************************** * Modul: DBI - database insert/update/delete * kopieren/bewegen von ganzen Arrangements * * Copyright: yafra.org, Basel, Switzerland * Autor: Administrator **************************************************************/ #include <mp...
/*************************************************************************** cchip.c This file contains routines to interface with the Taito Controller Chip (or "Command Chip") version 1. It's currently used by Superman and Mega Blast. [Further cchip emulation is in machine/rainbow.c, machine/volfied.c, dri...
#define _GNU_SOURCE #include <stdlib.h> #include <stdio.h> #include <sys/types.h> #include <unistd.h> #include <pthread.h> #include <syscall.h> #include <assert.h> #include <errno.h> #include <time.h> #define NUM_THREADS 2 #define MAX_THREADS 1 int chi_0 = 0, chi_1 = 0; int ties =0; int rnds = 0; //vars int cmd = ...
/*********************************************************************** Copyright (c) 2006-2012, Skype Limited. All rights reserved. Redistribution and use in source and binary forms, with or without modification, (subject to the limitations in the disclaimer below) are permitted provided that the following con...
/* $NetBSD: logutmp.c,v 1.12 2011/09/16 16:13:17 plunky Exp $ */ /* * Portions Copyright (c) 1988, 1993 * The Regents of the University of California. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions ...
/* This example code is placed in the public domain. */ #ifdef HAVE_CONFIG_H #include <config.h> #endif #include <stdio.h> #include <stdlib.h> #include <errno.h> #include <sys/types.h> #include <sys/socket.h> #include <arpa/inet.h> #include <netinet/in.h> #include <string.h> #include <unistd.h> #include <gnutls/gnutl...
/* * This file is part of the Frost distribution * (https://github.com/xainag/frost) * * Copyright (c) 2019 XAIN AG. * * 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://w...
/* * Copyright (c) 2002-2008 <NAME>, <NAME> * Copyright (c) 2002-2004 Atheros Communications, Inc. * * 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 copie...
/*========================================================================= cpicom files/filecontext.h FileContext is the entry point for all the Pico file handling functions. There are equivalents of many, but certainly not all, the standard POSIX functions. FileContext understands the idea of a number...
/* * Generic implementation of map collections for GGGGC * * Copyright (c) 2014, 2015 <NAME> * * 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 copies. *...
/* * EurekaPacker.c Copyright (C) 1997 Asle / ReDoX * * Converts MODs packed with Eureka packer back to ptk * * Modified in 2006,2007,2014 by <NAME> */ #include <string.h> #include <stdlib.h> #include "prowiz.h" static int depack_eu(HIO_HANDLE *in, FILE *out) { uint8 tmp[1080]; uint8 c1; int npat, smp_add...
#include<stdio.h> #include<stdlib.h> #include<string.h> // I think I used this in something for CreditShop. May have to rewrite. typedef struct iter { FILE* f; char* buf; int buflen; int bufcount; int prior_final; int xind; unsigned int flags; char delim; } iter; unsigned int _iter_MALLOC_BUF = 0x1; unsigne...