text stringlengths 3.08k 10.5k |
|---|
/*
* phant.h Include file for Phantasia
*/
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <setjmp.h>
#include <curses.h>
#include <time.h>
#include <pwd.h>
#include <signal.h>
#include <math.h>
/* ring constants */
#define NONE 0
#define NAZBAD 1
#define NAZREG 2
#define DLREG 3
#define DLBAD 4... |
/*
Author: <NAME>
Version: 1.0
*/
#include <stdio.h>
#include <stdlib.h>
#include <time.h>
#include <SDL2/SDL.h>
#define WIDTH 800
#define HEIGHT 600
#define TILE 20
enum direction { UP, DOWN, LEFT, RIGHT };
struct body {
SDL_Rect *part;
struct body *rest;
};
void clear_screen(SDL_Renderer *r);
SDL_Re... |
#include <3ds.h>
#include <citro3d.h>
#include <string.h>
#include "program_shbin.h"
#include "texture_bin.h"
#define CLEAR_COLOR 0x68B0D8FF
#define DISPLAY_TRANSFER_FLAGS \
(GX_TRANSFER_FLIP_VERT(0) | GX_TRANSFER_OUT_TILED(0) | GX_TRANSFER_RAW_COPY(0) | \
GX_TRANSFER_IN_FORMAT(GX_TRANSFER_FMT_RGBA8) | GX_TRANSFER_... |
/*
* Copyright 2016 MongoDB, Inc.
*
* 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 ... |
#include <sys/un.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <stdbool.h>
#include <unistd.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <netinet/in.h>
#include <sgx_urts.h>
#include <sgx_quote.h>
#include <enclave-tls/api.h>
#include "tls-server.h"
#define ENC... |
//
// Simulation program
//
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
// Parameters (p.1034)
#define N 1000 // # of neurons
#define T 1000 // # of time steps
#define Pr 0.1 // connection probability
#define tau 100.0 // temporal integration constant
#define kappa 5.0 // strength of recurrent inhib... |
/*
* The MIT License (MIT)
*
* Copyright (c) 2020 <NAME> (tinyusb.org)
* Copyright (c) 2020 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including wi... |
/*
* ImgTec IR Decoder setup for Sony (SIRC) protocol.
*
* Copyright 2012-2014 Imagination Technologies Ltd.
*
* 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... |
/*
* Copyright (c) 2018-2019, Arm Limited. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
#include "sst_flash_fs_dblock.h"
#include "secure_fw/services/secure_storage/sst_utils.h"
#include "secure_fw/services/secure_storage/flash/sst_flash.h"
/**
* \brief Converts logical data block number... |
/*
Unix SMB/CIFS implementation.
Winbind authentication mechnism
Copyright (C) <NAME> 2000
Copyright (C) <NAME> 2001 - 2002
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; ... |
/******************************************************************************
*
* This file is provided under a dual BSD/GPLv2 license. When using or
* redistributing this file, you may do so under either license.
*
* GPL LICENSE SUMMARY
*
* Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved.
*
... |
/* config.h. Generated from config.h.in by configure. */
/* config.h.in. Generated from configure.ac by autoheader. */
/* Define if building universal (internal helper macro) */
/* #undef AC_APPLE_UNIVERSAL_BUILD */
/* Official build number as a VERSION suffix string, e.g. "+build123", or ""
if this is not an ... |
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
//
// Fake Address Sanitizer run-time support.
// Enough for programs to link and run, but will not find any errors.
// Also, linking this to shared li... |
/*
* Copyright (C) 2008 Nokia Corporation and/or its subsidiary(-ies)
*
* This is part of HarfBuzz, an OpenType Layout engine library.
*
* Permission is hereby granted, without written agreement and without
* license or royalty fees, to use, copy, modify, and distribute this
* software and its documentation for ... |
/*
* Copyright (c) 2009, <NAME>, Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditio... |
#define NULL ((void*)0)
typedef unsigned long size_t; // Customize by platform.
typedef long intptr_t; typedef unsigned long uintptr_t;
typedef long scalar_t__; // Either arithmetic or pointer type.
/* By default, we understand bool (as a convenience). */
typedef int bool;
#define false 0
#define true 1
/* Forward d... |
/**********************************************************************
Copyright(c) 2011-2015 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:
* Redistributions of source c... |
/*
* Copyright (c) 2013-2014 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and 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.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR ... |
/*
* Copyright 2018-2021 Redis Labs Ltd. and Contributors
*
* This file is available under the Redis Labs Source Available License Agreement
*/
#include "filter_iterator.h"
#include "abstract_iterator.h"
#include "series_iterator.h"
static bool check_sample_value(Sample sample, FilterByValueArgs byValueArgs) {
... |
/**
******************************************************************************
* File Name : LTDC.c
* Description : This file provides code for the configuration
* of the LTDC instances.
******************************************************************************
*... |
#include <stdio.h>
const int WIDTH = 15;
const int HEIGHT = 15;
// Be sure its WIDTH * HEIGHT
char map[225];
const int MAXLENGTH = 30;
// Be sure its MAXLENGTH
int player[30];
int length;
// Whether a price is on the field or not
int pricespawned = 0;
int turn = 0;
int score = 0;
int modulo(int a, int b) {
while(... |
/*
* Copyright (c) 2019 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <stdio.h>
#include <zephyr.h>
#include <device.h>
#include <init.h>
#include <power/power.h>
#include <hal/nrf_gpio.h>
//#include <hal/nrf_gpio.h>
#include <drivers/gpio.h>
#include <sys/printk.h>
#include <inttype... |
// SPDX-License-Identifier: GPL-2.0+
/*
* comedi/drivers/adl_pci8164.c
*
* Hardware comedi driver for PCI-8164 Adlink card
* Copyright (C) 2004 <NAME> <<EMAIL>>
*/
/*
* Driver: adl_pci8164
* Description: Driver for the Adlink PCI-8164 4 Axes Motion Control board
* Devices: [ADLink] PCI-8164 (adl_pci8164)
* Au... |
/* Copyright 2018, <NAME> - <NAME>
* All rights reserved.
*
* This file is part of CIAA Firmware.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyr... |
/*
* Copyright 2016-2019 <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 agre... |
/* Name: <NAME>
Username: ndreitz
CUID: C15564443
Class: ECE 4730
Professor: Walt Ligon
Semester: Fall2020
Filename: floyd-parallel.c
Purpose: Reads a graph file, computes Floyd's shortest
pairs, writes resulting shortest path graph, to be
stored in the same format.
u... |
/* Extended Module Player
* Copyright (C) 1996-2016 <NAME> and <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... |
void print_surface_capabilities(struct vk_swapchain *swapchain)
{
const char *transforms[] = {
"IDENTITY",
"ROTATE_90",
"ROTATE_180",
"ROTATE_270",
"HORIZONTAL_MIRROR",
"HORIZONTAL_MIRROR_ROTATE_90",
"HORIZONTAL_MIRROR_ROTATE_180",
"HORIZONTAL_MIRROR_ROTATE_270",
"INHERIT",
};
... |
/* 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... |
/***************************************************************************
* Nipper - The network infrastructure parser *
* Copyright (C) 2006 - 2008 by <NAME> *
* <EMAIL> *
* ... |
/* written by <NAME> */
#include "storage.h"
char subject_names[SUBJECT_NUM][TEXT_LENGTH] = {
"Math", "English", "Chinese", "Physics"
};
/* the size of memory required for each student */
static const size_t UNIT_SIZE = sizeof(s_stu);
int stu_num = 0;
s_stu *head = NULL;
s_stu *create_stu(void)
{
s_stu *tmp;
... |
/*************************************************************************************
* qTESLA: an efficient post-quantum signature scheme based on the R-LWE problem
*
* Abstract: NTT, modular reduction and polynomial functions
**************************************************************************************/... |
/*
nuts_bolts.c - Shared functions
Part of Grbl
Copyright (c) 2017-2018 <NAME>
Copyright (c) 2011-2016 <NAME> for Gnea Research LLC
Copyright (c) 2009-2011 <NAME>
Grbl 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 ... |
/* ======================================================================
* File : uniSlefe.c
* Purpose : To compute the upper/lower bounds for any given
* univariate function
*
* Author(s): <NAME> (<EMAIL>)
* Date : 11/04/2002
* =============================================================... |
/* Copyright 2017 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*
* Placeholder values for temporary battery pack.
*/
#include "battery.h"
#include "battery_smart.h"
#include "charge_state.h"
#include "console.h"... |
/* ic -- icon change v1.0
* this module can change the icons of executable files */
// includes
#include <stdio.h>
#include <windows.h>
#include <string.h>
// structs and typedefs
typedef struct
{
BYTE bWidth; // Width, in pixels, of the image
BYTE bHeight; // Heigh... |
// SPDX-License-Identifier: BSD-2-Clause
/*
* Copyright 2017 NXP
*
* <NAME> <<EMAIL>>
*
* 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) Freescale Semiconductor, Inc. 2006-2007
*
* Author: <NAME> <<EMAIL>>
*
* See file CREDITS for list of people who contributed to this
* project.
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by t... |
/*
* Copyright (c) 2016 <NAME>
* <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 use, copy, modify,... |
/*
* Copyright 2015-2017, Intel Corporation
*
* 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 conditions and ... |
/*
* OpenSplice DDS
*
* This software and documentation are Copyright 2006 to TO_YEAR PrismTech
* Limited, its affiliated companies and licensors. All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in complia... |
/*
* Program to control ICOM radios
*
* This is a ripoff of the utility routines in the ICOM software
* distribution. The only function provided is to load the radio
* frequency. All other parameters must be manually set before use.
*/
#include <config.h>
#include <ntp_stdlib.h>
#include <ntp_tty.h>
#include <l_s... |
/**
* Hints test suite
*/
#include <stdio.h>
#include "SDL.h"
#include "SDL_test.h"
const int _numHintsEnum = 25;
char* _HintsEnum[] =
{
SDL_HINT_ACCELEROMETER_AS_JOYSTICK,
SDL_HINT_FRAMEBUFFER_ACCELERATION,
SDL_HINT_GAMECONTROLLERCONFIG,
SDL_HINT_GRAB_KEYBOARD,
SDL_HINT_IDLE_TIMER_DISABLED,... |
/**
* The CC0 1.0 Universal is applied to this work.
*
* To the extent possible under law, <NAME> and <NAME> have
* waived all copyright and related or neighboring rights to donky.
* This work is published from the United States.
*
* Please see the copy of the CC0 included with this program for complete
* infor... |
#include <stdio.h>
#include <math.h>
#include <sys/types.h>
#include <time.h>
#include <complex.h>
#include <gsl/gsl_rng.h>
#include <gsl/gsl_randist.h>
#include <gsl/gsl_cdf.h>
#include <gsl/gsl_sf_gamma.h>
#define FALSE 0
#define TRUE 1
#ifndef M_PI
#define M_PI 3.141592653589793238462643383280 /*... |
#include "bitboard.h"
#include "move.h"
#include "move_generation.h"
#include "transposition.h"
// Initialize board struct to create an empty board
void init_board(Board *board) {
State state = {NO_PIECE, 15, NO_SQUARE, 0};
memset(board->state, 0, sizeof(board->state));
memset(board->pieces, 0, sizeof(boa... |
/*
* Program to find discrete logarithms of user identities
* using Pollard's rho method.
*
* Suitable trap-door primes are generated by "genprime" program
*
* See "Non-Interactive Public-Key Cryptography"
* by <NAME> & <NAME>. Proc Eurocrypt '91
*
*/
#include <stdio.h>
#include <string.h>
#include ... |
/*
* Copyright (c) Bull S.A. 2007 All Rights Reserved.
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of version 2 of the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it would be useful, but
* ... |
/*
* Copyright (c) 1999 Global Technology Associates, 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... |
#pragma config(Hubs, S1, HTMotor, HTMotor, HTServo, HTMotor)
#pragma config(Sensor, S1, , sensorI2CMuxController)
#pragma config(Sensor, S2, gyro, sensorI2CHiTechnicGyro)
#pragma config(Sensor, S3, IRSeeker, sensorHiTechnicIRSeeker1200)
#pragma config(Motor, mtr_S1_C1_1, rightMotor, tmotorTetrix, openLoop)
#pragma conf... |
/* SPDX-License-Identifier: BSD-2-Clause */
/*******************************************************************************
* Copyright 2017-2018, Fraunhofer SIT sponsored by Infineon Technologies AG
* All rights reserved.
*******************************************************************************/
#ifdef HAVE... |
#include "nr_axiom.h"
#include <math.h>
#include <stdio.h>
#include "nr_app_harvest.h"
#include "nr_app_harvest_private.h"
#include "util_logging.h"
void nr_app_harvest_init(nr_app_harvest_t* ah,
nrtime_t connect_timestamp,
nrtime_t harvest_frequency,
... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "packet.h"
char *printraw_packet(const unsigned char *packet, unsigned int len) {
unsigned int i = 0, j = 0;
char *buf, *bptr;
bptr = buf = malloc((len*3)+(len>>4)+11);
while(i < len) {
sprintf(bptr, "%02x ", packet[i++]);
bptr += 3;
if(++j ... |
/* foldGfx - make graphics for Science foldout for draft genome issue. */
/* Copyright (C) 2011 The Regents of the University of California
* See README in this or parent directory for licensing information. */
#include "common.h"
#include "hash.h"
#include "linefile.h"
#include "portable.h"
#include "memgfx.h"
#inc... |
// SPDX-License-Identifier: BSD-2-Clause
/*
* Copyright (c) 2017, Linaro Limited
*/
#include <crypto/internal_aes-gcm.h>
#include <crypto/ghash-ce-core.h>
#include <io.h>
#include <kernel/panic.h>
#include <kernel/thread.h>
#include <tomcrypt.h>
#include <types_ext.h>
static void get_be_block(void *dst, const void ... |
/*
htop - htop.c
(C) 2004-2011 <NAME>
Released under the GNU GPL, see the COPYING file
in the source distribution for its full text.
*/
#include "config.h"
#include "FunctionBar.h"
#include "Hashtable.h"
#include "ColumnsPanel.h"
#include "CRT.h"
#include "MainPanel.h"
#include "ProcessList.h"
#include "ScreenManager... |
/*
* Execution Interface Implementation for MINI platform.
*
* This software is delivered under the terms of the MIT License
*
* Copyright (c) 2016 STMicroelectronics
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "S... |
#include "calc.h"
/* attempt to convert a bignum a long then to Calc::Q using itoq().
* NUM2LONG will raise a RangeError if arg doesn't fit in a long */
static VALUE
bignum_to_calc_q_via_long(VALUE arg)
{
return wrap_number(itoq(NUM2LONG(arg)));
}
/* handles exceptions during via_long. convert the arg to a stri... |
//
// main.c
// tty2udp
//
// Created by <NAME> on 11/1/17.
// Copyright © 2017 <NAME>. All rights reserved.
//
#include <string.h>
#include <stdbool.h>
#include <stdlib.h>
#include <stdio.h>
#include <fcntl.h>
#include <libgen.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include <poll.h>
#includ... |
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
/*
* Copyright (c) 2019-2020, Mellanox Technologies Ltd. All rights reserved.
*/
#include <uapi/rdma/rdma_netlink.h>
#include <linux/mlx5/rsc_dump.h>
#include <rdma/ib_umem_odp.h>
#include <rdma/restrack.h>
#include "mlx5_ib.h"
#include "restrack.h"
#define MAX_DU... |
/*
* Copyright (c) 2004-2005 The Trustees of Indiana University and Indiana
* University Research and Technology
* Corporation. All rights reserved.
* Copyright (c) 2004-2011 The University of Tennessee and The University
* of Tennessee Resea... |
/**
* Copyright 2019 Comcast Cable Communications Management, 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 applica... |
/*
* Copyright 2018-2019 Redis Labs Ltd. and Contributors
*
* This file is available under the Redis Labs Source Available License Agreement
*/
#include "./record.h"
#include "../util/rmalloc.h"
#include <assert.h>
#include "xxhash/xxhash.h"
#define RECORD_HEADER(r) (r-1)
#define RECORD_HEADER_ENTRY(r) *(RECORD_HEAD... |
#ifdef HAVE_LANGINFO_CODESET
#include <langinfo.h>
#endif
#include <locale.h>
#include "st_curses.h"
#include "st_panel.h"
#include <string.h>
#ifdef HAVE_LIBUNISTRING
#include <unicase.h>
#endif
#include "st_menu.h"
#define CONFIG_FIRST 35
#define CONFIG_SECOND 36
#define CONFIG_THIRD 37
#define CONFIG_S... |
/*-----------------------------------------------------------------*-C-*---
* File: %p%
*
* Copyright (C)1997 <NAME> <<EMAIL>>
* as part of the RScheme project, licensed for free use.
* See <http://www.rscheme.org/> for the latest information.
*
* File version: %I%
* File mod d... |
#include <stdbool.h> // bool
#include <stdlib.h> // malloc, free
#include <glad/glad.h>
#include "shoveler/drawable/cube.h"
#include "shoveler/shader_program.h"
#include "shoveler/opengl.h"
typedef struct {
char position[3];
char normal[3];
char uv[2];
} CubeVertex;
typedef struct {
unsigned char indices[3];
} ... |
#include <stdio.h>
#include "freertos/FreeRTOS.h"
#include "tftspi.h"
#include "tft.h"
// ==========================================================
// Define which spi bus to use TFT_VSPI_HOST or TFT_HSPI_HOST
#define SPI_BUS TFT_HSPI_HOST
// ==========================================================
// static char... |
/*
* Copyright 2020 <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 writi... |
/* $OpenBSD: acpivideo.c,v 1.8 2011/04/06 21:16:13 martynas Exp $ */
/*
* Copyright (c) 2008 <NAME> <<EMAIL>>
* Copyright (c) 2009 <NAME> <<EMAIL>>
*
* 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 noti... |
#include <stdlib.h>
#include <string.h>
#include "logger.h"
#include "memory.h"
// Global singleton atoms
atom_t *allocator_nil_atom, *allocator_true_atom, *allocator_false_atom;
// Private atom allocator function. Every atom comes from here.
atom_t* atom_alloc(uint8_t type){
atom_t *ptr = gc_alloc(sizeof(atom_t));... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "simdisk.h"
// int block_num = 102400 //total number of block in the whole disk
/* check the disk whether existed a file system, if not create one */
void my_mkfs (const char * path) {
char *tmp = (char *) calloc(BLOCKSIZE, 1); // allo... |
/*
* Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
* See https://llvm.org/LICENSE.txt for license information.
* SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
*
*/
#include <common.h>
static inline __attribute__ ((always_inline))
vdouble __log_d_kernel(vdouble m, vdoubl... |
/*
* dialog - Display simple dialog boxes from shell scripts
*
* ORIGINAL AUTHOR: <NAME> (<EMAIL>)
* MODIFIED FOR LINUX KERNEL CONFIG BY: <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 F... |
/*
* WinDrawLib
* Copyright (c) 2015-2016 <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, ... |
#include <stdio.h>
#include <stdint.h>
#include <SDL.h>
#include "ppu_framebuffer.h"
#include "controller_direct.h"
#include "cartridge.h"
#include "nes.h"
// global variables
SDL_Window *window;
SDL_Renderer *renderer;
SDL_Texture *texture;
uint32_t pixels[256*240];
static const uint32_t rgb_palette[64] = {
0x7C7C... |
//-------------------------------------------------------------------------------------------------
// File Description:
// This file contains tests related to the external memory (mram/flash).
//
// History
// 2020-04-21 by <NAME>
// - Created.
//-----------------------------------------------------------------------... |
/*
* Copyright 2020, Data61, CSIRO (ABN 41 687 119 230)
*
* SPDX-License-Identifier: GPL-2.0-only
*/
#include <object/reply.h>
void reply_push(tcb_t *tcb_caller, tcb_t *tcb_callee, reply_t *reply, bool_t canDonate)
{
sched_context_t *sc_donated = tcb_caller->tcbSchedContext;
assert(tcb_caller != NULL);
... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <pulse/simple.h>
#include <pulse/error.h>
#include "pulse.h"
#include "util.h"
#include "sampleconv.h"
struct pulse_enc_info {
const char *name;
int fmt, bytes, prec, can_dither;
void (*write_func)(sample_t *, char *, ssize_t);
void (*read_func)(c... |
/*
* Copyright (c) 2022 Baidu.com, 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 ... |
#include "clos.h"
#include "clos_class.h"
#include "condition.h"
#include "condition_debugger.h"
#include "control_object.h"
#include "control_operator.h"
#include "copy.h"
#include "execute_object.h"
#include "function.h"
#include "hold.h"
#include "restart.h"
#include "strvect.h"
#include "symbol.h"
#include "type_pa... |
/* display.c -- provides display functionality for the jcpvm */
/* ver. 1.03 */
/* Creates a frame buffer and fills it with what
* represents the current machine state of the jcpu.
* A new frame gets created after every interactive step. */
/* Author: <NAME> */
#include <stdio.h>
#include <string.h>
#include <stdl... |
/*
* Copyright 2002-2011, The TenDRA Project.
* Copyright 1997, United Kingdom Secretary of State for Defence.
*
* See doc/copyright/ for the full copyright terms.
*/
#include <stdio.h>
#include <string.h>
#include <shared/check.h>
#include <shared/error.h>
#include <shared/xalloc.h>
#include <shared/string.h>
... |
/* t5.c: read data for table */
# include "t.h"
void
gettbl(void)
{
int icol, ch;
cstore = cspace = chspace();
textflg = 0;
for (nlin = nslin = 0; gets1(cstore, MAXCHS - (cstore - cspace)); nlin++) {
stynum[nlin] = nslin;
if (prefix(".TE", cstore)) {
leftover = 0;
break;
}
if (prefix(".TC", cstore) ... |
#include "hal_nrf.h"
#include "nrf_test.h"
//#define LE1_32PIN
#define LE1_48PIN
#ifdef LE1_32PIN
// Reserve P0.3, P0.4 for 2W
sbit B0 = P0^0; // BUTTON0 on nRFGo
sbit B1 = P0^1; // BUTTON1 on nRFGo
sbit B2 = P0^2; // BUTTO... |
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
/*Let Ax = b be the square system of n linear equations.*/
/*Initial guess of the value of each x picked up based in nothing.*/
#define INITIAL_GUESS 1
/*Number of refinement-loops to be executed.*/
#define P 10
/*Row & column size of A and the column size... |
#include "PiVisClient.h"
#include "PiVisScheduler.h"
#include "PiVisConstants.h"
#include <stdio.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <netdb.h>
#include <sys/types.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#include <stdlib.h>
typedef void (*StateFunc)(v... |
#include <rtthread.h>
#include "skeleton.h"
#include <netif/ethernetif.h>
#define MAX_ADDR_LEN 6
struct rt_skeleton_eth {
/* inherit from ethernet device */
struct eth_device parent;
/* interface address info. */
rt_uint8_t dev_addr[MAX_ADDR_LEN]; /* hw address */
};
static struct rt_skeleton_eth _skeleton_devi... |
/*
* Copyright (c) 2011-2015, <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 con... |
/*
* 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.
*/
#include <linux/slab.h>
#include <linux/module.h>
#include <linux/dma-mapping.h>
#include <linux/dmaengine.h>
#include <linux... |
#include <string.h>
#include "fat_boot.h"
#include "fat_io.h"
/** @struct bpb710
* BPB for DOS 7.10 (FAT32). This is an extended version of bpb50.
*
*/
struct bpb710
{
uint16_t bpbBytesPerSec; //!< Bytes per sector
uint8_t bpbSecPerClust; //!< Sectors per cluster
uint16_... |
///////////////////////////////////////////////////////////////////////////////
//
/// \file outqueue.c
/// \brief Output queue handling in multithreaded coding
//
// Author: <NAME>
//
// This file has been put into the public domain.
// You can do whatever you want with this file.
//
//////... |
#include <CoreFoundation/CoreFoundation.h>
#include <stdlib.h>
void print_help(void);
int main (int argc, const char * argv[])
{
CFTimeInterval timeout = 0.0;
CFOptionFlags optionFlags = kCFUserNotificationPlainAlertLevel;
CFOptionFlags responseFlags = 0;
CFStringRef alertTitle = CFSTR("Alert");
CFStringRef ale... |
/* vararray.c
* A variable-length array/stack that resizes automatically.
*
* Implementation, yay!
*
* <NAME>
* 19/9/2003
*/
#include <stdlib.h>
#include <stdio.h>
#include "vararray.h"
#define PTR_SIZE (sizeof( va_ptr ))
#define STACK_TOP (v->index * PTR_SIZE)
/* Allocates and initializes a... |
#include "fastq_seq.h"
// open the fastq file corresponding to the name of the file
FastqSequence* OpenFastqSequence(const char* const file,
const Bool is_illumina_encoded,
const Bool do_trim_reads) {
FastqSequence* fqs = CkalloczOrDie(sizeof(struct... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "raylib.h"
#include "defines.h"
#include "globals.h"
#include "menu.h"
#include "mobs.h"
#include "map.h"
#include "items.h"
#include "turfs.h"
#include "game_draw.h"
void LoadGameTextures(char* textures_file_name){
FILE* textures_file;
if(!(... |
/**MIT License
Copyright (c) 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, ... |
/*
* 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
* Copyright (c) 2020 Arm Limited or its affiliates. All rights reserved.
* SPDX-License-Identifier : Apache-2.0
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www... |
#include "hw/azure_sphere_learning_path.h"
#include "dx_azure_iot.h"
#include "dx_config.h"
#include "dx_exit_codes.h"
#include "dx_terminate.h"
#include "dx_timer.h"
#include "buzzer_alert.h"
#include "co2_manager.h"
#include "connected_status.h"
//#include "hvac_status.h"
#include "location_from_ip.h"
#include "a... |
/*
* fork_demo.c (c) 2018-20 <NAME>
*/
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <errno.h>
#include <sys/wait.h>
#include <stdbool.h>
#include <memory.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wunknown-pragmas"
#pragma ide diagnostic ignored "OCUnusedGlobalDeclara... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.