text stringlengths 3.08k 10.5k |
|---|
# include <stdio.h>
# include <stdlib.h>
# include <string.h>
# include "c_iraf.h"
# include "xtables.h"
# include "stis.h"
# include "calstis0.h"
# include "hstcalerr.h"
static int SpecialCheck (char *, char *, int, int *, int *);
static void MissingFile (char *, char *, int *);
static int DoesFileExist (char *, in... |
/*****************************
* cramfs file extract
* compile: gcc -m32 -Wall -ILZMA_C xcramfs.c LZMA_C/decode.o LZMA_C/LzmaDecode.o -o xcramfs
*****************************/
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unist... |
// Copyright (c) <NAME> <<EMAIL>>
//
// This Source Code Form is subject to the terms of the MIT License.
// If a copy of the MIT License was not distributed with this file,
// You can obtain one at https://spdx.org/licenses/MIT.html.
#include "matoya.h"
#include <limits.h>
#include <string.h>
static const char CRYP... |
/*==========================================================
* regular polygon with nCorners,
* the corners are on circle with radius 1, center at origin
* mirrorsymmetric at y-axis,
* one side of polygon is parallel to x-axis and lies below it (y<0)
* is mapped to unit circle
*
* Input:
* input map
* the map... |
// Toy Pratt expression parser.
//
// This is a top-down recursive parser using Vaughan Pratt operator precedence technique.
// It turns an infix expression into a reverse-polish one.
//
// It supports a prefix operator and a few left or right associative infix
// operators in different precedence classes.
//
// As the... |
/*
** task_ft.c
**
** task "fixation-target".c ...
** standard fixation + 1-target tasks
** (e.g., overlap and memory saccades)
*/
#include "../toys.h"
#include "../task.h"
#include "../task_utilities.h"
/* PRIVATE MACROS/CONSTANTS */
#define NUM_GR_MENUS 2
#define TI "setup"
#define TIMV(ta,n) pl_list_get_... |
/*
* msp430fr-firmware-gcc-skeleton
*
* A little project to demonstrate how to use MSP430-GCC, GNU Make,
* and MSPDebug for MSP430FRxxxx development
*
* Before using this project, most likely you will need to modify the
* provded Makefile in order to set the correct microcontrollor
* series and toolchain paths ... |
/** @file
* Copyright (c) 2017, ARM Limited or its affiliates. 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
*
* ... |
#include <stdio.h>
#include <sys/io.h>
#include "pci.h"
void printVendor(unsigned short int data[2])
{
int i = 0;
for (i; i < PCI_VENTABLE_LEN; i++)
{
if (PciVenTable[i].VendorId == data[0])
{
printf("-> Vendor ID: %x", data[0]);
printf(" %s\n", PciVenTable[i].VendorName);
}
}
}
void printDev... |
/**
* Automated SDL subsystems management test.
*
* Written by <NAME>� "jorgenpt"
*
* Released under Public Domain.
*/
#include "SDL.h"
#include "SDL_test.h"
/* !
* \brief Tests SDL_Init() and SDL_Quit() of Joystick and Haptic subsystems
* \sa
* http://wiki.libsdl.org/moin.cgi/SDL_Init
* http://wiki.libsdl... |
/*
* This is free and unencumbered software released into the public domain.
*
* Anyone is free to copy, modify, publish, use, compile, sell, or
* distribute this software, either in source code form or as a compiled
* binary, for any purpose, commercial or non-commercial, and by any
* means.
*
* In jurisdict... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "freertos/FreeRTOS.h"
#include "freertos/queue.h"
#include "freertos/task.h"
#include "freertos/event_groups.h"
#include "esp_system.h"
#include "esp_log.h"
#include "esp_wifi.h"
#include "esp_netif.h"
#include "esp_utils.h"
#include "esp_storage.h"... |
/*
* nghttp3
*
* Copyright (c) 2019 nghttp3 contributors
* Copyright (c) 2013 nghttp2 contributors
*
* 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
* ... |
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright (c) 2012, The Chromium Authors
*/
#define DEBUG
#include <common.h>
#include <command.h>
#include <efi_api.h>
#include <display_options.h>
#include <log.h>
#include <version.h>
#define FAKE_BUILD_TAG "jenkins-u-boot-denx_uboot_dm-master-build-aarch64" \
"and a... |
#include <math.h>
#include <stdlib.h>
#include "petsc.h"
#include "petsctao.h"
double calculate_L_ijv(double*,double*,double*,double*, double);
int main(int argc,char **args){
int i,j,n_tau,n_theta,n_e,n_E,n_x,n_y,n_xy,e,E,v,nid,np;
int n_total_1,n_total_2,my_start,my_end,i_p,j_p,n_v;
PetscInt ierr;
double A... |
/*
Copyright (C) 2019 <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.
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANT... |
// (c) 2020 minim.co
// unum platform code for collecting wireless neighborhood scanlist info
#include "unum.h"
// Include declarations for platform driver specific code
// we share locally.
#include "wireless_platform.h"
#include "../wireless_nl80211.h"
/* Temporary, log to console from here */
//#undef LOG_DST
//... |
/*
* Copyright (C) 2016 SICOM Systems, INC.
*
* Author: <NAME> <<EMAIL>>
*
* 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 tha... |
/*Daala video codec
Copyright (c) 2013 Daala project 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... |
#include <stddef.h>
#include <stdint.h>
#include "types.h"
#include "base64.h"
static const u8 base64f[256] = {
//00 01 02 03 04 05 06 07
//08 09 0A 0B 0C 0D 0E 0F
// 0x00..0x3F
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, // 0x00
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0x... |
/*
C program to (1) subscribe to a topic
(2) parse the json strings in the message payload
(3) compress them and write them to a file every 2 minutes
For reference, from source file of "Mosquitto.h"
struct mosquitto_message{
int mid;
char *topic;
void *payload;
int payloadlen;
int qos;
... |
/***************************************************************/
/* */
/* MIPS-32 Instruction Level Simulator */
/* */
/* CS311 KAIST ... |
/*
* PowerPC implementation of KVM hooks
*
* Copyright IBM Corp. 2007
*
* Authors:
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*
*/
#include <sys/types.h>
#inclu... |
#include "keyboard.h"
#include "gpio.h"
#include "led.h"
#include <stdbool.h>
uint16_t KEY_Mask_X[3];
#define KEY_CANCEL_X ((uint16_t) 0x0400)
#define KEY_MENU_X ((uint16_t) 0x0200)
#define KEY_SELECT_X ((uint16_t) 0x0100)
#define KEY_DELAY_X ((uint16_t) 0x0100)
#define KEY_TEMP_X ((uint1... |
/* ______ ___ ___
* /\ _ \ /\_ \ /\_ \
* \ \ \\ \\//\ \ \//\ \ __ __ _ __ ___
* \ \ __ \ \ \ \ \ \ \ /'__`\ /'_ `\/\`'__\/ __`\
* \ \ \/\ \ \_\ \_ \_\ \_/\ __//\ \L\ \ \ \//\ \L\ \
* \ \_\ \_\/\____\/\____\ \____\ \____ \ \_\\ \____/
* ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <getopt.h>
#include <ctype.h>
#include <unistd.h>
#include <fcntl.h>
#include <argp.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/sysinfo.h>
#include "keyser.h"
/* Number of proc to wait */
int NBProc;
/**
* P... |
/*
* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted (subject to the limitations in the
* disclaimer below) provided that the following conditions are met:
*
* * Redistributions of source c... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* ft_fillit_solve_sq.c :+: :+: :+: ... |
#include "drv_page_pool.h"
#ifndef __ASSEMBLER__
#include "../drv_mem.h"
#endif
#include "page_table.h"
#include "../drv_util.h"
#include <sbi/sbi_ecall_interface.h>
/* SPA alway return ACCESSABLE address instead of raw physical address!!!! */
page_list_t page_pools[NUM_POOL];
static uintptr_t alloc_mem_from_m(struct... |
/*
* eChronos Real-Time Operating System
* Copyright (c) 2017, Commonwealth Scientific and Industrial Research
* Organisation (CSIRO) ABN 41 687 119 230.
*
* All rights reserved. CSIRO is willing to grant you a licence to the eChronos
* real-time operating system under the terms of the CSIRO_BSD_MIT license. See
... |
/*
* Copyright (c) 2017-present, Facebook, Inc.
* All rights reserved.
*
* This source code is licensed under both the BSD-style license (found in the
* LICENSE file in the root directory of this source tree) and the GPLv2 (found
* in the COPYING file in the root directory of this source tree).
*/
/*
* A simpl... |
/*
* Session.c
*/
#include "Include.h"
/* macros */
#define SizeEasyLevel 41 // base 2-8 and 10 (8), exp 2 - 6 (5) +1
#define SizeHardLevel 64 // base 4-9 11-12 (8), exp 5 - 12 (8)
/* protos */
static void Shuffle(UInt8 *, UInt16);
/* globals */
static MemHandle elH, hlH, tblH;
static UInt8 *el, *hl, *tbl;
static ... |
/*
* CDDL HEADER START
*
* This file and its contents are supplied under the terms of the
* Common Development and Distribution License ("CDDL"), version 1.0.
* You may only use this file in accordance with the terms of version
* 1.0 of the CDDL.
*
* A full copy of the text of the CDDL should have accompanied t... |
/* Copyright (c) 2014 Red Hat, Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of version 2 the GNU General Public License as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRA... |
/*
* libwebsockets - server access log handling
*
* Copyright (C) 2010-2017 <NAME> <<EMAIL>>
*
* 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:
* version 2.1 of the License.
*... |
/* ================================================================================================
JTQuad
Author: <NAME>
================================================================================================ */
/* ==============================================================================... |
/*
* Copyright 2009 Red Hat Inc., Durham, North Carolina.
* All Rights Reserved.
*
* 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.1 of the License, or (at your ... |
#include <math.h>
#include <gsl/gsl_math.h>
#include <egsl/egsl_macros.h>
#include "icp.h"
#include "../csm_all.h"
val compute_C_k(val p_j1, val p_j2);
val dC_drho(val p1, val p2);
void compute_covariance_exact(
LDP laser_ref, LDP laser_sens, const gsl_vector*x,
val *cov0_x, val *dx_dy1, val *dx_dy2)
{
egsl_pu... |
#include <stdio.h>
#include <string.h>
#include "http-parser.h"
#ifndef NULL
#define NULL ((void*)0)
#endif
#define T_RED "\e[31m"
#define T_LIME "\e[32m"
#define T_MAGENTA "\e[35m"
#define T_NORMAL "\e[00m"
#define T_BOLD "\e[01m"
#define ASSERT(M,c) (printf(((err|=!(c),(c)) ? (T_LIME " PASS " T_NORMAL " %s\n") : ... |
/*
* Convert between temperature and EMF (electromotive force) of
* thermocouple (Type T) based on ITS-90 Thermocouple Database:
* https://srdata.nist.gov/its90/main/
*
* This is an auto-generated file.
* (created by: nistcoeff.pl all.tab)
*
* !!! DO NOT EDIT THIS FILE. !!!
*
*/
#include <math.h>
#include "n... |
/*++
Copyright (c) 1991-92 Microsoft Corporation
Module Name:
splinit.c
Abstract:
Spooler Service Initialization Routines.
The following is a list of functions in this file:
SpoolerInitializeSpooler
Author:
<NAME> (KrishnaG) 17-Oct-1993
Environment:
User Mode ... |
#include "uf2.h"
// this actually generates less code than a function
#define wait_ready() \
while (NVMCTRL->STATUS.bit.READY == 0) \
;
void flash_erase_block(uint32_t *dst)... |
/*
* Copyright (c) 2021 Deomid "rojer" Ryabkov
* 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 re... |
/* $Id$
$Log$
Revision 1.1.1.1 2004/03/29 19:09:08 jsiegel
Test Copy
Revision 1.1.1.1 2003/02/11 23:26:41 mhuang
gcc-3.2.1
Revision 1.3 2002/01/03 04:57:56 rodrigc
2001-01-02 <NAME> <<EMAIL>>
PR bootstrap/5117
* configure.in (AC_CHECK_HEADERS): Check for stdlib.h.
... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <stdarg.h>
#include "mg_util.h"
// 获取 header 的长度
static int http_get_request_len(const char *s, int buf_len) {
const unsigned char *buf = (unsigned char *) s;
int i;
for (i = 0; i... |
#include <stdlib.h>
#include "g4nalarm.h"
#include "g4nutil.h"
#include <string.h>
Alarm GetAlarm(char* command) {
Alarm alarms;
// if (indexOf(command, "QALMHST") != 0 || indexOf(command, "QALMRST") != 0) {
// return alarms;
// }
char* alarmStr = substring(command, 7, 23);
char* theStringForResu... |
#include <math.h>
#pragma GCC diagnostic ignored "-Wimplicit-function-declaration"
/* GLU1T.F -- translated by f2c (version 12.02.01).
You must link the resulting object file with libf2c:
on Microsoft Windows system, link with libf2c.lib;
on Linux or Unix systems, link with .../path/to/libf2c.a -lm
or, if you in... |
//
// CsoundObject.c
// Audio-Mosaicing
//
// Created by <NAME> on 27/03/2013.
// Copyright (c) 2013 <NAME>. All rights reserved.
//
#import "CsoundObject.h"
#import <Accelerate/Accelerate.h>
#import "ConvenienceFunctions.h"
static const UInt32 channelOneTableNumber = 100;
static const... |
#include <string.h>
#include <stdio.h>
#include "main.h"
#include "stm32f1xx_hal_tim.h"
void SystemClock_Config(uint8_t clock_freq);
void TIMER2_Init(void);
void GPIO_Init(void);
void Error_Handler(void);
TIM_HandleTypeDef htimer2;
UART_HandleTypeDef huart2;
int main(void){
uint16_t brightness = 0;
... |
#include <stdlib.h>
#include <string.h>
#include "scanner.h"
struct scanner scanner;
void init_scanner(const char *src)
{
scanner.start = src;
scanner.current = src;
scanner.line = 1;
}
static bool is_at_end()
{
return scanner.current[0] == '\0';
}
static struct token make_token(token_type_t type)
{
struct tok... |
/**
* @file h3_thermal.c
*
*/
/* Copyright (C) 2018 by <NAME> mailto:<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 rig... |
/* fdjac1.f -- translated by f2c (version 20020621).
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__1 = 1;
/* Subroutine */ int fdjac1_(S_fp fcn, integer *n, doublereal *x, doublereal *
fvec, doublerea... |
/* jpeg texture loader from memory
* last modification: feb. 9, 2006
*
* Copyright (c) 2005-2006 <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, includ... |
#include <time.h>
#include "program.h"
#include "trigmath.h"
#include "draw.h"
#include "images.h"
#include "space.h"
#include "input.h"
void init(struct Graphics* g)
{
if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_JOYSTICK) < 0) {
printf("SDL init failed: %s\n", SDL_GetError());
return;
}
printf("initialized SDL\n");... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <time.h>
#include <kit/util.h>
#include <gosh/window.h>
double noise () {
return rand () / (double) RAND_MAX;
}
/* struct to hold the animation state */
typedef struct state_t {
/* the backend to the windowing system */
backend_t *back... |
/*-
* Copyright (c) 2010-2015 <NAME>.
* Copyright (c) 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
* ... |
/*
* ***** BEGIN GPL LICENSE BLOCK *****
*
* 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 License, or (at your option) any later version.
*
* This program is d... |
#include <stdio.h>
#include <stdlib.h>
#include <getopt.h>
#include <string.h>
#include <majordomo_rate_limit.h>
#define RATE_DB 0x01
MJ_DBS mj_postfix_dbs;
u_int32_t mj_dbs_open_flags;
int add_flag;
int del_flag;
int get_flag;
int force_flag;
static const struct option longopts[] =
{
{"add", no_argument, &a... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#define max(a, b) ((a)>=(b)?(a):(b))
#define min(a, b) ((a)<=(b)?(a):(b))
typedef struct _PLC PLC;
struct _PLC // 我们使用(p, len, c)的格式来表示每个编码
{
int p; // p : 最长匹配时, 字典中匹配子串开始时的位置(相对cursor的偏移量)
int len; ... |
/* Parser-tokenizer link implementation */
#include "pgenheaders.h"
#include "tokenizer.h"
#include "node.h"
#include "grammar.h"
#include "parser.h"
#include "parsetok.h"
#include "errcode.h"
#include "graminit.h"
int Py_TabcheckFlag;
/* Forward */
static node *parsetok(struct tok_state *, grammar *, int, perrdet... |
// C program to insert a node in AVL tree
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdbool.h>
#include "strukturdata.h"
// A utility function to get the height of the tree
int height(NodeTree *N)
{
if (N == NULL)
return 0;
return N->height;
}
// A utility function to get ... |
/**
* \file test_thread_messages
* \author <NAME> <<EMAIL>>
* \brief libnetconf2 tests - thread-safety for receiving messages
*
* Copyright 2021 Deutsche Telekom AG.
* Copyright 2021 CESNET, z.s.p.o.
*
* This source code is licensed under BSD 3-Clause License (the "License").
* You may not use this file except... |
/* -------------------------------------------------------------------
* KLR_COMPKERNMATMAT
*
* Matrix-matrix product Y = K*X, K block-diagonal kernel matrix.
* X is size N*P-by-Q, K has P N-by-N blocks. The blocks are K(j) =
* V(p)*M(l(p)) + S(p), where V(p), S(p) are positive from VVEC, SVEC.
* S(p) can be 0. M... |
/**************************************************************************//**
* @file main.c
* @version V3.00
* @brief Demonstrate how to minimize power consumption when entering power down mode.
*
* SPDX-License-Identifier: Apache-2.0
* @copyright (C) 2018 Nuvoton Technology Corp. All rights reserved.
... |
/*--------------------------------------------------------------------------
File : Vector_nRF51.c
Author : <NAME> Mar. 14, 2014
Desc : Interrupt Vectors table for ARM Cortex-M0 specific nRF51
CMSIS & GCC compiler
linker section name .Vectors is used for the table
Copyright (c) 2014, I-SYST inc., ... |
/*********************************************************
* Two Player Game Engine
* by <NAME>
* Allows you to create a two player game using Adafruit PyGamer, PyBadge and other similar
* boards connected by a packet radio or other communication systems.
* Open source under GPL 3.0. See LICENSE.TXT for d... |
// SPDX-License-Identifier: GPL-2.0+
/*
* Pinmux configuration for Compulab CM-T335 board
*
* Copyright (C) 2013, Compulab Ltd - http://compulab.co.il/
*
* Author: <NAME> <<EMAIL>>
*/
#include <common.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/hardware.h>
#include <asm/arch/mux.h>
#include <asm/io.h>
... |
/* vi: set sw=4 ts=4: */
/*
* b64 encode/decode
*/
#include <stdio.h>
#include <stdlib.h>
static const char cb64[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
static const char cd64[]="|$$$}rstuvwxyz{$$$$$$$>?@ABCDEFGHIJKLMNOPQRSTUVW$$$$$$XYZ[\\]^_`abcdefghijklmnopq";
/* encode 3 8-bit bina... |
/* NASL Attack Scripting Language Linter
*
* Copyright (C) 2013 Greenbone Networks GmbH
*
* 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 License, or (at your op... |
/****************************************************************\
* *
* NOI_Tree : non-overlapping interval tree *
* *
* <NAME>.. mailto:<EMAIL> *
*... |
/**
*
* \section COPYRIGHT
*
* Copyright 2013-2015 Software Radio Systems Limited
*
* \section LICENSE
*
* This file is part of the srsLTE library.
*
* srsLTE is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Soft... |
#include <errno.h>
#include <endian.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <sys/mman.h>
#include <string.h>
#include <stdint.h>
#include <stdbool.h>
#include "filehandler.h"
#include "point.h"
#include "arrayofclusters.h"
#include "arrayofpoi... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <json/printbuf.h>
#include "parsley.h"
#include "xml2json.h"
#include <libxslt/xslt.h>
#include <libxslt/xsltInternals.h>
#include <libxslt/transform.h>
#include <libxml/parser.h>
#include <libxml/HTMLparser.h>
#include <libxml/HTMLtree.h>
#include <li... |
#include "flac_test.h"
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"
#include <assert.h>
#include <esp_types.h>
#include <stdio.h>
#include "esp32/rom/ets_sys.h"
#include "esp_heap_caps.h"
#include <stdlib.h>
#include <string.h>
#include "share/compat.h"
#include "FLAC/... |
/* <NAME>, grupa 10
* In cazul mediu statistic se pot observa urmatoarele :
* - cea mai rapida metoda este Bottom Up
* - cele mai putine atribuiri le are Bottom Up
* - cele mai putine comparatii le are Top Down, dar la o diferenta foarte mica Bottom Up
*/
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
... |
/*
* Copyright (c) 1991 <NAME>
*
* Disclaimer: No guarantees of performance accompany this software,
* nor is any responsibility assumed on the part of the authors. All the
* software has been tested extensively and every effort has been made to
* insure its reliability.
*/
/*
* applycmap.c - apply a colorma... |
#include "stm8/clock.h"
#include "stm8/i2c_master.h"
#include "stm8/timer.h"
#include "stm8/uart.h"
#include "keypad/is31fl3218.h"
#include "keypad/pcal6416a.h"
#include "shared/comms.h"
void update_leds(uint8_t base_hdmi_a, uint8_t base_hdmi_b, uint8_t base_usb) {
// hdmi A | hdmi B | usb
// port 1 | 0 1 ... |
#include <IOKit/IOKitLib.h>
#include <IOKit/IOCFSerialize.h>
#include <CoreFoundation/CoreFoundation.h>
#include <assert.h>
#include <sys/param.h>
#include <stdio.h>
#include <string.h>
#include <errno.h>
#include <sys/mount.h>
#include <sys/stat.h>
// daibutsu AFC2 (original by TaiG AFC2)
// based on attach.c by dan... |
#include "port.h"
/*
* Applied for ARM Cortex-M3(STM32F103)
*/
// 临界区嵌套计数器
static UBaseType_t uxCriticalNestingCnt = 0;
// 默认Task不能返回
static void prvTaskExitError(void);
// SysTick初始化
static void vPortSetupTimerInterrupt(void);
// 系统中断Handler, 根据需要声明为naked
void xPortPendSVHandler(void) __attribut... |
//////////////////////////////////////////////////////////////
// ____ //
// | __ ) ___ _ __ ___ _ _ _ __ ___ _ __ _ __ ___ //
// | _ \ / _ \ '_ \/ __| | | | '_ \ / _ \ '__| '_ \ / __| //
// | |_) | __/ | | \__ \ |_| | |_) | __/ | | |_) | (__ //
// |... |
// Datasheets:
//
// http://www.st.com/content/ccc/resource/technical/document/application_note/40/31/95/25/a2/18/40/b3/DM00119037.pdf/files/DM00119037.pdf/jcr:content/translations/en.DM00119037.pdf
// http://hades.mech.northwestern.edu/images/6/61/L3GD20H.pdf
#include <stdio.h>
#include <stdlib.h>
#include <... |
#include "protocol.h"
#include "main.h"
#include "start_user_app.h"
#include "usb_interface.h"
#include <stdbool.h>
#include <string.h>
#define QSPI_START_ADDR 0x90000000
#define START_BYTE 0xff
#define COMMAND_FLASH 0x00
#define COMMAND_RUN 0x01
static bool is_start(const Bootloader* self, uint8_t byte);
static bo... |
#define _GNU_SOURCE
#include <assert.h>
#include <pthread.h>
#include <stdlib.h>
#include "gc/gc.h"
#include "prioq.h"
#include "common.h"
#define PER_THREAD 30
static pq_t *pq;
int nthreads;
pthread_t *ts;
void *add_thread(void *id);
void *removemin_thread(void *id);
void *invariant_thread(void *id);
/* the d... |
#include <stdio.h>
#include <string.h>
char emlployeeId[10];
char password[10];
int items[20];
int quantity[20];
int i, j, q;
int sum;
int discAmount, discountedBill;
int noOfItems, itemNo;
char choice;
int option;
void menu()
{
printf("\n **Menu** \n\n");
printf("1. Add items (Max 20)\n")... |
/*
* Copyright (C) SplinterGU (Fenix/BennuGD) (Since 2006)
* Copyright (C) 2002-2006 Fenix Team (Fenix)
* Copyright (C) 1999-2002 <NAME> (Fenix)
*
* This file is part of Bennu Game Development
*
* This software is provided 'as-is', without any express or implied
* warranty. In no event will the authors be... |
#include "elf_packer.h"
extern uint64_t rotate_right(uint64_t key);
static void append_payload(
elf64 *elf,
void *ptr_packed,
Elf64_Half idx,
Elf64_Addr old_e_entry,
uint64_t key,
Elf64_Half textsec_idx)
{
void *loader_addr = ptr_packed + elf->sheader[idx].sh_offs... |
#include "test.h"
#include "../src/file.h"
#include "../src/parse.h"
#include <inttypes.h>
static bool
test_parse (bool expect_parse_error, unsigned strict, const char *path)
{
const char *type;
switch (strict)
{
default:
case RELAXED_PARSING:
type = "relaxed";
break;
case NORMAL_PARS... |
#include <stdlib.h>
#include <stdio.h>
#include <getopt.h>
#include <assert.h>
#include <sys/time.h>
#include "algorithm.h"
void single_lemke_exec();
void all_lemke_exec();
int main(int argc, char **argv)
{
FILE *input;
int c;
int sing_l = 0, all_l = 0, readgame = 0, debug_mask = 0, gambit_output = 0, summary ... |
/* **********************************************************
* Copyright (c) 2015-2016 Google, Inc. All rights reserved.
* **********************************************************/
/*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following ... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "DGraph.h"
DGArc *newArc(DGNode *tl,DGNode *hd){
DGArc *ar=(DGArc *)malloc(sizeof(DGArc));
ar->tail=tl;
ar->head=hd;
return ar;
}
void arcShow(DGArc *ar){
DGNode *tl=(DGNode *)ar->tail,
*hd=(DGNode *)ar->head;
fprintf(stderr,"%d.... |
#include "init.h"
#include "math.h"
void parseUserInput(int argc, char** argv) {
int c;
char configfile[30];
int outfileSpecified = 0;
int configfileSpecified = 0;
int varSpecified = 0;
if (argc == 1) {
fprintf(stderr, "GTgraph-rmat [-options]\n");
fprintf(stderr, "\t-c ### config file to use\n");
fprintf... |
#include <limits.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <assert.h>
#include <stdio.h>
#include "request.h"
#include "http_header.h"
http_request* http_request_init() {
http_request *req;
//分配内存
req = malloc(sizeof(*req));
req->content_length = 0;
req->version = HTTP... |
/*1 refcnt.h
*# Reference counter for C.\n
*{
** Objects are allocated with {{rc_alloc()}} which returns a reference counted
*# block of memory. The initial reference count is set to one.
** Use {{rc_set_dtor()}} to register a destructor function on an object that
*# gets called when the object is reclaimed. This... |
//----- Include Files ---------------------------------------------------------
#include <avr/io.h> // include I/O definitions (port names, pin names, etc)
#include <avr/interrupt.h>
#include "adc.h"
#include "tick2.h"
#include "i2c.h"
#include "robbus.h"
#define INDEX_TIMESTAMP 0
#define INDEX_STATUS 1
#d... |
#include "sort.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
void printState(int * arr, int from, int to)
{
printf("%i-%i:", from, to);
for(int i = from; i < to; i++)
{
printf(" %i", arr[i]);
}
}
int merge_sort(int * arr, int size)
{
if(!arr || size < 1) return 1;
if... |
/* $OpenBSD: pcctwo.c,v 1.30 2010/06/26 23:24:43 guenther Exp $ */
/*
* Copyright (c) 1995 <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 ... |
// SPDX-License-Identifier: GPL-2.0 OR Linux-OpenIB
// Copyright (c) 2021, NVIDIA CORPORATION & AFFILIATES. All rights reserved.
#include <linux/if_vlan.h>
#include "act.h"
#include "pedit.h"
#include "en/tc_priv.h"
#include "en/mod_hdr.h"
static int pedit_header_offsets[] = {
[FLOW_ACT_MANGLE_HDR_TYPE_ETH] = offset... |
/*
Copyright (C) 2016 <NAME>
Author: <NAME>
This file is part of Spacenerds In Space.
Spacenerds in Space 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 License, or
(at your optio... |
/*
* scream2slink module
* Supports listening for UDP gcf packets from SCREAM!
*
*/
/* Mar 2004 - Developed by <NAME> (ORFEUS/KNMI) */
/* for the SCREAM plugin in SeedLink */
/* Oct 2008 - Improved by <NAME> (gempa.de) to support */
/* stream mapping using the sysid of ... |
// SPDX-License-Identifier: MIT
#define _GNU_SOURCE
#include <errno.h>
#include <string.h>
#include <hdf5.h>
#include <H5PTpublic.h>
#include "jitterdebugger.h"
#define min(x,y) \
({ \
typeof(x) __x = (x); \
typeof(x) _... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.