text stringlengths 3.08k 10.5k |
|---|
/*
* -----------------------------------------------------------------
* $Revision: 855 $
* $Date: 2005-02-10 00:15:46 +0100 (Thu, 10 Feb 2005) $
* -----------------------------------------------------------------
* Programmer(s): <NAME> and <NAME> @ LLNL
* --------------------------------------------------------... |
//============================================================================
/// @file log.c
/// @brief Kernel logging module.
//
// Copyright 2016 <NAME>.
// Use of this source code is governed by a BSD-style license
// that can be found in the MonkOS LICENSE file.
//===================================... |
#include <stdio.h>
#include <string.h>
#include <ctype.h>
#include <math.h>
#include <stdlib.h>
char* infix_to_postfix(char*);
int postfix_expr_evaluation(char*, int);
int precedence(char);
int precedence(char operator) {
int prec = 0;
if(operator == '^')
prec = 3;
else if(operator == '*' || opera... |
/**
* compute_24.c
* Using brutal force to make up 24 given four numbers.
*
* Author: <NAME>
* Email: <EMAIL>
* Date: 07/19/2018
* Copyright (c) 2018 <NAME>
* All rights reserved
* License: MIT License
* Version: v2.0
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <limits.h>
typedef c... |
/*
* definitions used in more than one file
*/
#include <u.h>
#include <libc.h>
#include <libg.h>
#include <bio.h>
#define DPI 100.
typedef double Flt;
typedef struct Dpoint Dpoint;
typedef struct Drectangle Drectangle;
typedef struct Item Item;
typedef struct Typeface Typeface;
typedef struct Itemfns Itemfns;
typede... |
/*
* Copyright 2013-2018 Guardtime, Inc.
*
* This file is part of the Guardtime client SDK.
*
* 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/LICENS... |
/* $OpenBSD: softraid_concat.c,v 1.25 2016/04/12 16:26:54 krw Exp $ */
/*
* Copyright (c) 2008 <NAME> <<EMAIL>>
* Copyright (c) 2011 <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 notic... |
#include <unistd.h>
#include <sys/types.h> /* basic system data types */
#include <sys/socket.h> /* basic socket definitions */
#include <netinet/in.h> /* sockaddr_in{} and other Internet defns */
#include <arpa/inet.h> /* inet(3) functions */
#include <sys/epoll.h> /* epoll function */
#incl... |
/*
* Free FFT and convolution (C)
* Copyright (c) 2017 Project Nayuki. (MIT License)
* https://www.nayuki.io/page/free-small-fft-in-multiple-languages
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal ... |
#pragma strict_types
#include "../def.h"
inherit MASTER_ROOM;
string quest_solver;
void create_object(void);
void reset(int arg);
void init(void);
int do_pray(string str);
int do_place(string str);
void end_quest(int step);
void create_object(void)
{
set_short("A tranquil altarroom");
set_long("This is the m... |
/*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <psa/crypto.h>
#include <stdbool.h>
#include <stdint.h>
#include "tfm_secure_api.h"
#include "tfm_api.h"
#define NUM_SECRETS 5
struct dp_secret {
uint8_t secret[16];
};
struct dp_secret secrets[NUM_SECRETS] = {... |
/*
* md6.c
*
* Created on: Aug 27, 2019, 12:08:31 PM
* Author: <NAME>
*/
#include "md6-internal.h"
#include "macros.h"
#include <assert.h>
#include <string.h>
static void
_read_words_be(uint64_t *dst, const uint8_t *src, size_t length, unsigned off) {
size_t words, bytes;
if (off != 0) {
/* Fill partia... |
#include <stdio.h>
#include <math.h>
#include "mathfunctions.h"
#include "globals.h"
#include "constitutive_equations.h"
extern double getI1(double A, double b, double m1, double m2);
void RoeFlux(double *Fhat, double A_L, double A_R, double Q_L, double Q_R, double b,
double m1, double m2, double localG)
{
double ... |
#include "geminc.h"
#include "gemprm.h"
#include "interface.h"
#include "panel.h"
#include "panelstr.h"
#include "Nxm.h"
extern Widget ggroup_listW;
Widget group_listW;
Widget fileLabelW;
void create_gpctrB ( Widget parent );
void SelGroup_Pushb_Callback ( Widget, long, XtPointer );
/*****************************... |
/*
* Copyright (c) 2006, <NAME>
* All rights reserved.
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* * Redistributions of source code must retain the above copyright
* notice, this list of condition... |
/* $OpenBSD: bussw.c,v 1.20 2007/12/13 18:50:10 miod Exp $ */
/*
* Copyright (c) 1999 <NAME>, Jr.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyrig... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include <string.h>
#include <limits.h>
#define BUFFER_SIZE 1024*1024
void print_help(void)
{
printf("CSS: Content Scrambling System.\n");
printf("-h help menu\n-t target path(required)\n-k key(required)\n-d destination. overwrites target if none given\n");... |
/*
*
* Abstract:
* VxWorks Asynchronous Interrupt Block.
* Author:
* <NAME>, <NAME>
* Date:
* 10-15-97
*
* Copyright 1994-2002 The MathWorks, Inc.
*/
#define S_FUNCTION_NAME vxinterrupt
#define S_FUNCTION_LEVEL 2
#include "simstruc.h"
#define ISR_MODE (ssGetSFcnParam(S,0))
#defi... |
#include "../include/clipwatch.h"
#define _GNU_SOURCE
#include <X11/Xatom.h>
#include <X11/Xlib.h>
#include <X11/extensions/Xfixes.h>
#include <stddef.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <fcntl.h>
#include <unistd.h>
#include <string.h>
#include <errno.h>
#define STATUS_STOPPED 1
#... |
#include "display.h"
#include "interrupt.h"
#include "memory.h"
#include <stdio.h>
#include <allegro5/allegro.h>
#include <allegro5/allegro_primitives.h>
// debug
#include "command.h"
static const uint16_t MAX_WIDTH = 512, MAX_HEIGHT = 256;
static uint16_t width = 512, height = 256, scale = 1; // display dimensions
... |
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include "decode_base64.h"
#include "print_cept.h"
#include "links.h"
#define LINELEN (2048)
#define PAGENUMLEN (32)
/* returns 1 when string is completely nummeric
* returns 0 when there is a different character
*/
int is_all_digits(char *s)
{
if (s==NU... |
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <stdarg.h>
#include <stddef.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/socket.h>
#include <sys/types.h>
#include <sys/un.h>
#include <unistd.h>
#include "util.h"
#define ATOMIC_IO(func, fd, buf, cou... |
/*! \file bcmptm_misc.c
*
* Traverse alloc, de-alloc for PTM
*/
/*
* This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
*
* Copyright 2007-2020 Broadcom Inc. All rights reserved.
*/
/**********************************************... |
/*
* Copyright (c) 2008-2020 <NAME> (<EMAIL>)
* 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 o... |
/* combine - flexible file merging
Copyright (C) 2002, 2003, 2004, 2013 <NAME>
This file was written 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 Free
Software Foundation; either versi... |
/*
* Copyright (c) 2005 <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, ... |
/**
* Minimal Migration Manager - MySQL Driver
* Copyright (C) 2015 <NAME>.
*
* This code is licenced under the Simplified BSD License.
* See the LICENSE file for details.
*/
#include <stdlib.h>
#include <string.h>
#ifndef IN_TESTS
#include <mysql/mysql.h>
#endif
#include "driver.h"
#include "../utils.h"
/**
... |
/******************************************************************************
* Copyright (c) 2016, Xilinx, 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. Redistributio... |
/* $Id$ $Revision$ */
/* vim:set shiftwidth=4 ts=8: */
/*************************************************************************
* Copyright (c) 2011 AT&T Intellectual Property
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.... |
/**
* @brief Example usage of GPIO peripheral. Three LEDs are toggled using
* GPIO functionality. A hardware-to-software interrupt is set up and
* triggered by a button switch.
*
* The tsb0 board has three LEDs (red, green, blue) connected to ports
* PB11, PB12, PA5 respectively. The button switch is connected to... |
#pragma strict_types
#include "../def.h"
inherit MASTER_ROOM;
void create_object(void);
void reset(int arg);
void init(void);
int do_climb(string str);
void create_object(void)
{
set_short("West side of the farm (e/n/nw/w/sw)");
set_long("The west side of the large yard in the middle of a small " +
... |
#include "construct.h"
#include "util.h"
#include "nodeutil.h"
#include <assert.h>
#define DBGS 1
// #define DBGFLAGS (DBGS)
#define DBGFLAGS (0)
static Ref getexisting(
const Array *const env, Array *const U, const Ref key)
{
List *const l
= tracepath(
env, U,
readpack(U, strpack(0, "ENV")),
readpack... |
/* Copyright (c) 2016 National Cheng Kung University, Taiwan.
* All rights reserved.
* Use of this source code is governed by a BSD-style license.
*/
#include "tlsf.h"
#include <assert.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <sys/mman.h>
#includ... |
#include "env_msg_service.h"
#include "env_util.h"
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#define INDEXES_FOUND 0
#define OPEN_BRACE_NOT_FOUND 1
#define CLOSE_BRACE_NOT_FOUND 2
#define BAD_FORMAT_STRING 3
#define INTERNAL_ERROR 4
static int _find_indexes (const char ... |
/**
* Transformation for URL parameters
*
* It might be necessary tro transform urlparameters. For example
* leading zeros mmust be added or removed.
*
* Sometimes it is required to use the same transformation function
* several times with the same parameter (for example printf(%08d).
* For convenience suc... |
/**
* Utilities.c
* A collection of Windows utility functions.
*
* @author: <NAME> <<EMAIL>>
*/
#include "Utilities.h"
#include <stdio.h>
#include <stdlib.h>
/**
* Slurps a file and stores its contents inside a buffer.
* @remark Remember to free the contents buffer with LocalFree.
*
* @param szPath ... |
/*!
* \brief Test project to ensure the package is valid.
*/
#include <assert.h>
#define KALMAN_TIME_VARYING
#define KALMAN_JOSEPH_FORM
#include "fixkalman.h"
#define KALMAN_NAME gravity
#define KALMAN_NUM_STATES 3
#define KALMAN_NUM_INPUTS 0
kalman16_uc_t kf;
#define KALMAN_MEASUREMENT_NAME position
#define KALMA... |
/*
* jscore-test.c
*
* Copyright 2021 chehw <<EMAIL>>
*
* The MIT License
*
* 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... |
/***************************************************************************
* ex3.c Version 20180329.201538 *
* *
* Calculadora de notãcao polonesa reversa *
* Copyrig... |
/* Alignment/padding coverage test for string comparison.
Copyright (C) 2016-2017 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by t... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#ifdef REF
#include "gift128.c"
#define gift giftb128
#elif defined(UA_V)
#include "gift_ua_vslice.c"
void gift(uint32_t text[4], uint16_t key16[8]) {
uint32_t key[8];
for (int i = 0; i < 8; i++)
key[i] = key16[i];
uint32_t ou... |
#include <stdint.h>
#define WinCol 20
#define WinRow 12
#define UpdateTimes 60
#define NOHARMTIME 3
#define TotalBomb 20
#define PowerFlag 0x02
typedef uint8_t db;
typedef uint16_t dw;
typedef struct{
dw graph;
dw dir;
dw pat;
dw x, y;
dw tx, ty;
dw ani;
dw v;
}Player;
typedef struct{
dw graph;
db u... |
#include <msp430F5529.h>
#define CPU_F ((double)16000000) //CPU频率
#define delay_us(x)__delay_cycles((long)(CPU_F*(double)x/1000000.0)) //延迟x微妙
#define delay_ms(x)__delay_cycles((long)(CPU_F*(double)x/1000.0)) //延迟x毫秒
//DS18B20控制引脚定义
#define DQ_OUT P7DIR|=BIT0
#define DQ_IN P7DIR&=~BIT0
#define DQ_H ... |
#include <lib.h>
#include <malloc.h>
enum {
MAXMALLOC = 1024 * 1024, /* max size of one allocated chunk */
};
static void *base = NULL;
struct m_block {
size_t size;
struct m_block *prev;
struct m_block *next;
int free;
void *ptr;
uint8_t data[0];
};
#define BLOCK_SIZE sizeof(struct m_block)
#define align... |
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <argv/argv.h>
#include "cmd-args.h"
#include "cmd-option.h"
cmd_args *argv_init(void) {
cmd_args *args = calloc(1, sizeof(cmd_args));
assert(args != NULL /* calloc() worked? */);
args->options = NULL;
args->num_options = 0;
args->pos = 0;
... |
/*
* MikroSDK - MikroE Software Development Kit
* Copyright© 2020 MikroElektronika d.o.o.
*
* 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 ... |
/*++
Copyright (c) 1992 Microsoft Corporation
Module Name:
device.c
Abstract:
WinDbg Extension Api
Author:
<NAME> (wesw) 15-Aug-1993
Environment:
User Mode.
Revision History:
--*/
#include "precomp.h"
#pragma hdrstop
//----------------------------------------... |
/* *************************************************************************************
Copyright (c) 2021, <NAME>
All rights reserved.
This file is part of APG Version 7.0.
APG Version 7.0 may be used under the terms of the BSD 2-Clause License.
Redistribution and use in source and bina... |
//
// Created by TYTY on 2020-08-11 011.
//
#include "cimg.h"
#ifdef WIN32
#include "header/avif.h"
#else
#include <avif/avif.h>
#endif
// Estimated by human eye.
i32 AVIFQualityTransform(u8 quality) {
if (quality > 100) {
return 6;
} else if (quality > 90) {
return -2.2 * quality + 22... |
/* Definitions of target machine for GNU compiler, for SPARClite w/o FPU, COFF.
Copyright (C) 1994 Free Software Foundation, Inc.
Written by <NAME> (<EMAIL>).
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as publi... |
/*-----------------------------------------------------------------------------
PCA9555 AVR Driver
Copyright 2010 <NAME>
<<EMAIL>> http://fletchtronics.net
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may... |
#include "lua.h"
#include "lualib.h"
#include "lauxlib.h"
#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <stropts.h>
#include <string.h>
#include <linux/uinput.h>
#include <linux/input.h>
#include <stdbool.h>
typedef struct {
int fd;
int open;
} Keyboard;
struct KeyTuple {
const char* na... |
/*
* Copyright (C) 2014 <NAME> <<EMAIL>>
* Copyright (C) 2015 <NAME> <<EMAIL>>
* Copyright (C) 2018 <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 ... |
/*
SYMTAB.C
This module implements a symbol table object. The symbol table
records whether particular symbols are "interesting" or not.
The current implementation is quite simple-minded; symbols are
added to the table in the order they arrive. No attempt to make
symbol table search efficien... |
/*
* Copyright (c) 2005-2013 <NAME>
*
* 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 distri... |
#include<ir/ir.h>
#include<target/util.h>
const char *ps_op_names[]={
"eq", "ne", "lt", "gt", "le", "ge"
};
static void ps_init_state(int max_pc) {
for(int i=0; i<7; i++){
emit_line("/%s 0 def", reg_names[i]);
}
int ps_array_size_shift=15;
int ps_array_size=1<<ps_array_size_shift;
emi... |
#include "Mesh.h"
Quad Q_new(Vector v1, Vector v2, Vector v3, Vector v4){
Quad q;
q._vertices[0]=(Vector) v1;
q._vertices[1]=(Vector) v2;
q._vertices[2]=(Vector) v3;
q._vertices[3]=(Vector) v4;
return q;
}
Vector Q_normal(Quad* q){
Vector* vertices=q->_vertices;
Vector V1=V_substract(vertices[1],vertices... |
// Copyright 2018 Espressif Systems (Shanghai) PTE LTD
// All rights reserved.
#include <stdio.h>
#include <esp_log.h>
#include <resampling.h>
#include <voice_assistant_app_cb.h>
#include <audio_board.h>
#include <es8388.h>
#include <ui_led.h>
#define I2S_PORT_NUM I2S_NUM_0
#define DES_BITS_PER_SAM 16
#define SRC_BIT... |
#include <unistd.h>
/* FreeRTOS kernel includes. */
#include <FreeRTOS.h>
#include <task.h>
#include <queue.h>
#include <timers.h>
#include <semphr.h>
void vApplicationMallocFailedHook( void );
void vApplicationIdleHook( void );
void vApplicationStackOverflowHook( TaskHandle_t pxTask,
... |
/*
* @UBERXMHF_LICENSE_HEADER_START@
*
* uber eXtensible Micro-Hypervisor Framework (Raspberry Pi)
*
* Copyright 2018 Carnegie Mellon University. All Rights Reserved.
*
* NO WARRANTY. THIS CARNEGIE MELLON UNIVERSITY AND SOFTWARE ENGINEERING
* INSTITUTE MATERIAL IS FURNISHED ON AN "AS-IS" BASIS. CARNEGIE MELLON
... |
/*
network.c
Author: <NAME> <<EMAIL>>
Copyright (c) 1998 <NAME> <<EMAIL>>, <NAME>
All rights reserved
Created: Thu Sep 10 19:30:40 GMT 1998
Here we handle general network code:
* forward and reverse resolution of a network address.
* wrap blocking functions such as connect and write with a timer... |
/*
* Copyright (c) 2016, <NAME> <<EMAIL>>
* 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 co... |
/*
* Author: <NAME>
*
*
*
*(***********in progress **********************)
* prints the files open by processes or the process ids if file path is
* given
* sample output
* ---------------------------------------------------------------------------
* ./process_file_info
*
* PID: 32429 SYMLINK: /proc/32429... |
// Copyright 2013 Google 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 appl... |
#include "SDL_image.h"
#include "IMG_savepng.h"
#include <SDL/SDL_video.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdio.h>
#include <stdlib.h>
#define LENGTH(X) (sizeof(X) / sizeof(X)[0])
#define ALPHA 0xFF000000
#define SKIP 0xFFFFFF
typedef struct {
char x, y;
} Vec2;
static Uint32 getpx(SDL_Surfac... |
/*BEGIN_LEGAL
Intel Open Source License
Copyright (c) 2002-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 code must retain the above copyright noti... |
/**
*
* @file
*
* PLASMA is a software package provided by:
* University of Tennessee, US,
* University of Manchester, UK.
*
* @precisions normal z -> s d c
*
**/
#include "plasma_async.h"
#include "plasma_context.h"
#include "plasma_descriptor.h"
#include "plasma_internal.h"
#include "plasma_types.h"
#in... |
/******************************************************************************
* Copyright (C) 2020 Xilinx, Inc. All rights reserved.
* SPDX-License-Identifier: MIT
******************************************************************************/
/**
*
* @file xclk_wiz_versal_example.c
*
* This file contains a design ex... |
/*
* Copyright (c) 2017, Xilinx Inc. and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
/*****************************************************************************
* atomic_shmem_demod.c - Shared memory atomic operation demo
* This task will:
* 1. Get the shared memory devic... |
// Motor.c
// Runs on MSP432
// Provide mid-level functions that initialize ports and
// set motor speeds to move the robot. Lab 13 starter
// <NAME>
// July 8, 2017
/* This example accompanies the books
"Embedded Systems: Introduction to the MSP432 Microcontroller",
ISBN: 978-1512185676, <NAME>, co... |
/*
* 8 digit 7-segment LED display with MAX7219 controller chip
* DIN <-> C6 (MOSI)
* CS <-> D2 (slave select)
* CLK <-> C5 (clock)
*/
#include <stdint.h>
#include "stm8.h"
/* Build in LED is in pin B5 (STM8S103 board) or D3 (STM8S003F3 board) */
#ifdef STM8S103
#define LED_PORT PB
#define LED_PIN PIN5
#... |
// SPDX-License-Identifier: GPL-2.0+
/*
* UART Link Layer for S3FWRN82 NCI based Driver
*
* Copyright (C) 2015 Samsung Electronics
* <NAME> <<EMAIL>>
* Copyright (C) 2020 Samsung Electronics
* <NAME> <<EMAIL>>
*/
#include <linux/device.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/nfc.h... |
/* slamchtst.f -- translated by f2c (version 20061008).
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 install libf2c.a in a standard place, with -lf2c -lm
-- in that order, at the end... |
/* This is part of the netCDF package. Copyright 2005 University
Corporation for Atmospheric Research/Unidata See COPYRIGHT file for
conditions of use. See www.unidata.ucar.edu for more info.
Test small files.
$Id: tst_small.c,v 1.15 2008/10/20 01:48:08 ed Exp $
*/
#include <nc_tests.h>
#include <netcdf.... |
/*
* yase - Yet Another Sieve of Eratosthenes
* main.c: main routines
*
* Copyright (c) 2015 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining
* a copy of this software and associated documentation files (the
* "Software"), to deal in the Software without restriction, including
*... |
/** fmedia: ICY protocol input
2016,2021, <NAME> */
#include <FF/audio/icy.h>
struct icy {
fmed_filt *d;
fficy icy;
ffstr data;
ffstr next_filt_ext;
netin *netin;
ffstr artist;
ffstr title;
uint out_copy :1;
uint save_oncmd :1;
};
int icy_setmeta(icy *c, const ffstr *_data);
#define FILT_NAME "net.icy"
... |
/*
* This routine converts time as follows.
* The epoch is 0000 Jan 1 1970 GMT.
* The argument time is in seconds since then.
* The localtime(t) entry returns a pointer to an array
* containing
*
* seconds (0-59)
* minutes (0-59)
* hours (0-23)
* day of month (1-31)
* month (0-11)
* year-1970
* weekday (0-... |
//--------------------------------------------------------------------------
// Parsing of GPS info from exif header.
//
// <NAME>, Dec 1999 - Dec 2002
//--------------------------------------------------------------------------
#include "jhead.h"
#define MAX_GPS_TAG 0x1e
#define TAG_GPS_LAT_REF 1
#define TAG_G... |
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#define MAX_QUOTES 8
#define MAX_LEN_TEXT 80
#define MAX_LEN_AUTHOR 30
typedef struct quotation {
char text[MAX_LEN_TEXT];
char author[MAX_LEN_AUTHOR];
} Quotation;
typedef struct collection {
int count;
Quotation quotes[MAX_QUOTES];
... |
/* Definitions of target machine for GNU compiler,
for Sun SPARC-V9 on a hypothetical elf format machine.
Copyright (C) 1994 Free Software Foundation, Inc.
Contributed by <NAME>, <EMAIL>.
This file is part of GNU CC.
GNU CC is free software; you can redistribute it and/or modify
it under the terms of the GNU... |
/*********************************************************************
* Filename: base64.c
* Author: <NAME> (brad AT b<EMAIL>)
* Copyright:
* Disclaimer: This code is presented "as is" without any guarantees.
* Details: Implementation of the Base64 encoding algorithm.
*****************************************... |
/*
* gtkcfg.c - the GTK-specific parts of the PuTTY configuration
* box.
*/
#include <assert.h>
#include <stdlib.h>
#include "putty.h"
#include "dialog.h"
#include "storage.h"
static void about_handler(union control *ctrl, dlgparam *dlg,
void *data, int event)
{
if (ev... |
//This is actually some basic code, i do not expect anyone to like it, i'm the first to say that's messed up.
//The fact there is that rxtools doesn't really need any specific console code for now, so i've written something simple.
#include <stdlib.h>
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include ... |
/*
* Copyright 2020-2021 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/l... |
/*
* This example shows how to publish messages from outside of the Mosquitto network loop.
*/
#include <stdio.h>
#include <string.h>
#include "mqtt.h"
#define MAX_TOPICS 10
static const char *TOPICS[MAX_TOPICS];
static size_t NUM_TOPICS;
static struct mosquitto *mosq;
/* Callback called when the client knows ... |
#include "Default.h"
#include "guiConsole.h"
#include "NeoVideo.h"
#include "NeoConfig.h"
#define MAKE_CC(a, b, c, d) (((a) << 24) | ((b) << 16) | ((c) << 8) | (d))
#define CONFIGFILE_MAGIC 0xc07f16f1
typedef struct _TConfigFileHeader {
u32 magic;
u32 chunkCount;
} TConfigFileHeader;
typedef struct _TChunkHeader ... |
/**
* @file AVL.c
* @author Justice
* @brief How To Code an AVL
* @version 0.1
* @date 2021-03-23
* @copyright Copyright (c) 2021
*/
//Preprocessor Directives
#include <stdio.h>
#include <stdlib.h>
#include <stdbool.h>
#define IMPOSSIBLE 999999
//Structs
typedef struct Node Node;
struct Node {
int value;
... |
/*
* Copyright 2011 Freescale Semiconductor, Inc.
*
* 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 the Free Software Foundation; either vers... |
/**
* \file timeout.c
*
* \brief Timeout service for XMEGA
*
* Copyright (C) 2011-2014 Atmel Corporation. All rights reserved.
*
* \asf_license_start
*
* \page License
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions... |
/*
* MIT License
* Copyright 2005-2016 Buaabyl
*
* (http://opensource.org/licenses/MIT)
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without... |
/* ====================================================================
* 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 t... |
/******************************************************************************
* File Name : DISCpinconfig.c
* Date First Issued : 02/29/2012
* Board : STM32 Discovery
* Description : Configure gpio port pins used, but not used for (hardware) functions
************************************... |
/* $OpenBSD: ctu.c,v 1.4 2003/08/15 23:16:30 deraadt Exp $ */
/* $NetBSD: ctu.c,v 1.3 2000/05/20 13:30:03 ragge Exp $ */
/*
* Copyright (c) 1996 Ludd, University of Lule}, Sweden.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided th... |
#include <string.h>
#include "py/obj.h"
#include "py/mpstate.h"
#include "py/mphal.h"
#include "extmod/misc.h"
#include "lib/utils/pyexec.h"
#include "mphalport.h"
#include "uarths.h"
#include "encoding.h"
#include "sysctl.h"
#include "sleep.h"
#include "machine_uart.h"
#include "printf.h"
#if MICROPY_PY_THREAD
#in... |
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <unistd.h>
#include "mall.h"
#define PAGEALIGN(real) (real % PAGESZ) ? real / PAGESZ + 1 : real / PAGESZ
#define WORDALIGN(real) ((real + WORDSZ - 1) & ~(WORDSZ - 1))
void* mmalloc(const size_t bytes) {
size_t real = WORDALIGN(bytes);
NODE... |
#include <string.h>
#include <stdarg.h>
#include <stdio.h>
#include "at.h"
#define AT_LOG printf
#ifndef AT_LOG
#define AT_LOG(...)
#endif
static const char *AT_RESPONSES[AT_RSP_num] = {
[AT_RSP_OK] = "OK",
[AT_RSP_CONNECT] = "CONNECT",
[AT_RSP_RING] = "RING",
[AT_R... |
// SPDX-License-Identifier: GPL-2.0
/*
* Copyright (C) 2017 Etnaviv Project
*/
#include <linux/moduleparam.h>
#include "etnaviv_drv.h"
#include "etnaviv_dump.h"
#include "etnaviv_gem.h"
#include "etnaviv_gpu.h"
#include "etnaviv_sched.h"
#include "state.xml.h"
static int etnaviv_job_hang_limit = 0;
module_param_na... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "../Headers/Tree.h"
typedef struct node Node;
struct tree {
Node * root;
};
struct node {
int value;
int balancing_factor;
int height;
Node * left;
Node * right;
};
Tree * create() {
Tree * tree = malloc(sizeof(Tree));
... |
/* #############################################################
* # #
* # pSAT - SLS SAT Solver #
* # #
* ########################################################... |
/*
* pty_update_utmp: Update or create a utmp entry
*
* Copyright 1995 by the Massachusetts Institute of Technology.
*
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for any purpose and without fee is hereby
* granted, provided that the above copyright notice appear ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.