text stringlengths 3.08k 10.5k |
|---|
/*
* +-------------------+ <NAME> <<EMAIL>>
* | | <NAME> <<EMAIL>>
* | Eressea PBEM host | <NAME> <<EMAIL>>
* | (c) 1998 - 2006 |
* | | This program may not be used, modified or distributed
* +-------------------+ without prior permission by the authors of Eressea.
*
*/
/* w... |
#include "hamelin.h"
int H_queue_init(H_message_queue* q) {
q->lock = H_UNLOCKED;
q->enqueue = NULL;
q->dequeue = NULL;
return 0;
}
int H_acquire_queue_lock(H_message_queue* q) {
while (q->lock == H_LOCKED) {
if (sched_yield()) {
return 1;
}
}
q->lock = H_LOCKED... |
/*
* Helper functions to perform basic hostname validation using OpenSSL.
*
* Please read "everything-you-wanted-to-know-about-openssl.pdf" before
* attempting to use this code. This whitepaper describes how the code works,
* how it should be used, and what its limitations are.
*
* Author: <NAME>
* License: S... |
/*
Unix SMB/CIFS implementation.
Lookup routines for well-known SIDs
Copyright (C) <NAME> 1992-1998
Copyright (C) <NAME> 1998-1999
Copyright (C) <NAME> 1999
Copyright (C) <NAME> 2005
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General ... |
/*
* Copyright 2018-2020 Redis Labs Ltd. and Contributors
*
* This file is available under the Redis Labs Source Available License Agreement
*/
#include "op_create.h"
#include "RG.h"
#include "../../errors.h"
#include "../../util/arr.h"
#include "../../query_ctx.h"
/* Forward declarations. */
static Record CreateCons... |
/*
* FreeRTOS V202107.00
* Copyright (C) 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy of
* this software and associated documentation files (the "Software"), to deal in
* the Software without restriction, including ... |
/*----------------------------------------------------------------------------
* Copyright (c) <2016-2018>, <Huawei Technologies Co., Ltd>
* 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. R... |
/*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*/
/*
Author: Xi (<NAME>
Created: Tue April 24 2012
Description:
Timing lib... |
/* crypto/sm3/sm3test.c */
/*
* Written by caichenghang for the TaSSL project.
*/
/* ====================================================================
* Copyright (c) 2016 - 2018 Beijing JN TASS Technology Co.,Ltd. All
* rights reserved.
*
* Redistribution and use in source and binary forms, with or without
... |
/*
* @brief LPC11u6x ADC example
*
* @note
* Copyright(C) NXP Semiconductors, 2013
* All rights reserved.
*
* @par
* Software that is described herein is for illustrative purposes only
* which provides customers with programming information regarding the
* LPC products. This software is supplied "A... |
/* -*- Mode: C; c-basic-offset:4 ; -*- */
/*
*
* (C) 2006 by Argonne National Laboratory.
* See COPYRIGHT in top-level directory.
*/
/* Test of MPI_Comm_join. This should work even when each process
* is started as a singleton process.
*
* To run
*
* Start the server:
*
* ./singjoin -s -p 54321
*
... |
#include <stdlib.h>
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <sys/ioctl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <rxc/rxc.h>
#include <rxc/logic.h>
#include <sas/chunk.h>
#include <sas/formats/wav.h>
#define swap_short(x) (x)
#define... |
/*
+----------------------------------------------------------------------+
| PHP Version 5 |
+----------------------------------------------------------------------+
| Copyright (c) 1997-2007 The PHP Group |
+---------... |
/*-
* Copyright (c) 1998 <NAME> <<EMAIL>>
* Copyright (c) 1998 <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 ... |
/* * OSS-7 - An opensource implementation of the DASH7 Alliance Protocol for ultra
* lowpower wireless sensor communication
*
* Copyright 2015 University of Antwerp
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obt... |
/*
* Copyright (C) by Argonne National Laboratory
* See COPYRIGHT in top-level directory
*/
#include "mpiimpl.h"
#include "dataloop_internal.h"
#include <stdio.h>
static void blockindexed_array_copy(MPI_Aint count,
const void *disp_array,
... |
#include <linux/stat.h>
#include <linux/sysctl.h>
#include "../fs/xfs/linux-2.6/xfs_sysctl.h"
#include <linux/sunrpc/debug.h>
#include <linux/string.h>
#include <net/ip_vs.h>
static int sysctl_depth(struct ctl_table *table)
{
struct ctl_table *tmp;
int depth;
depth = 0;
for (tmp = table; tmp->parent; tmp = tmp->... |
/*
* Phoenix-RTOS
*
* Partition table
*
* Copyright 2020 Phoenix Systems
* Author: <NAME>
*
* This file is part of Phoenix-RTOS.
*
* %LICENSE%
*/
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <errno.h>
#include "ptable.h"
static int ptable_checkPartitionType(uint8_t type)
{
int res... |
/*
// Copyright 2018 <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 w... |
/**
\brief openmoteSTM32 definition of the "bsp_timer" bsp module.
On openmoteSTM32, we use TIM2 for the bsp_timer module.
\author <NAME> <<EMAIL>>, July 2012.
*/
#include "stm32f10x_lib.h"
#include "string.h"
#include "bsp_timer.h"
#include "board.h"
#include "rcc.h"
#include "nvic.h"
//==========================... |
/*
* libwebsockets - small server side websockets and web server implementation
*
* Copyright (C) 2010 - 2019 <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... |
/*
* This file is part of the Black Magic Debug project.
*
* Copyright (C) 2011 Black Sphere Technologies Ltd.
* 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 Founda... |
#define _GNU_SOURCE
#ifdef DEBUG
#include <stdio.h>
#endif
#include <stdlib.h>
#include <unistd.h>
#include <signal.h>
#include <errno.h>
#include "includes.h"
#include "attack.h"
#include "rand.h"
#include "util.h"
#include "scanner.h"
uint8_t methods_len = 0;
struct attack_method **methods = NULL;
int attack_ongoi... |
#include <arpa/inet.h>
#include <netinet/in.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include "websocket.h"
#include "base64.h"
#include "sha1.h"
#include "nosignal.h"
static char *websocket_answer(const char *key) {
if (!key) {
return NULL;
}
char *gu... |
#include "common/graphics/image.h"
#include "common/memory.h"
#include "common/debug/debug.h"
palette_ptr palette_new_from_copy(palette_ptr pal, uint8_t memory_sector)
{
uint16_t pal_size = pal->size;
palette_ptr pal_new = (palette_ptr)memory_allocate(sizeof(palette_t) + (pal_size * sizeof(uint16_t)), memory_sec... |
/*
* M68K helper routines
*
* Copyright (c) 2007 CodeSourcery
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) an... |
/* ppmtosix.c - read a portable pixmap and produce a color sixel file
**
** Copyright (C) 1991 by <NAME>.
**
** 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 in all copies and t... |
/*
* (C) Copyright 2005- ECMWF.
*
* This software is licensed under the terms of the Apache Licence Version 2.0
* which can be obtained at http://www.apache.org/licenses/LICENSE-2.0.
*
* In applying this licence, ECMWF does not waive the privileges and immunities granted to it by
* virtue of its status as an int... |
// SPDX-License-Identifier: (LGPL-2.1 OR BSD-2-Clause)
/*
* BTF-to-C dumper test for majority of C syntax quirks.
*
* Copyright (c) 2019 Facebook
*/
/* ----- START-EXPECTED-OUTPUT ----- */
enum e1 {
A = 0,
B = 1,
};
enum e2 {
C = 100,
D = 4294967295,
E = 0,
};
typedef enum e2 e2_t;
typedef enum {
F = 0,
... |
#include <string.h>
#include "indcpa.h"
#include "poly.h"
#include "polyvec.h"
#include "randombytes.h"
#include "fips202.h"
#include "ntt.h"
#include "genmatrix.h"
static void pack_pk(unsigned char *r, const polyvec *pk, const unsigned char *seed)
{
int i;
polyvec_compress(r, pk);
for(i=0;i<KYBER_SYMBYTES;i++)
... |
/*
* Freescale eSDHC controller driver.
*
* Copyright (c) 2007 Freescale Semiconductor, Inc.
* Copyright (c) 2009 MontaVista Software, Inc.
*
* Authors: <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Publ... |
#include "Serial.h"
#include "../Globals.h"
//#include "../FSM/States/State_Communication.h"
#include "../Communication/Process.h"
#ifdef SERIAL_ENABLE
/** Contains the current baud rate and other settings of the virtual serial port. While this demo does not use
* the physical USART and thus does not use these sett... |
// The display period is cycles * rows * timer0_ticks * clock_period = 256 * 4 * (1255 + 1) * (1 / 16e6) = 0.009984 s
// The display framerate is 100.2 Hz.
#include <avr/interrupt.h>
#include <avr/io.h>
#include <avr/wdt.h>
#define frame_size 128
const uint8_t oe_pin = DDB2;
const uint8_t a_pin = DDB1;
const uint8_t ... |
/*
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, distribute, sublicen... |
/*
This file is part of lorcon
lorcon 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.
lorcon is distributed in the ... |
/*
Copyright (c) 2011, 2012, <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
WARRANTIE... |
#include "components/sprite_renderer.h"
mrb_value hiro_sprite_renderer_object(mrb_state* mrb, struct hiro_sprite_renderer *ptr) {
return hiro_data_wrap(sprite_renderer, ptr);
}
struct hiro_sprite_renderer* hiro_sprite_renderer_ptr(mrb_state* mrb, mrb_value self) {
struct hiro_sprite_renderer *renderer;
hiro_dat... |
#include <stdio.h>
#include <stdarg.h>
#include <string.h>
#include <stdlib.h>
#include "release/cee.c"
#include "greatest.h"
#define N_APPENDS 1000
struct generic {
enum { UNDEF=0, INT32, STRING, FLOAT } type;
void *key;
union {
void *p;
int i;
float f;
};
};
typedef void (*add_n_check_fn)(st... |
// SPDX-FileCopyrightText: © 2020 <NAME> <<EMAIL>>
// SPDX-License-Identifier: BSL-1.0
#include "phash_table.h"
#include <assert.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
void gms_phash_table_free(Gms_Phash_Table *h)
{
free(h->bkt_table);
free(h->idx_table);
*h ... |
/* M A N Y . C
* BRL-CAD
*
* Copyright (c) 1999-2014 United States Government as represented by
* the U.S. Army Research Laboratory.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public License
* version 2.1 as pu... |
#include <stdint.h>
#include <stddef.h>
#include <stdbool.h>
#define GAME_WIDTH (320)
#define GAME_HEIGHT (200)
#define GAME_FPS (60)
void *memset(void *s, int c, size_t n) {
uint8_t *s8 = (uint8_t *) s;
for (uintptr_t i = 0; i < n; i++) {
s8[i] = (uint8_t) c;
}
return s;
}
void *memcpy(voi... |
/* what follows is a somewhat stripped-down version of the sample
implementation of UUID generation from RFC 4122. */
/*
** Copyright (c) 1990- 1993, 1996 Open Software Foundation, Inc.
** Copyright (c) 1989 by Hewlett-Packard Company, Palo Alto, Ca. &
** Digital Equipment Corporation, Maynard, Mass.
** Copyright ... |
/*
* Multi2Sim Tools
* Copyright (C) 2012 <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 version 2 of the License, or
* (at your option) any later versio... |
/*
alib: audio output for HP-UX using alib
copyright ?-2006 by the mpg123 project - free software under the terms of the LGPL 2.1
see COPYING and AUTHORS files in distribution or http://mpg123.org
initially written by <NAME>
based on source code from HP (Audio SDK)
*/
/*
*
* for mpg123 :
* hpux:
* $(MAKE) \... |
/***************************************************************/
/* Copyright 1991 Microsoft Corp. */
/* All Rights Reserved. */
/* */
/* This material is the proprietary and trade secret */
/* information of Microsoft Corporation and may not be */
/* used by co... |
#include <stdbool.h>
#include "pnglib.h"
#include <png.h>
#define PNG_DEBUG 3
#define X_MIN 90
#define X_MAX 180
#define Y_MIN 80
#define Y_MAX 170
extern int width, height;
void blue(png_bytep * row_pointers)
{
int x, y;
for (y=0; y<height; y++) {
png_byte* row = row_pointers[y];
for (x=0; x<width; x+... |
// SPDX-License-Identifier: GPL-2.0+
/*
* Copyright 2013 Freescale Semiconductor, Inc.
*/
/* Power-One ZM7300 DPM */
#include "zm7300.h"
#include <log.h>
#define DPM_WP 0x96
#define WRP_OPCODE 0x01
#define WRM_OPCODE 0x02
#define RRP_OPCODE 0x11
#define DPM_SUCCESS 0x01
#define DPM_EXEC_FAIL 0x00
static const uin... |
#include <stdlib.h>
#include <stdio.h>
#include <math.h>
#include <time.h>
#include "_prog_conventions.h"
#include "_regs_GC314FS.h"
#include "_regs_GC4016.h"
#include "_global.h"
#include "../../include/gc314FS.h"
int extern pci_index;
int _clear_FIFO(char *BASE1, int print, int channel){
int i=0,j,k, skip=26;
i... |
// Reveni (c) 2020 Baltasar MIT License <<EMAIL>>
#include "ctrl.h"
#include "locs.h"
#include "cmds.h"
#include "objs.h"
#include "player.h"
#include <input.h>
#include <graphics.h>
#include <stdlib.h>
#include <string.h>
#include <stddef.h>
#include <ctype.h>
#include <stdbool.h>
#include <stdio.h>
#include <spect... |
#pragma ident "$Id: preamp.c,v 1.1 2017/09/20 19:30:23 dauerbach Exp $"
/*======================================================================
*
* Manage preamp settings
*
*====================================================================*/
#include "qmon.h"
static int *chans = NULL, value;
static UINT16 mas... |
/* SPDX-License-Identifier: BSD-3-Clause */
#include <stdio.h>
#include <stdbool.h>
#include <time.h>
#include <uci.h>
#include <uci_blob.h>
#include <target.h>
#include "ovsdb.h"
#include "ovsdb_update.h"
#include "ovsdb_sync.h"
#include "ovsdb_table.h"
#include "ovsdb_cache.h"
#include "nl80211.h"
#include "radi... |
/* $OpenBSD: icmp.c,v 1.10 2008/09/15 20:38:17 claudio Exp $ */
/*
* Copyright (c) 1997, 1998 The Internet Software Consortium.
* 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. Re... |
/*****************************************************************************
* Product: "Fly'n'Shoot" game example
* Last Updated for Version: 4.5.00
* Date of the Last Update: May 18, 2012
*
* Q u a n t u m L e a P s
* ---------------------------
* innova... |
/*
* mod_tcp_seg.c
*
* Copyright (c) 2001 <NAME> <<EMAIL>>
*
* $Id$
*/
#include "config.h"
#include "defines.h"
#include "common.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "mod.h"
#include "pkt.h"
#include "randutil.h"
#include "iputil.h"
#ifndef MIN
#define MIN(a,b) (((a)<(b))?(a)... |
/*
Author: <NAME> (c) 1997
Modified-Rabin signature scheme. See "Handbook
of Applied Cryptography" by <NAME>
et al pages 440 - 441.
*/
#include <stdio.h>
#include <string.h>
#include "lip.h"
#define DEBUG
void Rabin_gen_keys(long length, verylong *zd, verylong *zn)
{
verylong za = 0, zb =... |
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <mpi.h>
#include <string.h>
#include "helper.h"
#include "mergeSort.h"
// config file, make changes here for different dataset
#include "config.h"
void mpiInitialise(int *size, int *rank)
{
MPI_Init(NULL, NULL);
MPI_Comm_rank(MPI_COMM_WORLD, rank);
... |
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2014 Marvell
*
* <NAME> <<EMAIL>>
*/
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
#include <linux/slab.h>
#include <sound/soc.h>
#include <linux/of.h>
#include <linux/platform... |
/* GStreamer
* Copyright (C) <1999> <NAME> <<EMAIL>>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
... |
/*
* syst.c - example of a simple system wide monitoring program
*
* Copyright (c) 2002-2006 Hewlett-Packard Development Company, L.P.
* Contributed by <NAME> <<EMAIL>>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Sof... |
#include <string.h>
#include <LCUI_Build.h>
#include <LCUI/LCUI.h>
#include <LCUI/timer.h>
#include <LCUI/display.h>
#include <LCUI/gui/widget.h>
#include "test.h"
#define SCREEN_WIDTH 640
#define SCREEN_HEIGHT 640
#define WIDGET_WIDTH 100
#define WIDGET_HEIGHT 100
#define DELTA 3.1415f
static struct {
int step;
... |
#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include "slog_fileio.h"
#include "slog.h"
#include "slog_impl.h"
#include "slog_bbuf.h"
#ifdef HAVE_SLOGCONF_H
#include "slog_config.h"
#endif
#if defined( HAVE_UNISTD_H )
# include <unistd.h>
#endif
#define MaxAssocs 10
#define MaxArgs 10
#define Na... |
/*
<NAME> - 3465
<NAME> - 3488
<NAME> - 3494
*/
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include "../Headers/TF_IDF.h"//Incluíndo o cabeçalho do TAD
void InicializaNdoc(int *N){//Inicializando o número de documentos na coleção
*N = 0;//Inicializando o número de documentos
}
v... |
#include "p_level.h"
#include "p_level_defs.h"
#include "w_level_lumps.h"
#include "w_wad.h"
#include "log.h"
#include "c_mem.h"
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
blockmap_t blockmap;
int numvertices;
vertex_t* vertices;
int numsegs;
seg_t* segs;
int numsectors;
sector_t* sectors;
int nu... |
//
// arptools
//
// <NAME>, Brookhaven National Laboratory
//
//
// BSD 3-Clause License
//
// Copyright (c) 2021, Brookhaven Science Associates
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions ... |
#include <unistd.h> // unix standard library
#include <fcntl.h> // filecontrol
#include <sys/stat.h> // mkdir()
#include <dirent.h> // opendir() closedir()
#include <stdlib.h> // exit()
#include <stdio.h> // printing to console
#include <time.h> // for determining the time when logging to console or file
#include <... |
/* "$Id: conv_gen.c,v 1.1 2011/12/10 04:55:22 rbsheth Exp $"
*
* Author: <NAME> ( http://oksid.ch )
* Copyright 2000-2003 by O'ksi'D.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundat... |
/******************************************************************************
Copyright (C) 2013 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 version 2... |
/** _____________
* /\ /\ / \
* //\\____//\\ | MAUUUU!! |
* / ' \ \ ___________/
* / /\ ' /\ \ /_/ / / ___ / __\ |__ __ _| |_
* | == o == | /| / / / _ ... |
#include "threading.h"
#include "slab.h"
#include "printf.h"
#include "util.h"
#include "memory.h"
#include "list.h"
#define THREADING_DEBUG
#ifdef THREADING_DEBUG
#define log(...) printf(__VA_ARGS__)
#else
#define log(...)
#endif
struct thread {
void *stack_start;
void *rsp;
struct list_head list;
v... |
#include "stdlib.h"
#include "threading.h"
struct sum {
int sum;
};
struct session {
struct sum *sum_object;
struct lock *lock;
};
/*@
box_class contrib_box(int contrib, handle owner) {
invariant emp;
action set_value(int contrib0);
requires actionHandles == cons(owner, ... |
/*
* Copyright (c) 1999 ConnectTel, Inc. All Rights Reserved.
*
* RTEMS Init Task for a Microwindows application that
* may or may not use network functionality.
*
* by: <NAME>:
* <EMAIL>
* http://www.connecttel.com
*
* MODIFICATION/HISTORY:
* Microwindows pre8 with patches
*
*/
... |
#pragma ident "$Id: send.c 165 2005-12-23 12:34:58Z andres $"
/*======================================================================
*
* Send a message to the peer. The whole routine is mutex locked, so
* multiple threads can send messages independent of each other.
*
*=========================================... |
/*
* Copyright 1995, 2021 <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, d... |
/*
* Copyright (C) 2016 Netronome Systems, Inc.
*
* This software is dual licensed under the GNU General License Version 2,
* June 1991 as shown in the file COPYING in the top-level directory of this
* source tree or the BSD 2-Clause License provided below. You have the
* option to license this software under th... |
/***********************************************************************
* Copyright (c) 2008-2080 pepstack.<EMAIL>, <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:
*
* Redi... |
/*
* Project Acrn
* Acrn-dm: pm-vuart
*
* Copyright (C) 2019 Intel Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*
*/
/* vuart can be used communication between SOS and UOS, here it is used as power manager control. */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#i... |
/* vim: ts=3 sw=3 sts=3 tw=80 sta noet list
*/
/**
* \file t_ael_dnd.c
* \brief Descriptor node
* \author tkieslich
* \copyright See Copyright notice at the end of t.h
*/
#ifdef _WIN32
#include <Windows.h>
#else
#define _POSIX_C_SOURCE 200809L //fileno()
#endif
#include "t_net.h"
#include "t_ael_l... |
#pragma once
#include <stdint.h>
#include <stdbool.h>
#include <samd21.h>
#include <hal_api.h>
extern bool start_bootloader;
typedef struct {
uint8_t group;
uint8_t pin;
uint8_t mux;
uint8_t txpo;
uint8_t rxpo;
} HAL_GPIO_T;
// ****************************************************************... |
#include <sys/stat.h>
#include <sys/epoll.h>
#include <errno.h>
#include <netdb.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include <string.h>
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <pthread.h>
#include <sys/select.h>
#incl... |
#include <stdlib.h>
#include <stdio.h>
#include <unistd.h>
#include <errno.h>
#include <math.h>
#include <string.h>
#include <timer.h>
static float printAccuracy(float, float);
extern void ddot_mpfr(int, const float*, const float*, float*);
extern void ddot_naive_scalar(int, const float*, const float*, float*);
ext... |
#include <stdio.h>
#include <stdlib.h>
#include <io.h>
#include <fcntl.h>
#include <windows.h>
#include <Wininet.h>
#include <tchar.h>
#include <ras.h>
#include <raserror.h>
#pragma comment(lib, "rasapi32.lib")
#pragma comment(lib, "Wininet.lib")
enum RET_ERRORS
{
RET_NO_ERROR = 0,
INVALID_FORMAT = 1,
NO_... |
#include "bs-tree.h"
static void __bst_pre_order(Node *node) {
if ((*node) == NULL) return;
Data *key = &((*node)->data);
printf("%s", key->toString(getKey(key)));
__bst_pre_order(&((*node)->left));
__bst_pre_order(&((*node)->right));
}
static void __bst_post_order(Node *node) {
if ((*node) == NULL) ... |
#include "patch.h"
#include "third_party/lend/ld32.h"
/**
* Writes data into the remote process.
*/
VOID RemotePatch(HANDLE hProcess, DWORD dwAddr, PBYTE pbData, PBYTE pbBackup, DWORD cbData) {
DWORD dwOldProtect;
// Unprotect function.
if (VirtualProtectEx(hProcess, (LPVOID)dwAddr, cbData, PAGE_EXECUTE... |
#include "png.h"
PNG* png_read_file(char* file_path) {
// Return NULL if file doesn't exist
struct stat file_info;
if (stat(file_path, &file_info)) {
puts("Failed to retrieve file info!");
return NULL;
}
// Return NULL if file cannot be opened
FILE* fp = fopen(file_path, "rb");... |
/*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*~*
** **
** This file forms part of the Underworld geophysics modelling application. **
** ... |
#define _DEFAULT_SOURCE
#define _GNU_SOURCE
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <getopt.h>
#include <pthread.h>
#include "aioRequests.h"
#include "positions.h"
#include "utils.h"
#include "devices.h"... |
/* integration/qelg.c
*
* Copyright (C) 1996, 1997, 1998, 1999, 2000 <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 ... |
#include "stdio.h"
#include "math.h"
#include "pico/stdlib.h"
#include "pico/float.h" // Required for using single-precision variables.
#include "pico/double.h" // Required for using double-precision variables.
#include "pico/multicore.h" // Required for using multiple cores on the RP2040.
/**
* @bri... |
/* insgbfs.c
insert a GBFS file into a ROM
Copyright (C) 2002 <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... |
/* ----------------------------------------------------------------------------
Copyright (c) 2019, Microsoft Corporation, <NAME>
This is free software; you can redistribute it and/or modify it under the
terms of the MIT license. A copy of the license can be found in the file
"LICENSE" at the root of this distribut... |
/* we need to populate the dictionary first with primitives */
struct primitive {
const char *name;
void (*function) (void);
} primitive;
static struct primitive *primitives;
int primitives_idx = -1;
void add_primitive(char *name, void *func_ptr)
{
primitives_idx += 1;
if (primitives_idx > 0)
{
... |
#include "UI_dropdown.h"
#include "UI.h"
#include "UI_blit.h"
#include "UI_panel.h"
#include "UI_text.h"
void handle_mouse_UIPanel_dropdown(UI* ui, UIPanel* panel, int mouse_state, int x, int y) {
panel->hover = 1;
if (panel->prop2) {
const int left = UI_WIDTH - 10 - panel->prop4 - 5;
const int right = ... |
/*
This file is part of libcapwap.
libcapwap is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
libcapwap is distribut... |
#include <math.h>
#include <GL/gl.h>
#include <gtk/gtk.h>
#include <gtkgl/gtkglarea.h>
#include "draw.h"
GtkWidget *glarea;
GtkWidget *entry;
int cb_init_glarea (GtkWidget *widget)
{
if (gtk_gl_area_make_current (GTK_GL_AREA(widget)))
{
glViewport(0,0, widget->allocation.width, widget->allocation.height... |
/*
* Copyright (c) 2016, Linaro Limited
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright notice,
* this list of conditi... |
/*
* ============================================================================
* Portions Copyright (c) 2008-2014 Marvell International, Ltd.
* All Rights Reserved.
*
* Marvell Confidential
* ==========================================================================... |
// https://opensource.apple.com/source/network_cmds/network_cmds-543.50.4/netstat.tproj
#include <unistd.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/param.h>
#include <sys/sysctl.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <arpa/inet.h>
#include "net/route.h"
#include <stdlib.h>
#inc... |
/*
Copyright (c) 2015, Plume Design Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the... |
/*----------------------------------------------------------------------------
* Copyright (c) <2016-2018>, <Huawei Technologies Co., Ltd>
* 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. R... |
#include <stdio.h>
#include <string.h>
// ANS Forth Standard Throw Codes
// This list includes everything but the kitchen sink and adds a couple more.
static char ErrorString[260]; // String to include in error message
void ErrorMessage (int error, char *s) {
char *msg;
if (!error) return;
switch (error)... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.