text stringlengths 3.08k 10.5k |
|---|
/*
The MIT License (MIT)
Copyright (c) 2016-2017 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, p... |
#pragma once
#include "type.h"
#include "constant.h"
/**
* Insert 0 to qubit_index-th bit of basis_index. basis_mask must be 1ULL << qubit_index.
*/
inline static ITYPE insert_zero_to_basis_index(ITYPE basis_index, ITYPE basis_mask, UINT qubit_index){
ITYPE temp_basis = (basis_index >> qubit_index) << (qubit_in... |
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/* tests/misc/test_getpw.c */
/*
* Copyright (C) 2012 by the Red Hat Inc.
* All rights reserved.
*
* Export of this software from the United States of America may
* require a specific license from the United States Government.
* It is the respons... |
/**
* 集合链表的结构
**/
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#define MAX 1000
struct ListNode {
int Index;
char *String;
struct ListNode *Next;
};
struct ListNodeRep {
int Length;
struct ListNode *Head;
struct ListN... |
/*
* Utilities for generating dual sine wave tones for telephony apps.
* using 2nd order recursion (SAU 10/92).
* Modified 5/97, 8/04 SAU (c) 1997, 2004 Sun Microsystems.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are... |
/*
************************************************************************************************
* Emulation of 74HC138 8 bit shift register with parallel output
*
* state: Totaly untested
*
* Copyright 2015 <NAME>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without ... |
/*
* ACPI driver for Topstar notebooks (hotkeys support only)
*
* Copyright (c) 2009 <NAME> <<EMAIL>>
*
* Implementation inspired by existing x86 platform drivers, in special
* asus/eepc/fujitsu-laptop, thanks to their authors
*
* This program is free software; you can redistribute it and/or modify
* it under ... |
#include <stdlib.h>
#include <string.h>
#include "rqst.h"
struct Request *parse_request(const char *raw) {
struct Request *req = NULL;
req = malloc(sizeof *req);
if (!req) {
return NULL;
}
memset(req, 0, sizeof *req);
// Method
size_t method_len = strcspn(raw, " ");
if (strnc... |
/*
* Copyright (C) 2015 Samsung Electronics, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* This program is distributed in the hope that it will b... |
//
// pagerank.c
// pagerank
//
// Created by HongningShangguan on 2018/1/23.
// Copyright © 2018 HongningShangguan. All rights reserved.
//
//#include "pagerank.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
typedef struct linkinfo{ //structure that store each url node
char number[10];
in... |
#pragma ident "$Id: search.c,v 1.3 2007/01/11 21:59:27 dechavez Exp $"
/*======================================================================
*
* Search diskloop for the index of the record with sequence number
* closest to some specific (or relative) value. It is up to the
* calling application to get a stat... |
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <cstreamgeo/cstreamgeo.h>
#include "test.h"
void create_from_list_test() {
size_t a_n = 3;
const stream_t* stream = stream_create_from_list(a_n, 1.0, 1.0, 2.0, 2.0, 3.0, 3.0);
assert_true(stream->data[0] = 1.0);
assert_true(stream->d... |
//======================================================
// device : MC96P1102(14, 8 pin)
// version : Ver1.0
// date : 2015-02-24
// compiler : Keil-C
//======================================================
#include <intrins.h>
#ifndef _MC96P1102_
#define _MC96P1102_
sfr P0 = 0x80; // P0 Data ... |
/* Copyright (c) 2002-2017 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "istream.h"
#include "mbox-storage.h"
#include "mbox-sync-private.h"
#include "mbox-file.h"
#include "istream-raw-mbox.h"
#include <sys/stat.h>
#include <utime.h>
#define MBOX_READ_BLOCK_SIZE IO_BLOCK_SIZE
int mbo... |
#include <stdio.h>
#include <ctype.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <stdbool.h>
#include <getopt.h>
#include <time.h>
#include "AwFmIndex.h"
uint8_t aminoLookup[20] = {'a','c','d','e','f',
'g','h','i','k','l',
'm','n... |
/* GStreamer Musepack decoder plugin
* Copyright (C) 2004 <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) ... |
/*
* Copyright (C) 2015 University of Oregon
*
* You may distribute under the terms of either the GNU General Public
* License or the Apache License, as specified in the LICENSE file.
*
* For more information, see the LICENSE file.
*/
/* --- Has anyone else already typedef these,check on other header files ---... |
/* diskmodel (version 1.0)
* Authors: <NAME>, <NAME>
* Contributors: <NAME>, <NAME>, <NAME>
*
* Copyright (c) of Carnegie Mellon University, 2001-2008.
*
* This software is being provided by the copyright holders under the
* following license. By obtaining, using and/or copying this
* software, you agree that ... |
/*
** create_db - takes a graph.csv and writes a condensed binary
** version called graph.db.
**
**/
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include <unistd.h>
#include "data.h"
#include "database.h"
#include "util.h"
#include "create_db.h"... |
#include "character.h"
#include <assert.h>
// Returns an initialized empty character.
Character init_chr() {
Character chr;
chr.empty = 1;
for (uint64_t i = 0; i < 4; i++) {
chr.bytes[i] = 0;
}
return chr;
}
// Checks the given byte has a continuation for UTF-8 handling.
uint8_t is_not_continued_byte... |
/*This is the chipset used in the LaserXT series model*/
#include "ibm.h"
#include "cpu.h"
#include "io.h"
#include "mem.h"
static int laserxt_emspage[4];
static int laserxt_emscontrol[4];
static mem_mapping_t laserxt_ems_mapping[4];
static int laserxt_ems_baseaddr_index = 0;
static uint8_t laserxt_turbo = 0... |
/*
* Copyright (c) 2017 MediaTek Inc.
* Author: <NAME> <<EMAIL>>
* Copyright (c) 2020-2022 <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 ... |
#define MINIAUDIO_IMPLEMENTATION
#include "../miniaudio.h"
#include "miniaudio_engine.h"
ma_node_graph g_nodeGraph;
ma_data_source_node g_dataSourceNode;
ma_splitter_node g_splitterNode;
ma_splitter_node g_loopNode; /* For testing loop detection. We're going to route one of these endpoints back to g_splitterNode to... |
#include <getopt.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mbedtls/ctr_drbg.h"
#include "mbedtls/debug.h"
#include "mbedtls/entropy.h"
#include "mbedtls/error.h"
#include "mbedtls/net_sockets.h"
#include "mbedtls/ssl.h"
#include "client.h"
int main(int argc, char **argv) {
/* Final re... |
/*ptp_suport interrupt file*/
#include "stm32f4xx_hal.h"
#include "stm32f4xx_hal_tim.h"
#include "stm32f4xx_hal_tim_ex.h"
#include "clock_interface.h"
#include "media_service.h"
#include "ptp_interrupt.h"
#include "stm32f4xx_nucleo_add_led.h"
#include "debug.h"
static void _Error_Handler();
/***... |
/*
* This code lifted from:
* Simple `echo' pseudo-device KLD
* <NAME>
* Converted to 5.X by Søren (Xride) Straarup
*/
/*
* /bin/echo "server,port=9999,addr=192.168.69.142,validate" > /dev/krping
* /bin/echo "client,port=9999,addr=192.168.69.142,validate" > /dev/krping
*/
#include <sys/cdefs.h>
__FBSDID("$... |
/*
* ============================================================================
* Copyright (c) 2011 Marvell International, Ltd. All Rights Reserved
*
* Marvell Confidential
* ============================================================================
*/
#include <stdint.h>
#include <... |
/*
* APIC support
*
* Copyright (c) 2004-2005 <NAME>
*
* This 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 of the License, or (at your option) any later version.
... |
/*
* Softuart
*
* Copyright (C) 2017 <NAME> <<EMAIL>>
* Copyright (C) 2016 <NAME> <<EMAIL>>
*
* This code is based on Softuart from here [1] and reworked to
* fit into esp-open-rtos.
*
* it fits my needs to read the GY-GPS6MV2 module with 9600 8n1
*
* Original Copyright:
* Copyright (c) 2015 plieningerweb
... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <lwmqtt/unix.h>
#define COMMAND_TIMEOUT 5000
#define MESSAGE_TIMEOUT 1000
lwmqtt_unix_network_t network = {0};
lwmqtt_unix_timer_t timer1, timer2, timer3;
lwmqtt_c... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <memory.h>
static inline uint32_t fourcc(const char *p) {
return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | p[3];
}
static inline uint16_t r16(uint8_t *p) {
uint16_t r = *p++;
r |= *p++ << 8;
return r;
}
static inline void w16(uint8_t *p, u... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* sprites.c :+: :+: :+: ... |
/*
FWPSynthesis.c .MEX file corresponding to FWPSynthesis.m
The calling syntax is:
sig = FWPSynthesis(wc,qmf)
<NAME>
Copyright (c) 1994 <NAME>
All Rights Reserved
*/
#include <math.h>
#include "mex.h"
#include "wavelab.h"
void wpsynthesis(double *sig,int nr,int Dee,
do... |
/* $NetBSD: rf_geniq.c,v 1.4 2001/11/13 07:11:14 lukem Exp $ */
/*
* Copyright (c) 1995 Carnegie-Mellon University.
* All rights reserved.
*
* Author: <NAME>
*
* Permission to use, copy, modify and distribute this software and
* its documentation is hereby granted, provided that both the copyright
* notice and ... |
#include <stdio.h>
#include <assert.h>
#include <string.h>
unsigned T, N, x;
char map_[100][100];
char pmap_[100][100];
char ds_[200];
char dd_[200];
char rows_[100];
char cols_[100];
#define map(i, j) map_[j][i]
#define pmap(i, j) pmap_[j][i]
#define ds(i, j) ds_[(i) + (j)]
#define dd(i, j) dd_[(N + (i)) - (j)]
#... |
#include "math.h"
#include <stdbool.h>
#include <stdio.h>
#include <ble_advdata.h>
#include <nordic_common.h>
#include <nrf_error.h>
#include <simple_adv.h>
#include <simple_ble.h>
#include <adc.h>
#include <ambient_light.h>
#include <button.h>
#include <gpio.h>
#include <humidity.h>
#include <led.h>
#include <nined... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "verse.h"
#include "enough.h"
#include "seduce.h"
#include "la_draw_overlay.h"
#define LO_PREVIEW_SIZE 512
typedef struct {
uint texture_id;
uint version;
float pos[3];
}LoPreviewTexture;
extern boolean draw_persuade_surface_queue_preview(ENode *no... |
/* Copyright 2015,2016,2018 IPB, Universite de Bordeaux, INRIA & CNRS
**
** This file is part of the Scotch software package for static mapping,
** graph partitioning and sparse matrix ordering.
**
** This software is governed by the CeCILL-C license under French law
** and abiding by the rules of distribution of free ... |
/*
main.c
Copyright © 2009 <NAME>
This file is part of LWLINK.
LWLINK 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 License, or (at your option) any later
version.
This program is dist... |
#include "main.h"
#include "upgrade/dfu.h"
#include "usb_config.h"
#include <cdcacm.h>
#include <usb.h>
#include <usb_dfu.h>
typedef struct __attribute__((packed)) {
usb_configuration_descriptor_t config;
cdcacm_descriptors_t acm;
usb_interface_descriptor_t dfu_interface;
usb_dfu_functional_descriptor_t dfu_functi... |
#include "vn.h"
#include "sb.h"
#include "vn.h"
#include "de.h"
#include <errno.h>
#include <malloc.h>
#include <numtools.h>
#include <h4/file/api.h>
#include "error.h"
#include <bug.h>
//#include <printk.h>//
// TODO: check http://blog.chinaunix.net/uid-23141914-id-211775.html for more
// details about FAT cluster cac... |
#include<stdio.h>
#include<string.h>
#include<stdlib.h>
#include<stdbool.h>
struct node{
char name[20];
int marks;
struct node *next_node_by_marks;
struct node *next_node_by_names;
};
int debug=0;
struct node *head_by_marks;
struct node *head_by_names;
int display(struct node *temp, bool by_marks);
int insert... |
/* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not... |
/* dir2dasd.c - Convert a list of files into a DASD
*/
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include <string.h>
#include <pthread.h>
#include <assert.h>
/** @todo Account VTOC for optimal disk usage (without wasting so many tracks) */
#define NUM_VTOC_TRACKS 350
#define MAX_TRACKS 16695
#def... |
// Copyright (c) 2013, 2014 HashFast Technologies LLC
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include "libusb.h"
#include "hf_protocol.h"
#include "hf_factory.h"
#include "hfpa... |
/*
* Copyright (c) 2017 Rockchip, Inc. All Rights Reserved.
*
* 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... |
// Options: --no-argc --no-arrays --no-bitfields --checksum --concise --no-consts --no-float --no-inline-function --max-array-dim 3 --max-array-len-per-dim 10 --max-block-depth 5 --max-block-size 4 --max-expr-complexity 2 --max-funcs 1 --max-pointer-depth 2 --no-pointers --no-structs --no-unions --no-volatiles --no-b... |
/*================================================================
* Copyright: 2020 <NAME>
* uniforms_buffers
Press `esc` to exit the application.
================================================================*/
#define GS_IMPL
#include <gs/gs.h>
#include "data.c"
gs_command_buffer_t ... |
#include "image.h"
#include "texture_loader.h"
#include "png_reader.h"
#include "jpeg_reader.h"
#include "opengl_utilities.h"
#include "paths.h"
#include <assert.h>
#include "log.h"
#define INVALID_TEXTURE ((GLuint)0)
static size_t bytes_per_pixel_for_gl_format(GLenum format);
image_t* image_with_bytes(void* bytes, ... |
#include <stdio.h>
#include <stdlib.h>
#include <data_uart.h>
#include <os_msg.h>
#include <trace_app.h>
#include <app_msg.h>
#include "serial_api.h"
#include "bt_board.h"
#if defined(CONFIG_PLATFORM_8710C)
#include "platform_opts_bt.h"
#endif
#ifdef CONFIG_BT_USER_COMMAND
#define USE_DEDICATED_BT_DATA_UART CONFIG_... |
/* (C) Copyright 2012, 2013 <NAME>
*
* This file is part of MCL. You can redistribute and/or modify MCL under the
* terms of the GNU General Public License; either version 3 of the License or
* (at your option) any later version. You should have received a copy of the
* GPL along with MCL, in the file COPYING.... |
/*
* This file tests that message truncation errors are properly detected and
* handled (in particular, that data is NOT overwritten).
*/
#include <stdio.h>
#include "mpid.h"
/* Define this global symbol */
MPI_Comm MPI_COMM_WORLD;
void fence( comm, partner )
MPI_Comm comm;
int partner;
{
MPIR_RHANDLE rh... |
/*
* foo-tools, a collection of utilities for glftpd users.
* Copyright (C) 2003 Tanesha FTPD Project, www.tanesha.net
*
* This file is part of foo-tools.
*
* foo-tools 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 Soft... |
/*
* Copyright (c) 2021, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdint.h>
#include <stdbool.h>
#include <common/debug.h>
#include <common/runtime_svc.h>
#include <drivers/arm/ethosn.h>
#include <drivers/delay_timer.h>
#include <lib/mmio.h>
#include <plat/arm/commo... |
/* Copyright (c) 2012-2018 <NAME>.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, ... |
#include "z3D/z3D.h"
#include "settings.h"
#include "item_override.h"
#include "item_table.h"
typedef enum {
SHOP_BAZAAR,
SHOP_KOKIRI,
SHOP_GORON,
SHOP_ZORA,
SHOP_KAKARIKO_POTION,
SHOP_MARKET_POTION,
SHOP_BOMBCHU,
SHOP_HAPPY_MASK,
} Shops;
#define SHOP_MARKET_BAZAAR SHOP_BAZAAR
#define... |
/*! \brief simple implement of hash algorithm
* \author <NAME>
* \date 2018-04-14
* \email <EMAIL>
* */
#include <assert.h>
#include <stdint.h>
#include <stddef.h>
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "hash.h"
/*! \brief map characters to one integer
* \param str c-string
* ... |
/*
* Copyright (C) 2019-2020 Alibaba Group Holding Limited
*/
#include <pwm_test.h>
static volatile uint32_t period_time[10] = {0}, high_level_time[10] = {0};
static volatile uint8_t counter = 0;
static volatile uint8_t lock = 0;
static void gpio_callback(csi_gpio_t *gpio, uint32_t pins, void *arg)
{
lock = 0;... |
/*
* Copyright (c) 2006-2018, RT-Thread Development Team
*
* SPDX-License-Identifier: Apache-2.0
*
* Change Logs:
* Date Author Notes
* 2018-08-25 armink the first version
*/
#include <yoc_config.h>
#include "ulog_telnet.h"
#include "ulog.h"
#include <aos/aos.h>
#include <sys/types.h>... |
// SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
/*
* Copyright 2019 Amazon.com, Inc. or its affiliates. All rights reserved.
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include <unistd.h>
#include <util/util.h>
#include "efa.h"
#include "verbs.h"
static void efa_free_c... |
#ifndef NAME
#error "Must define table name in symbol `NAME`"
#endif
/*
* NAME - prefix for table
* KEY - key type
* VALUE - value type
* HASH - hash function of form `size_t HASH(KEY key)`
* KEYEQ - key comparison function of form `int KEYEQ(KEY k1, KEY k2)`,
* returning 0 if k1 == k2.
*/
#ifndef K... |
/*
* Reading the ST-NICCC megademo data stored in
* the SDCard and streaming it to polygons,
* rendered on the OLED display using femtoGL.
*
* femtosoc options (femtosoc.v):
* OLED display (NRV_IO_SSD1351)
* SDCard (NRV_IO_SPI_SDCARD)
*
* The polygon stream is a 640K file (DATA/scene1.bin),
* tha... |
/*
* Squashfs - a compressed read only filesystem for Linux
*
* Copyright (c) 2002, 2003, 2004, 2005, 2006, 2007, 2008
* <NAME> <<EMAIL>>
*
* 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... |
/*************************************************************************************************/
/*!
* \file
*
* \brief Main file for Light application.
*
* Copyright (c) 2010-2019 Arm Ltd.
*
* Copyright (c) 2019 Packetcraft, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* ... |
/**************************************************************************************************
Phyplus Microelectronics Limited confidential and proprietary.
All rights reserved.
IMPORTANT: All rights of this software belong to Phyplus Microelectronics
Limited ("Phyplus"). Your use of this Software is... |
/*
* utl_circular_buf.c
*
* Created on: Jul 10, 2020
* Author: s1ckret
*/
#include <string.h>
#include "utl/utl_circular_buf.h"
static void _circular_buf_advance_pointer(utl_circular_buf_handle cbuf);
static void _circular_buf_advance_pointer_by_n(utl_circular_buf_handle cbuf, uint32_t n);
static void _ci... |
/**
******************************************************************************
* File Name : main.c
* Description : Main program body
******************************************************************************
*
* COPYRIGHT(c) 2016 STMicroelectronics
*
* Redistribution and use in source a... |
/*
* STMicroelectronics accelerometers driver
*
* Copyright 2012-2013 STMicroelectronics Inc.
*
* <NAME> <<EMAIL>>
*
* Licensed under the GPL-2.
*/
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <linux/acpi.h>
#include <linux/i2c.h>
#include <linux/iio/iio.h>
#include <lin... |
/* Copyright (c) 2013, The Linux Foundation. All rights reserved.
* Copyright (c) 2015, Sony Mobile Communications 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 and
* only version 2 as published by the Free Software Fo... |
/* mequ.f -- translated by f2c (version 19980913).
You must link the resulting object file with the libraries:
-lf2c -lm (in that order)
*/
#include "f2c.h"
/* Table of constant values */
static integer c__9 = 9;
/* $Procedure MEQU ( Matrix equal to another, 3x3 ) */
/* Subroutine */ int mequ_(doublereal *m1,... |
/**
* VampirTrace
* http://www.tu-dresden.de/zih/vampirtrace
*
* Copyright (c) 2005-2013, ZIH, TU Dresden, Federal Republic of Germany
*
* Copyright (c) 1998-2005, Forschungszentrum Juelich, Juelich Supercomputing
* Centre, Federal Republic of Germany
*
* See the file COPYING in the pa... |
/*
* Copyright (c) 2016, ARM Limited and Contributors. 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 o... |
/*------------------------------------------------------------------------
* disk_info.c
* System disk information
*
* Copyright (c) 2020, EnterpriseDB Corporation. All Rights Reserved.
*
*------------------------------------------------------------------------
*/
#include "postgres.h"
#include "sy... |
/* sun.c - Read SUN style partition tables. */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 2002,2005,2006,2007 Free Software Foundation, Inc.
*
* GRUB 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 Softwa... |
/*
Apply various randomness tests to a stream of bytes
by <NAME> -- September 1996
http://www.fourmilab.ch/
*/
#include <math.h>
#define FALSE 0
#define TRUE 1
#define log2of10 3.32192809488736234787
static int binary = FALSE; /* Treat input as a bitstream */
static long ccoun... |
/*
* Phoenix-RTOS
*
* cdc demo - Example of using: USB Communication Device Class
*
* Copyright 2019, 2021 Phoenix Systems
* Author: <NAME>, <NAME>
*
* This file is part of Phoenix-RTOS.
*
* %LICENSE%
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <unistd.h>
#inclu... |
/*
showimage: A test application for the SDL image loading library.
Copyright (C) 1997-2022 <NAME> <<EMAIL>>
This software is provided 'as-is', without any express or implied
warranty. In no event will the authors be held liable for any damages
arising from the use of this software.
Permission is grante... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
/**
* @file frd.h
* @brief Friend Services
*/
#pragma once
#include <3ds.h>
#define FRIENDS_SCREEN_NAME_SIZE 0x16 // 11 (0x16 because UTF-16)
#define FRIENDS_COMMENT_SIZE 0x22 // 16 (0x21 because UTF-16 + null character)
#define FRIEND_LIST_SIZE 0x64 // 100 (Number of Friends)
#define FRIEND_MII_... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* License); you ma... |
#include <ui.h>
#define FPF_IMPLEMENTATION
#include <five_pixel_font.h>
static uint8_t ftex[FPF_TEXTURE_WIDTH * FPF_TEXTURE_HEIGHT];
GLuint tex;
void ui_string(float x, float y, float scale, char* str)
{
size_t i = 0;
float rx = x;
float ry = y;
while (str[i] != 0)
{
char c = str[i];
if (c > '~') { c = ' ... |
/* Copyright (C) 2009-2020 Free Software Foundation, Inc.
This file is part of GDB.
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 License, or
(at your option... |
#include "display.h"
#include <assert.h>
#include <math.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "vecmat.h"
#define VIEW_WIDTH_SLOPE 1.5
#define VIEW_HEIGHT_SLOPE (VIEW_WIDTH_SLOPE * DISPLAY_HEIGHT / DISPLAY_WIDTH)
struct Point2D {
double x; // pixels, 0 means le... |
/*
* linux/kernel/irq/handle.c
*
* Copyright (C) 1992, 1998-2006 <NAME>, <NAME>
* Copyright (C) 2005-2006, <NAME>, <NAME>
*
* This file contains the core interrupt handling code.
*
* Detailed information is available in Documentation/DocBook/genericirq
*
*/
#include <linux/irq.h>
#include <linux/random.h>
#i... |
#include "ngx_stream_mruby_core.h"
#include "ngx_stream_mruby_module.h"
#include "ngx_stream_mruby_async.h"
#include <mruby/array.h>
#include <mruby/error.h>
#include <mruby/irep.h>
#include <mruby/opcode.h>
#include <mruby/proc.h>
#include <mruby/data.h>
#include <mruby/string.h>
#include <mruby/hash.h>
#include <mru... |
/*
XXXXXXXXXXXXXX XXXXX XXXXX XXXXXXXXXXXXX XXXXXXXXXXXXX
XXXXXXXXXXXXXXX XXXXX XXXXX XXXXXXXXXXXXXX XXXXXXXXXXXXXX
XXXXXXXXXXXXXXX XXXXX XXXXX XXXXXXXXXXXXX XXXXXXXXXXXXX
XXXX XXXX XXXXX XXXXX XXXXX XXXXX
XXXX XXXX XXXXX XXXXX XXXXX ... |
/*
* File: xsftp-client.c
* Author: nigra
*
* Created on September 23, 2017, 8:53 AM
*
* Client program for Extremely Simple FTP (xsftp) Arduino/Teensy server library
*/
/*
* Base code: miniterm.c
* Author: <NAME> (<EMAIL>)
* Source: ftp://ftp.er.anl.gov/pub/outgoing/REDHAT/miniterm.c
*/
/*
* AUTHOR:... |
/* @(#)rpc_util.h 1.2 87/11/24 3.9 RPCSRC */
/*
* Sun RPC is a product of Sun Microsystems, Inc. and is provided for
* unrestricted use provided that this legend is included on all tape
* media and as a part of the software program in whole or part. Users
* may copy or modify Sun RPC without charge, but are not au... |
/*
* This software was written by <NAME> jfoug AT cox dot net
* in 2009. No copyright is claimed, and the software is hereby
* placed in the public domain. In case this attempt to disclaim
* copyright and place the software in the public domain is deemed
* null and void, then the software is Copyright (c) 2009 <NA... |
/* $OpenBSD: btms.c,v 1.6 2011/03/04 23:57:52 kettenis Exp $ */
/* $NetBSD: btms.c,v 1.8 2008/09/09 03:54:56 cube Exp $ */
/*
* Copyright (c) 1998 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by <NAME> (<EMAIL>) at
* Carlstedt Re... |
/*
* Copyright 1998-2002 by <NAME>; all rights resered.
* This file may be used subject to the terms and conditions of the
* GNU Library General Public License Version 2, or any later version
* at your option, as published by the Free Software Foundation.
* This program is distributed in the hope that i... |
#include <gtk/gtk.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
char currentPlayer = 'X';
GtkWidget **square_buttons;
GtkWidget *label;
GtkWidget *reset_button;
int gameOver = 0;
int moveCount = 0;
static void set_win() {
char buf[8];
sprintf(buf, "%c Wins!", currentPlayer);
gtk_label_set_text(G... |
/* Shared library add-on to iptables for ECN matching
*
* (C) 2002 by <NAME> <<EMAIL>>
*
* This program is distributed under the terms of GNU GPL v2, 1991
*
* libipt_ecn.c borrowed heavily from libipt_dscp.c
*
*/
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <getopt.h>
#include <xtables.h>... |
#include "sc25519.h"
/*Arithmetic modulo the group order n = 2^252 + 27742317777372353535851937790883648493 = 7237005577332262213973186563042994240857116359379907606001950938285454250989 */
static const crypto_uint32 m[32] = {0xED, 0xD3, 0xF5, 0x5C, 0x1A, 0x63, 0x12, 0x58, 0xD6, 0x9C, 0xF7, 0xA2, 0xDE, 0xF9, 0xDE, 0... |
/*****************************************************************
Xmame glide driver
Written based on the x11 driver by <NAME> - <EMAIL>
http://www.ling.ed.ac.uk/~oliphant/glmame
This code may be used and distributed under the terms of the
Mame license
*************************************************... |
// SPDX-License-Identifier: MIT
#if defined(_WIN32)
#pragma warning(disable : 4244 4293)
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <oqs/oqs.h>
#if OQS_USE_PTHREADS_IN_TESTS
#include <pthread.h>
#endif
#include "system_info.c"
static OQS_STATUS sig_test_correctness(const char *meth... |
/*
* %CopyrightBegin%
*
* Copyright Ericsson AB 1998-2013. All Rights Reserved.
*
* The contents of this file are subject to the Erlang Public License,
* Version 1.1, (the "License"); you may not use this file except in
* compliance with the License. You should have received a copy of the
* Erlang Public Lice... |
/*
Original Code by <NAME> for M1 Apple Silicon
Modified by SRD0009 | @h02332 | <NAME> to run on iPhone 11 and iOS 14.3 or greater
OPEN SOURCE - PUBLIC DOMAIN
This Code HANGS at -> can_read when reading the PTR. What is the correct address?
*/
#define _XOPEN_SOURCE
#include <signal.h>
#include <stdbool.h>
#include ... |
/*
Copyright (c) 2017, Plume Design 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... |
/* ---------------------------------------------------------------------
EXERCISE 1.20
------------------------------------------------------------------------
Modify Program 1.3 to use the height of the trees (longest path from
any node to the root), instead of the weight, to decide wheth... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.