text stringlengths 3.08k 10.5k |
|---|
/*
* Generated by asn1c-0.9.29 (http://lionet.info/asn1c)
* From ASN.1 module "IEEE1609dot2"
* found in "1609dot2-schema.asn"
* `asn1c -gen-OER`
*/
#include "PsidGroupPermissions.h"
static int asn_DFL_3_set_1(int set_value, void **sptr) {
long *st = *sptr;
if(!st) {
if(!set_value) return -1; /* Not a def... |
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* or http://www.opensolar... |
/*
* Copyright (C) 2021 <NAME> <<EMAIL>>
*
* LLVM IR Code Generation for function calls
*/
#include "codegen/cg_call.h"
#include "codegen/cg_fun.h"
#include "codegen/codegen.h"
#include "codegen/fun_info.h"
#include "codegen/ir_api.h"
#include "codegen/ir_arg_info.h"
#include "codegen/type_size_info.h"
#include <as... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
#include <stdbool.h>
#include <limits.h>
#include <endian.h>
#include "sha1.h"
// Initial hash values in Big Endian.
const uint h0 = 0x67452301UL;
const uint h1 = 0xefcdab89UL;
const uint h2 = 0x98badcfeUL;
const uint h3 = 0x10325476UL;
con... |
#include <stdio.h>
#include <math.h>
#include <stdlib.h>
#include <time.h>
#define PI 3.1415926
double tri () {
int z = 0;
double ang,x,y,i;
char si,sn,sa,mo;
int c,r;
char *fortune = "",*color ="";
while(1){
scanf("%c",&sa);
if (sa == 's' || sa == 'c' || sa == 't'){
break;
}... |
#include <stdio.h>
#include <stdlib.h>
#include <stdint.h>
#include "timing.h"
#include "audioDenoise.h"
#ifdef _WIN32
#include <Windows.h>
#else
#include <unistd.h>
#endif
//采用https://github.com/mackron/dr_libs/blob/master/dr_wav.h 解码
#define DR_WAV_IMPLEMENTATION
#include "dr_wav.h"
#ifndef nullptr
#define null... |
/* $NetBSD: tx39ir.c,v 1.4 2002/01/29 18:53:17 uch Exp $ */
/*-
* Copyright (c) 2000 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by UCHIYAMA Yasushi.
*
* Redistribution and use in source and binary forms, with or without
* mod... |
/*
* Copyright 2000, International Business Machines Corporation and others.
* All Rights Reserved.
*
* This software has been released under the terms of the IBM Public
* License. For details, see the LICENSE file in the top-level source
* directory or online at http://www.openafs.org/dl/license10.html
*/
#in... |
/*
* Emuxki BeOS Driver for Creative Labs SBLive!/Audigy series
*
* Copyright (c) 2002, <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:
*
* - Redistributions of source c... |
/* $XConsortium: meroi.c,v 1.4 94/04/17 20:34:23 rws Exp $ */
/* $XFree86: xc/programs/Xserver/XIE/mixie/export/meroi.c,v 3.1 1996/08/20 13:16:20 dawes Exp $ */
/**** module meroi.c ****/
/******************************************************************************
Copyright (c) 1993, 1994 X Consortium
Permission ... |
/* tailor.h -- target dependent definitions
* Copyright (C) 1992-1993 <NAME>.
* This is free software; you can redistribute it and/or modify it under the
* terms of the GNU General Public License, see the file COPYING.
*/
/* The target dependent definitions should be defined here only.
* The target dependent func... |
/*
* Copyright 2015 Mentor Graphics Corporation.
*
* 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; version 2 of the
* License.
*
* This program is distributed in the hope that it will be... |
/*
MIT License
Copyright (c) 2018 <NAME>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distrib... |
/*
* Copyright (c) 2014-2018 Cesanta Software Limited
* 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
*
* ... |
#pragma once
#define MAX_OSD_CHARMAP_SIZE 16384
#define OSD_SCREEN_BUFFER_SIZE 480 //max screen size in characters
#define OSD_EMPTY_CHAR ' ' //make sure these two don't match
#define OSD_EMPTY_CHAR_SHADOW_START 0 //make sure these two don't match
#define SCREEN_SIZE_PAL 480
#define SCREEN_SIZE_NTSC ... |
// SPDX-License-Identifier: GPL-2.0+
/*
* (C) Copyright 2014 Google, Inc
*/
#include <common.h>
#include <command.h>
#include <log.h>
#include <asm/msr.h>
#include <asm/mp.h>
#include <asm/mtrr.h>
static const char *const mtrr_type_name[MTRR_TYPE_COUNT] = {
"Uncacheable",
"Combine",
"2",
"3",
"Through",
"Prot... |
#include <stdbool.h>
#include "enums.c"
#include "opcode_table.c"
// #ifndef DECODER
#define DECODER
void decode(int* instructions, int bytes);
bool isSIBPresent(int mod, int rm);
int getDisSize(int mod, int rm, int base);
int getNextByte(int* instructions, int current_byte, int total_bytes);
bool isPrefix(int byte);... |
/******************************************************************************
* File Name: server.c
* Author: 公众号: Linux云计算网络
*****************************************************************************/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <errno.h>
#include <s... |
/* uvklib.c read uko5v.dat, uko9v.dat ... ukm2i.dat
* write flux to flam.uvklib, and rms to rms.uvklib
* lamA (1150:25000:5) in row 0, rows 1-131 stellar spectra
*
* compile with gcc -lm -lc -o uvklib uvklib.c (type make in this directory)
* and run to write the files flam.uvklib and rms.uvklib
*/
#include </usr/... |
/* This function generates a LIC image using Fast LIC method and a given kernel filter */
#include "math.h"
#include "float.h"
#include "mex.h" /* --This one is required */
struct TPoint{
int x,y;
};
int maximumOf(int a, int b)
{
if (a > b) {
return a;
}
else
return b;
}
int minimum... |
/*
* Copyright (c) 2012-2013 Los Alamos National Security, Inc. All rights reserved.
* $COPYRIGHT$
*
* Additional copyrights may follow
*
* $HEADER$
*
*/
#include "opal_config.h"
#include "opal/constants.h"
#include <string.h>
#include <sys/types.h>
#ifdef HAVE_LIMITS_H
#include <limits.h>
#endif
#include <... |
#include "adc.h"
#include <stm/STM32L0xx_HAL_Driver/Inc/stm32l0xx_hal.h>
#include "log.h"
#define VDDA_VREFINT_CAL ((uint32_t)3000)
/* Internal voltage reference, parameter VREFINT_CAL*/
#define VREFINT_CAL ((uint16_t *)((uint32_t)0x1FF80078))
/* Internal temperature sensor: constants data used for indicative values... |
/* -*- mode: C -*- */
/* vim:set ts=2 sw=2 sts=2 et: */
/*
IGraph library.
Copyright (C) 2006-2012 <NAME> <<EMAIL>>
334 Harvard st, Cambridge MA, 02139 USA
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
t... |
/*
* Copyright (C) 2007,2012 <NAME> <<EMAIL>>.
*
* Xenomai 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.
*
* Xenomai is distr... |
/* edit.c
* <NAME>
*
* Editing of modes for HIPStool. Shouldn't affect current function.
*/
#include "hipstool.h"
static char string[100];
static char null = '\0';
void
log_edit()
{
int x;
char cmd[10];
strcpy(string, getstring(io.command));
if(strlen(string) == 0) {
display_logged_actions(DR... |
/*
* dht22.c
* A library for Grove - Temperature and Humidity Sensor Pro at RP
*
* Copyright (c) 2012 seeed technology inc.
* Website : www.seeed.cc
* Author : <EMAIL>, <EMAIL>
* Create Time:
* Change Log :
*
* The MIT License (MIT)
*
* Permission is hereby granted, free of charge, to any person obta... |
/*
* Copyright (c) 2009-2011 The Trustees of Indiana University.
* All rights reserved.
*
* Copyright (c) 2010 Cisco Systems, Inc. All rights reserved.
*
* Copyright (c) 2004-2006 The University of Tennessee and The University
* of Tennessee Research Foundati... |
/* GStreamer
* Copyright (C) 2008 <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.
*
*... |
/*
* Copyright (c) 2010 <NAME>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and ... |
/* $Header$
*
* Copyright (c) 1989, <NAME>
*
* You may distribute under the terms of the GNU General Public License
* as specified in the README file that comes with the perl 3.0 kit.
*
* $Log$
* Revision 1.3 2004/09/01 14:33:24 criswell
* Migrating test suite out of the source tree.
*
* Revision ... |
/*
$Id$
Copyright 1989-2014 <NAME>
This file is part of PIPS.
PIPS 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
any later version.
PIPS is distributed in... |
/*
* File bv_terminal.c
* Date 28.12.2021
*/
#include "bv_terminal.h"
#include "bv_frame.h"
#include "bv_config.h"
#include "bv_types.h"
#include "bv_hwdriver.h"
#include "frame_tab1.h"
#include <string.h>
#include <stdio.h>
terminal_t g_terminal = { 0 };
void BVT_Magic()
{
// Keyboard
//BVK_H... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "main.h"
#include "goodLinkedList.h"
#include "filter.h"
void fixFilter(char* _filter){
int i;
int _cachedStrlen = strlen(_filter);
for (i=0;i<_cachedStrlen;++i){
switch(_filter[i]){
case '*':
_filter[i]=FILTER_WILDCARD;
break;
case ... |
#include <stdlib.h>
#include <stdio.h>
#include "talloc.h"
#include "linkedlist.h"
#include <string.h>
#include <assert.h>
#include "evalLet.h"
#include "evalIf.h"
#include "lookUpSymbol.h"
#include "evalLet.h"
#include "errorCall.h"
#include "parser.h"
#include "interpreter.h"
#include "apply.h"
#include "evalEach.h"
... |
#include "wavesim/simulation/simulation_ard.h"
#include "fftw3.h"
#include <math.h>
#define MODES_GET(buffer) \
buffer
typedef struct partition_state_t
{
fftw_plan dct_plan;
fftw_plan idct_plan;
wsreal_t* modes;
int dims[3];
} partition_state_t;
typedef struct simulation_state_t
{
partition_s... |
/******************************************************************************
* Copyright (c) 2016, NXP Semiconductors
* Copyright (c) 2015, VVDN Technologies
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following c... |
/* *********************************************************
* make the pieces from outgroups tidy.
* ********************************************************/
#include "util.h"
#include "species.h"
struct perm_array {
int id, sid;
};
void merge_segs(struct block_list *blkhead, int id, int ss, int start, int term... |
// Copyright 2011 The Avalon Project Authors. All rights reserved.
// Use of this source code is governed by the Apache License 2.0
// that can be found in the LICENSE file.
//
// Netcat like 'plug' for unix sockets.
//
//
#include <errno.h>
#include <getopt.h>
#include <signal.h>
#include <stdarg.h>
#include <stdio.h... |
/*
* Service routines for sub process control
*/
#include "defs.h"
#include <fcntl.h>
#include <sys/wait.h>
static int userpc = 1;
int
getsig(sig)
{
return expr(0) ? shorten(expv) : sig;
}
static void
bpwait()
{
register int w;
int stat;
signal(SIGINT, SIG_IGN);
while ((w = wait(&stat)) != pid... |
// Copyright 2015 <NAME>autics Ltd.
//
// 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 t... |
/**
* Marlin 3D Printer Firmware
* Copyright (c) 2021 MarlinFirmware [https://github.com/MarlinFirmware/Marlin]
*
* Based on Sprinter and grbl.
* Copyright (c) 2011 <NAME> / <NAME>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as ... |
/*
* OpenBOR - http://www.LavaLit.com
* -----------------------------------------------------------------------
* Licensed under the BSD license, see LICENSE in OpenBOR root for details.
*
* Copyright (c) 2004 - 2011 OpenBOR Team
*/
#include <stdio.h>
#include <malloc.h>
#include <string.h>
#include <stdarg.h>
#... |
/*
* ssi.c
*
* Created on: Feb 17, 2015
* Author: Ryan
*/
#include "spi.h"
#include "inc/hw_gpio.h"
#include "inc/hw_memmap.h"
#include "inc/hw_ssi.h"
#include "inc/hw_types.h"
#include "driverlib/gpio.h"
#include "driverlib/ssi.h"
#include "driverlib/pin_map.h"
#include "driverlib/rom.h"
#include "driver... |
/* $NetBSD: pw_gensalt.c,v 1.7 2009/01/18 12:15:27 lukem Exp $ */
/*
* Copyright 1997 <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... |
/* rng/ranlux.c
*
* Copyright (C) 1996, 1997, 1998, 1999, 2000 <NAME>, <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) an... |
// Graph ADT
// Adjacency Matrix Representation ... COMP9024 18s2
#include "Graph.h"
#include "queue.h"
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
#define MAXVAL 10000
#define ENOUGH 1000000 // maximum number of edges
typedef struct GraphRep {
Edge *edges; // array of edges
int nV; // #ver... |
/*@z30.c:Symbol uses:InsertUses()@********************************************/
/* */
/* THE LOUT DOCUMENT FORMATTING SYSTEM (VERSION 3.24) */
/* COPYRIGHT (C) 1991, 2000 <NAME> */
/* ... |
/*
* Copyright (c) 2015, <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 condi... |
#include "jParser.h"
JPElement* MakeJPElement(char c, JParseElement g){
JPElement* ret = JPARSER_MALLOC(sizeof(JPElement));
ret->c = c;
ret->group = g;
ret->prev = JPE_NULL;
return ret;
}
void FreeJPElement(void* *content){
JPARSER_FREE(*((JPElement**)content));
}
JParseElement EscapeCharElement(... |
/* Editor Settings: expandtabs and use 4 spaces for indentation
* ex: set softtabstop=4 tabstop=8 expandtab shiftwidth=4: *
* -*- mode: c, c-basic-offset: 4 -*- */
/*
* Copyright © BeyondTrust Software 2004 - 2019
* All rights reserved.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you m... |
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* read.c :+: :+: :+: ... |
/*
Teem: Tools to process and visualize scientific data and images
Copyright (C) 2005 <NAME>
Copyright (C) 2004, 2003, 2002, 2001, 2000, 1999, 1998 University of Utah
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public License
(LGPL) as... |
/*******************************************************************
* COMPILAR: gcc -o pgmborde pgmborde.c libpgm.c libpbm.c libprep.c -O3 -lm
********************************************************************/
#include <version.h>
#include <float.h>
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#incl... |
// @file record_card.c
// @brief Rendering code for record life view
//
// File contains all drawing code for rendering the record lifespan
// card onto a drawing context.
//
// @author <NAME>
// @date January 20, 2016
// @bugs No known bugs
#include "card_render.h"
#include "../../utility.h"
// Drawing Constants
#de... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dirent.h>
#include "fs.h"
#include "operations.h"
#include <libgen.h>
#include <dirent.h>
#include <sys/types.h>
#include <limits.h>
#include <errno.h> // defines errno
// errno gets set by opendir() from dirent.h
#include <sys/... |
//Shell by <NAME>
//2019.03.21
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/wait.h>
#include <sys/types.h>
#include <fcntl.h>
#define INITIAL_STAT 1
#define END_STAT -1
#define BUILTIN_STAT -2
#define NO_BUILTIN_COMM -1
#define MAX_STR_SIZE 256
#define DELIMITER " \t\... |
#include "to_string.h"
#include "apdu.h"
#include "keys.h"
#include <string.h>
#define NO_CONTRACT_STRING "None"
#define NO_CONTRACT_NAME_STRING "Custom Delegate: please verify the address"
#define TEZOS_HASH_CHECKSUM_SIZE 4
void pkh_to_string(
char *const buff, size_t const buff_size,
uint8_t const hash[K... |
//kentry.c
//Kernel entry points
//<NAME> <<EMAIL>> 2021
#include "con.h"
#include "fd.h"
#include "thread.h"
#include "process.h"
#include "kassert.h"
#include "syscalls.h"
#include "libcstubs.h"
#include "hal_exit.h"
#include "px.h"
#include <errno.h>
//Called on bootstrap core before releasing other cores.
//Sho... |
/**
* This file is part of maemo-examples package
*
* This maemo code example is licensed under a MIT-style license,
* that can be found in the file called "COPYING" in the same
* directory as this file.
* Copyright (c) 2007-2008 Nokia Corporation. All rights reserved.
*/
#include <hildon/hildon-program.h>
#in... |
#include<string.h>
#include<stdio.h>
#include <R.h>
int levenshtein_internal(const char *s, const char *t,
int ins_c, int del_c, int sub_c);
void levenshtein(char ** strvec_1, char ** strvec_2,
int * length_1, int * length_2, int * ans);
/* Interface for GNU implementation below
*... |
/* Board Support Package (BSP) for the EK-TM4C123GXL board */
#include "qpc.h"
#include "bsp.h"
#include "TM4C123GH6PM.h" /* the TM4C MCU Peripheral Access Layer (TI) */
/* on-board LEDs */
#define LED_RED (1U << 1)
#define LED_BLUE (1U << 2)
#define LED_GREEN (1U << 3)
/* on-board switch */
#define BTN_SW1 (1U ... |
/*
* Copyright (c) 2012-2014, Intel Corporation
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are
* met:
*
* * Redistributions of source code must retain the above copyright notice,
* this list of conditions and ... |
/* Author: <NAME> <<EMAIL>>
* Created on Friday, February 21 16:29
*/
#include "latency_monitor.h"
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
const unsigned latencies_length = 1000000;
// latencies[i] are the operations hat achieved i usec latency
size_t *latenc... |
#pragma ident "$Id: detect.c,v 1.5 2015/12/07 19:55:33 dechavez Exp $"
/*======================================================================
*
* Run packet through event detector and write out debug values
*
*====================================================================*/
#include <stdio.h>
#include <err... |
/****************************************************************
*
* $Source: /pv/CvsTree/pv/gen/src/prg/methods/NSPECT/initMeth.c,v $
*
* Copyright (c) 2001 - 2003
* Bruker BioSpin MRI GmbH
* D-76275 Ettlingen, Germany
*
* All Rights Reserved
*
* $Id: initMeth.c,v 1.5.2.2 2007/06/11 11:49:31 mawi ... |
/* $OpenBSD: dzms.c,v 1.8 2008/08/22 21:05:07 miod Exp $ */
/* $NetBSD: dzms.c,v 1.1 2000/12/02 17:03:55 ragge Exp $ */
/*
* Copyright (c) 1992, 1993
* The Regents of the University of California. All rights reserved.
*
* This software was developed by the Computer Systems Engineering group
* at Lawrence Berkele... |
#include "global.h"
#include "font.h"
#include "ortho.h"
#include "timing.h"
/* Color Arrays */
float white[] = {1.0,1.0,1.0,1.0};
float black[] = {0.0,0.0,0.0,1.0};
float red[] = {1.0,0.0,0.0,1.0};
float green[] = {0.0,1.0,0.0,1.0};
float blue[] = {0.0,0.0,1.0,1.0};
float yellow[] = {1.0,1.0,0.0,1.0};
float... |
/*
* display_mac.c
*
* Machine specific code to display pixels on the screen.
* Contains routines to intialize the screen, draw pixels
* to the screen, and close it when finished.
*
* Macintosh Version
*
* Tested with 16-bit (really 15) color on a Perform 630CD.
* It should work on a 24-bit machine, but has ... |
/* -----------------------------------------------------------------------------
* Copyright (c) 2013-2017 <NAME>.
* Ecere Corporation has unlimited/unrestricted rights.
* -----------------------------------------------------------------------------
*/
#include "texturemanager.h"
#define DM_ENABLE_IMAGE_ROTATION (... |
// Copyright 2019 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writ... |
#define _GNU_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/resource.h>
#include <sys/types.h>
#include <sys/wait.h>
#include <sys/time.h>
#define STRSIZ 1024
void bail(const char * msg) {
perror(msg);
exit(-1);
}
int safe... |
/**
* @brief Read Barometric Pressure Sensor
* @author <NAME>
* @date January 25, 2016
* @version 1.1
*
*/
#include "simpletools.h"
void ms5607(void *par);
int Send_Cmd(i2c *, int );
void Get_Prom(i2c *);
#define DEVICE_ADDR 0xec
#define CMD_READ_ADC 0x00
#define CMD_RESET 0x1e
#define CMD_CON... |
#include <assert.h>
#include <math.h>
#include <errno.h>
#include <string.h>
#include <stdlib.h>
#include <SDL.h>
#include <SDL_image.h>
#include "Shared.h"
#include "PlazmaArrowShot.h"
enum {
SCREEN_WIDTH = 800,
SCREEN_HEIGHT = 600,
MAX_ANIMS = 2
};
static SDL_Window *win;
static struct SHR_Screen screen;
st... |
/*
* Copyright (c) 2013-2020 Seagate Technology LLC and/or its Affiliates
*
* 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
*
* Unles... |
/* $Id: utilgmx.c,v 1.7 2009/06/15 15:49:57 oliver Exp $
everyday functions
*/
#include "utilgmx.h"
#include "gmx_fatal.h"
#include "futil.h"
#include "maths.h"
#include "smalloc.h"
real ***grid3_alloc(int nx, int ny, int nz) {
/* allocate a 3D array, size nx*ny*nz which is referenced through pointers.
By u... |
/* ********************************************************************
* Copyright (C) 2012-2015 VMware, Inc. All rights reserved.
* -- VMware Confidential
* ********************************************************************/
/*
* HookExportTable.c --
*
* Export table - Classic
* A part of global symbol tabl... |
#include <assert.h>
#include <string.h>
#ifdef __BORLANDC__
#pragma hdrstop
#endif
#include "bufstm.h"
#ifdef NDEBUG
#error This test program must work with macro "ASSERT" enabled!
#endif
void bufistm_test(void)
{
static const uint8_t buffer[] = { 0x00,0x11,0x22, 0x33,0x44,0x55, 0x66,0x77,0x88, 0x99,0xAA, }... |
#include "chip8/system.h"
#include "chip8/cpu.h"
#include "chip8/audio.h"
#include "chip8/display.h"
#include "chip8/emulator.h"
#include "logger.h"
#include <stdio.h>
#include <stdlib.h>
#include <SDL2/SDL.h>
#include <SDL2/SDL_audio.h>
// set *c8->keys[key] state accordingly
void set_key_state(SDL_Event *e, byte_t s... |
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
* The contents of this file are subject to the Mozilla Public License Version
* 1.1 (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.mozilla.org/MPL/
*
... |
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> ... |
#include "matwm.h"
int client_x(client *c) { /* returns the horizontal position of a window's frame */
if(c->flags & FULLSCREEN)
return screens[c->screen].x;
if(c->flags & MAXIMIZED_L)
return screens[c->screen].x + screens[c->screen].ewmh_strut[0];
if(c->flags & EXPANDED_L)
return c->expand_x;
return c->x;
}... |
/*
-------------------------------------------------
Simple text adventure
Author: regexowl
Updated: 23-02-2022
-------------------------------------------------
A simple text adventure written in C
Check https://github.com/regexowl/exploring-languages to see the same adventure in multiple other... |
/*
* Copyright (c) 2005-2021 Imperas Software Ltd., www.imperas.com
*
* 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 requir... |
/*
* Simple multithreaded epoll HTTP server example
*/
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/epoll.h>
#include <sys/socket.h>
#include <netinet/tcp.h>
#include <unistd.h>
#include <arpa/inet.h>
#include <pthread.h>
int accept4(int sockfd, struc... |
#include "xparameters.h"
#include "xgpiops.h"
#include "xspips.h"
#include "sleep.h"
#include "oled_font.h"
#include "ps_emio.h"
// Global Instances for the EMIO GPIO & SPI
static XGpioPs gpio_instance;
static XSpiPs spi_instance;
// Configure all the EMIO GPIO and SPI pins of the PS
static int configure_emio() {
/... |
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "harness.h"
#include "queue.h"
/*
* Create empty queue.
* Return NULL if could not allocate space.
*/
queue_t *q_new()
{
queue_t *q = malloc(sizeof(queue_t));
if (!q)
return NULL;
q->head = NULL;
q->tail = NULL;
q->size... |
/*
* Copyright (c) 2018, Arm Limited and affiliates.
* SPDX-License-Identifier: Apache-2.0
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICEN... |
/************************************************************************************
* Copyright (c) 2015, University of Arkansas - Hybridthreads Group
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are... |
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you ... |
/*-------------------------------------------------------------------------
*
* src/monitor/pg_auto_failover.c
*
* Implementation of the pg_auto_failover extension.
*
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the PostgreSQL License.
*
*----------------------------------------... |
/*
* Copyright 1994-2011, Regents of the University of Minnesota
*
* ndmetis.c
*
* Driver programs for nested disection ordering
*
* Started 8/28/94
* George
*
* $Id: ndmetis.c 10567 2011-07-13 16:17:07Z karypis $
*
*/
#include "metisbin.h"
/**************************************************************... |
#include <device/io.h>
#include <mem/mm.h>
#include <mem/paging.h>
#include <device/console.h>
#include <proc/proc.h>
#include <interrupt.h>
#include <mem/palloc.h>
#include <ssulib.h>
uint32_t *PID0_PAGE_DIR;
intr_handler_func pf_handler;
uint32_t scale_up(uint32_t base, uint32_t size)
{
uint32_t mask = ~(size-1);... |
/* FIXME: io_plan needs size_t */
#include <unistd.h>
#include <ccan/io/io_plan.h>
#include <ccan/mem/mem.h>
#include <ccan/short_types/short_types.h>
#include <ccan/take/take.h>
#include <ccan/tal/tal.h>
#include <errno.h>
#include <wire/wire_io.h>
/*
* OK, this is a little tricky. ccan/io lets you create your own... |
/* NetHack 3.6 were.c $NHDT-Date: 1505214877 2017/09/12 11:14:37 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.21 $ */
/* Copyright (c) <NAME>, Amsterdam, 1985. */
/*-Copyright (c) <NAME>, 2011. */
/* NetHack may be freely redistributed. See license for details. */
#include "hack.h"
void
were_change(mon)
regist... |
/*
* Copyright (c) 2005 <NAME>
* Copyright (c) 2011 Collabora Ltd.
* Copyright (c) 2013 Red Hat Inc.
*
* 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 ab... |
/*
* Copyright (C) 2010 <NAME>.
* 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
* without limitation the rights to use, copy, mo... |
/* regCluster - Cluster regulator regions. */
/* Copyright (C) 2011 The Regents of the University of California
* See README in this or parent directory for licensing information. */
#include "common.h"
#include "linefile.h"
#include "hash.h"
#include "options.h"
#include "localmem.h"
#include "rangeTree.h"
#include... |
/*******************************************************************************
* MIT License
*
* Copyright (c) 2017 <NAME>
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without r... |
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "cps.h"
#include "env-private.h"
#include "gc-private.h"
#include "hashtab.h"
#include "obj.h"
/* GC roots */
struct contn *gc_current_contn = NULL;
struct obj *gc_current_obj = NULL;
struct env *gc_global_env = NULL;
static int gc_active = 1;
#defi... |
///////////////////////////////////////////////////////////////////////////////////
/* CE1007/CZ1007 Data Structures
2017/18 S2
Submission Deadline: March 30th, 2018 (Friday) 11.59 pm
Purpose: Implementing the required functions for Question 4 */
////////////////////////////////////////////////////////////////... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.