text stringlengths 3.12k 18.7k |
|---|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// used wiki alot
// https://en.wikipedia.org/wiki/MD5
typedef unsigned char uint8_t;
typedef unsigned int uint32_t;
// specifies per round amount
const uint32_t s[64] = {
7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22, 7, 12, 17, 22,
5, 9, 14... |
#include "ApoClnt.h"
#include "ApoClnt.h"
#include "GuiCmd.h"
#include "DVA.h"
#include <math.h>
#include <stdbool.h>
#include "ACC.h"
static double c_i;
static bool initialized;
tACC_ECU ACC_ECU;
//todo: the radar sensor has to be named as RA00 for now.
static char* UAQNames[] = { "SC.State", "DM.Brake", ... |
/* Free a block of memory allocated by `mmalloc'.
Copyright 1990, 1991, 1992 Free Software Foundation
Written May 1989 by <NAME>.
Heavily modified Mar 1992 by <NAME>. (<EMAIL>)
The GNU C Library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public Lice... |
/* Author: <NAME> 2017 bitpuffin dot com */
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
#include <ctype.h>
#include <sexpresso.h>
enum { false, true };
sexpresso_sexp sexpressoCreateString(char const* Str) {
return sexpressoCreateStringUnescapedMove(sexpressoEscape(Str));
}
sexpresso_sexp sexpress... |
#include "bounce.h"
GLFWwindow* window;
Matrix projection_matrix, hud_projection_matrix, view_matrix, model_matrix;
GLuint shader = 0;
GLuint colorUniLoc, hudUniLoc, alphaUniLoc, mdlMatUniLoc, viwMatUniLoc, prjMatUniLoc;
int quit = 0;
#ifdef DEBUG
void glCheckError(const char* file, int line) {
GLenum error = glGetE... |
/*
$Id$
Copyright 1989-2014 <NAME>
This file is part of Linear/C3 Library.
Linear/C3 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 3 of the License, or
any later v... |
/*
* TextParser - Text Parsing Library
*
* Copyright (C) 2012-2015 Institute of Industrial Science, The University of Tokyo.
* All rights reserved.
*
* Copyright (c) 2014-2016 Advanced Institute for Computational Science, RIKEN.
* All rights reserved.
*
* Copyright (c) 2016-2018 Research Institute for Informat... |
/* { dg-do run } */
/* { dg-options "-O2" } */
/* Test that arguments are passed in the correct location according to the ABI. */
#include <stdlib.h>
/* Hack to allow calling func_asm which takes 84 arguments that are scalars.
The function func_call takes 84 union quadword arguments, so we can check to
see if ... |
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <getopt.h>
#include <string.h>
#include <fcntl.h>
#include <slurm/slurm.h>
#include "logger.h"
// from src/common/slurm_protocol_defs.h
int REQUEST_SUBMIT_BATCH_JOB=4003;
int REQUEST_COMPLETE_BATCH_SCRIPT=5018;
#include "shmemclock.h"
char help_ms... |
/*
* Copyright (c) 2015 The Ultiparc Project. 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 c... |
/**
* Licensed to JumpMind Inc under one or more contributor
* license agreements. See the NOTICE file distributed
* with this work for additional information regarding
* copyright ownership. JumpMind Inc licenses this file
* to you under the GNU General Public License, version 3.0 (GPLv3)
* (the "License"); yo... |
/*****************************************************************************************
* *
* MIT License *
* ... |
// standard libraries
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// custom imports
#include "hashtab.h"
#include "objstack.h"
#include "yaep.h"
// include any libs for testing ops
#include <assert.h>
#define TRUE 1
#define FALSE 0
static char *input;
static int ntok;
static int max_dd_size;
/******... |
/*
* Copyright (c) 2011 <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 con... |
#define _LARGEFILE64_SOURCE
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
#include <string.h>
#include <unistd.h> //usleep
#include <sys/stat.h>
#include <fcntl.h>
#include <errno.h>
#include <time.h>
#include <sys/types.h>
#include <stdint.h> //uint64_t
#include <stdlib.h> //rand
#define __STDC_FORMAT_M... |
/////////////////////////////////////////////////////////////////////////////////
//////
////// Interface to PARDISO sparse linear solver
////// Copyright (C) 2005 <NAME> (lourakis at ics.forth.gr)
////// Institute of Computer Science, Foundation for Research & Technology - Hellas
////// Heraklion, Crete, Greece.... |
/*
* 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... |
/* $OpenBSD: via8231.c,v 1.1 2003/07/30 05:26:33 mickey Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
*
* This code is derived from software contributed to The NetBSD Foundation
* by <NAME> of the Numerical Aerospace Simulation Facility,
* NASA Ames Research Center.
*
* R... |
/*
* main.c
*
* Created: 8/4/2016 11:15:32 AM
* Author: Piyush
*/
#include "KTA.h"
#include "ECTLookup.h"
#include "LOPLookup.h"
ISR(TIMER2_COMP_vect)
{
if(counter%125 == 0) //250ms counter
{
DEBUG_LED1_LD8_TOGGLE;
wdt_reset();
updateRPMSensor();
}
if(counter == 500) //1sec c... |
/*
* Copyright (C) 2007 The Android Open Source Project
*
* 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 app... |
//*******************************************************************
//Author: <NAME>
//Description: Developed during PREv20 tape-out for verification
//*******************************************************************
#include "PREv20.h"
#include "FLPv3S_RF.h"
#include "PMUv9_RF.h"
#include "SNSv11_RF.h"
#include "... |
/*
* Copyright (C) 2019 Freie Universität Berlin
*
* This file is subject to the terms and conditions of the GNU Lesser
* General Public License v2.1. See the file LICENSE in the top level
* directory for more details.
*/
/**
* @ingroup tests
* @{
*
* @file
* @brief Client to test and benchmark ra... |
/*
* Copyright (C) 2021 Liquidaty and the zsv/lib contributors
* All rights reserved
*
* This file is part of zsv/lib, distributed under the license defined at
* https://opensource.org/licenses/MIT
*/
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <stdio.h>
#include <zsv/utils/compiler.h>
#... |
/* Copyright 2004,2007,2008,2011,2013,2014,2015,2018 IPB, Universite de Bordeaux, INRIA & CNRS
**
** This file is part of the Scotch software package for static mapping,
** graph partitioning and sparse matrix ordering.
**
** This software is governed by the CeCILL-C license under French law
** and abiding by the rules... |
/*
* Copyright (C) 2013 Glyptodon LLC
*
* 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, publi... |
#include "bggl3.h"
#include <math.h>
int Img_StoreTGA(FILE *fd, unsigned char *buf, int w, int h)
{
int i, flip;
unsigned char *s, *t, *obuf;
if(h<0)
{
h=-h;
flip=1;
}else flip=0;
fputc(0, fd); //id length
fputc(0, fd); //ctype
fputc(2, fd); //itype
fputc(0, fd); fputc(0, fd); //cindex
fputc(0, f... |
//*******************************************************************
//Author: Seokhyeon
//Description: SNTv1's CLK Testing
//*******************************************************************
#include "PRCv20.h"
#include "PRCv20_RF.h"
#include "SNTv4_RF.h"
#include "mbus.h"
// uncomment this for debug mbus message... |
/*
*************************************************************************************************
*
* Emulation of ADS1015 I2C A/D Converter
*
* State:
*
*
* Copyright 2004 2011 <NAME>. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without modification, are
* permi... |
/*
* Copyright 2012 Red Hat Inc.
*
* 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... |
// This is an open source non-commercial project. Dear PVS-Studio, please check
// it. PVS-Studio Static Code Analyzer for C, C++ and C#: http://www.viva64.com
#include <assert.h>
#include "nvim/ascii.h"
#include "nvim/autocmd.h"
#include "nvim/edit.h"
#include "nvim/eval.h"
#include "nvim/ex_docmd.h"
#include "nvim/... |
/**
* (C) Copyright 2016-2019 Intel Corporation.
*
* 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 l... |
/*
* Copyright (C) 2009
* <NAME> <<EMAIL>>
*
* Heavily based on pxa255_idp platform
*
* 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 ... |
/**
* \addtogroup httpd
* @{
*/
/**
* \file
* Web server script interface
* \author
* <NAME> <<EMAIL>>
*
*/
/*
* Copyright (c) 2001-2006, <NAME>.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the ... |
/*
* JACK Audio Connection Kit input device
* Copyright (c) 2009 Samalyse
* Author: <NAME> <olivier samalyse com>
*
* This file is part of FFmpeg.
*
* FFmpeg 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... |
/*
* (C) Copyright 2002
* Sysgo Real-Time Solutions, GmbH <www.elinos.com>
* <NAME> <<EMAIL>>
*
* Modified for CMC_PU2 (removed Smart Media support) by <NAME>
* (2004) <EMAIL>
*
* Modified for CMC_BASIC by <NAME> (2005), TQ-Systems GmbH
*
* See file CREDITS for list of people who contributed to this
* projec... |
/* BSD 2-Clause License */
/* Copyright (c) 2020, <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... |
/*
* CS:APP Data Lab
*
* btest.c - A test harness that checks a student's solution
* in bits.c for correctness.
*
* Copyright (c) 2001, <NAME> and <NAME>, All rights reserved.
* May not be used, modified, or copied without permission.
*
* Usage:
* -e <N> Limit number of errors to repor... |
/* Copyright 1990-2008, Jsoftware Inc. All rights reserved. */
/* Licensed use only. Any other use is in violation of copyright. */
/* */
/* Verbs: Comparatives */
/* See ... |
/*
* FreeRTOS Kernel V10.2.1
* Copyright (C) 2017 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, ... |
#include "u.h"
#include "lib.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
#include "io.h"
#include "ureg.h"
/*
* 8259 interrupt controllers
*/
enum
{
Int0ctl= 0x20, /* control port (ICW1, OCW2, OCW3) */
Int0aux= 0x21, /* everything else (ICW2, ICW3, ICW4, OCW1) */
Int1ctl= 0xA0, /* control port */
I... |
/*
* _EXECUTE_TEST_C_
*
* HMCSIM PHYSRAND TEST EXECUTION FUNCTIONS
*
*/
#include <stdio.h>
#include <stdlib.h>
#include <inttypes.h>
#include <string.h>
#include "hmc_sim.h"
/* ---------------------------------------------------- ZERO_PACKET */
/*
* ZERO_PACKET
*
*/
static void zero_packet( uint64_t *... |
#include "expr.h"
#include "binopr_events.h"
#include "../include/binopr.h"
#include "../include/messages.h"
#include "../include/ranch.h"
#include "../include/list.h"
#include "../include/strings.h"
#include "../include/value.h"
#include "../include/ast/ast.h"
#include "../include/ast/asterror.h"
#include "../include/... |
// Copyright 2019-2020 Espressif Systems (Shanghai) PTE 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 app... |
/* timePosTable - time access to a positional table. */
#include "common.h"
#include "options.h"
#include "hdb.h"
#include "jksql.h"
#include "hash.h"
#include "obscure.h"
#include "portable.h"
static void usage()
/* Explain usage and exit. */
{
errAbort(
"timePosTable - time access to a positional table\n"
"... |
/*
* Short program to create a z88 elf program
*
* This simply adds in the length of the program
*
*
* $Id: z88elf.c,v 1.9 2016-06-26 00:46:55 aralbrec Exp $
*/
#include "appmake.h"
static char *binname = NULL;
static char *crtfile = NULL;
static ... |
/*------------------------------------------------------------------------
* (The MIT License)
*
* Copyright (c) 2008-2011 Rhomobile, Inc.
*
* 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 ... |
/*
* Copyright (c) 2009, <NAME>
*
* This file is part of ruby-ffi.
*
* This code is free software: you can redistribute it and/or modify it under
* the terms of the GNU Lesser General Public License version 3 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it... |
/*------------------------------------------------------------------------
* Copyright 2007-2010 (c) <NAME> <<EMAIL>>
*
* This file is part of the ZBar Bar Code Reader.
*
* The ZBar Bar Code Reader is free software; you can redistribute it
* and/or modify it under the terms of the GNU Lesser Public License as... |
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/sysctl.h>
#include <errno.h>
#include <mach/mach.h>
#include <mach/mach_vm.h>
#include <mach/vm_prot.h>
//#include <mach/i386/thread_status.h>
#include "exc.h"
#define MACH_MSG_LEN 1024
#if 0
#define MFIELD(WOOT) printf("" #WOOT ": %lu ... |
/*
* Copyright (C) 2018 Samsung Electronics Co., Ltd All Rights Reserved
*
* 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 3 of the License, or
* (at your option) any later... |
/*s: syssema.c */
/*s: kernel basic includes */
#include <u.h>
#include "../port/lib.h"
#include "../port/error.h"
#include "mem.h"
#include "dat.h"
#include "fns.h"
/*e: kernel basic includes */
/*
* The implementation of semaphores is complicated by needing
* to avoid rescheduling in syssemrelease, so that it is s... |
/// @file blas_comm.c
/// @brief The standard implementations for blas_comm.h
///
#include "blas_comm.h"
#include "blas.h"
#include "gf.h"
#include "rainbow_config.h"
#include <stdint.h>
#include <string.h>
void gf256v_set_zero(uint8_t *b, unsigned int _num_byte) {
for (size_t i = 0; i < _num_byte; i++) {
... |
// compile: mex -largeArrayDims OPTIMFLAGS="/openmp $OPTIMFLAGS" majorityVoting_mex.c
#include "mex.h"
#include "stdlib.h"
#include "time.h"
#define RANDOM_BREAK_TIES 1
/* Random number on range 1..n */
static int rand_int(int n) {
int limit = RAND_MAX - RAND_MAX % n;
int rnd;
do {
rnd = rand();
} while... |
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "compiler.h"
int compileTree(struct Cons *base, int code[MEMSIZE]) {
struct Cons *symTree;
symTree = 0;
/* The first pass collects all the symbols and populates
* the symbol tree, it generates code for everything but
* defun options, ... |
/*
* (C) Copyright 2010
* Texas Instruments Incorporated, <www.ti.com>
* <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: GPL-2.0+
*/
#include <common.h>
#include <asm/mach-types.h>
#include <asm/arch/sys_proto.h>
#include <asm/arch/mmc_host_def.h>
#include <asm/arch/clock.h>
#include <asm/arch/gpio.h>
#include <as... |
#define PY_SSIZE_T_CLEAN
#include <Python.h>
int pyfasttextureutils_color_tuple_one_value_to_int(PyObject* tuple, int index, int* val_int) {
PyObject* val_obj = PyTuple_GetItem(tuple, index);
if (val_obj == NULL) {
return 0;
}
if (PyNumber_Check(val_obj) != 1) {
PyErr_SetString(PyExc_TypeError, "Color ... |
/* $Id: errtbls.c,v 1.1.1.1 2001/02/22 14:58:11 serg Exp $
* errtbls.c: Error number conversion tables between various syscall
* OS semantics.
*
* Copyright (C) 1995 <NAME> (<EMAIL>)
*
* Based upon preliminary work which is:
*
* Copyright (C) 1995 <NAME> (<EMAIL>)
*/
#include <asm/bsderrno.h> ... |
/*
* Author: <NAME>,
*/
#include <stdlib.h>
#include <stdio.h>
#include <limits.h>
#include <stdbool.h>
#include "common.h"
int compare_d_path(const void * a, const void * b)
{
const d_path_data2 * arg1 = a;
const d_path_data2 * arg2 = b;
if (arg1->d - arg2->d == 0) {
return arg1->k - a... |
/* $FreeBSD$ */
/*-
* 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 o... |
/*
* Copyright (C) 1999, 2000, 2004 MIPS Technologies, Inc.
* All rights reserved.
* Authors: <NAME> <<EMAIL>>
* <NAME> <<EMAIL>>
*
* Copyright (C) 2009 Lemote Inc.
* Author: <NAME> <<EMAIL>>
*
* This program is free software; you can distribute it and/or modify it
* under the terms of the GNU General Pu... |
/*
* Copyright 2012, Samsung Telecommunications of America
*
* 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 a... |
/* $OpenBSD$ */
/*
* Copyright (c) 2007 <NAME> <<EMAIL>>
*
* Permission to use, copy, modify, and distribute this software for any
* purpose with or without fee is hereby granted, provided that the above
* copyright notice and this permission notice appear in all copies.
*
* THE SOFTWARE IS PROVIDED "AS IS" AND... |
#include <string.h>
#include "sway/commands.h"
#include "sway/container.h"
#include "sway/layout.h"
/**
* handle "layout auto" command group
*/
static struct cmd_results *cmd_layout_auto(swayc_t *container, int argc, char **argv);
struct cmd_results *cmd_layout(int argc, char **argv) {
struct cmd_results *error = ... |
/*
fuzzer.c - Fuzzer test tool for LZ4
Copyright (C) <NAME> - <NAME> 2012-2013
Code started by <NAME>, modified by <NAME>
GPL v2 License
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... |
/* The Problem with the problem setter */
#include <stdio.h>
typedef char bool;
#define TRUE 1
#define FALSE 0
#define MAXCATEGORIES 20
#define MAXPROBLEMS 1000
#define MAXGET 100
#define MAXV 1022
#define MAXDEGREE MAXPROBLEMS
typedef struct {
int v;
int capacity;
int flow;
int residual;
} edge;
t... |
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "ble/att_db.h"
#include "hci.h"
#include "hci_dump.h"
#include "l2cap.h"
#include "rijndael.h"
#include "btstack_linked_list.h"
static btstack_packet_handler_t le_data_handler;
static uint8_t packet_buffer[256];
static uint16_t p... |
/*
* This is a RANDOMLY GENERATED PROGRAM.
*
* Generator: csmith 2.0.0
* svn version: exported
* Options: --check-global -s 1815
* Seed: 1815
*/
#include "random_runtime.h"
long __undefined;
/* --- Struct/Union Declarations --- */
/* --- GLOBAL VARIABLES --- */
uint16_t g_14[6] = {8L, 8L, 8L, 8L, 8L, ... |
/*
* Copyright 2010-2011 Freescale Semiconductor, 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 Public License as published by the Free
* Software Foundation; either version 2 of the Li... |
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
* range
*/
#include <u.h>
#include <libc.h>
#include "go.h"
void
typecheckrange(Node *n)
{
char *why;
Type *t, *t1, *t2;
Node *v1, *v2;
NodeList *ll;... |
/*
* libwebsockets - small server side websockets and web server implementation
*
* Copyright (C) 2010 - 2020 <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... |
// SPDX-FileCopyrightText: 2018 rkx1209 <<EMAIL>>
// SPDX-License-Identifier: LGPL-3.0-only
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <rz_types.h>
#include <rz_util.h>
#include <rz_lib.h>
#include <rz_bin.h>
#include "nxo.h"
static char *readString(RzBuffer *buf, int off)... |
/*
* 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 distributed in the hope that it will be use... |
#include "../engine/include/engine.h"
/*
* Note: Globals are being used because of Emscripten
* i32 init_game() -> initializes games and global variables
* emp game_loop() -> game_loop:
* frame start
* event handling
* updating
* rendering
* frame end & delayer
* repe... |
/* This file implements a new module native data type called "HELLOTYPE".
* The data structure implemented is a very simple ordered linked list of
* 64 bit integers, in order to have something that is real world enough, but
* at the same time, extremely simple to understand, to show how the API
* works, how a new d... |
/*
* PsychToolbox3/Source/Common/Screen/SCREENPutImage.c
*
* AUTHORS:
*
* <EMAIL> awi
* <EMAIL> mk
*
* PLATFORMS:
*
* All.
*
* HISTORY:
*
* 02/06/03 awi Created.
* 10/12/04 awi... |
char inportb (short _port)
{
unsigned char rv;
__asm__ __volatile__ ("inb %0, %1" : "=a" (rv) : "dN" (_port));
return rv;
}
void outportb (short _port, char _data)
{
__asm__ __volatile__ ("outb %0, %1" : : "dN" (_port), "a" (_data));
}
void outportsm(unsigned short port, unsigned char * data, unsign... |
/*
* QTest testcase for CPU plugging
*
* Copyright (c) 2015 SUSE Linux GmbH
*
* This work is licensed under the terms of the GNU GPL, version 2 or later.
* See the COPYING file in the top-level directory.
*/
#include "qemu/osdep.h"
#include "qemu-common.h"
#include "libqtest-single.h"
#include "qapi/qmp/qdict.... |
/*
* Copyright 2015-2018 Yubico AB
*
* 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 i... |
/**
* @file ssd1306.c
*
* Code from https://github.com/yanbe/ssd1306-esp-idf-i2c.git is used as a starting point,
* in addition to code from https://github.com/espressif/esp-iot-solution.
*
* Definitions are borrowed from:
* http://robotcantalk.blogspot.com/2015/03/interfacing-arduino-with-ssd1306-driven.html
*... |
/*
* HydraBus/HydraNFC
*
* Copyright (C) 2014-2016 <NAME>
* Copyright (C) 2014 <NAME> <<EMAIL>>
*
* 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/LI... |
#undef HAVE_RECODE
#undef USE_BCOPY
#undef HAVE_FTP
#undef ushort
#undef UCD_SNMP_HACK
/* Define if you want dmalloc checking */
#define HAVE_DMALLOC 0
/* Define if you want to have PCRE support */
#define HAVE_PCRE 0
/* Define if you have the libmhash library */
#undef HAVE_LIBMHASH
/* Define if you have the lib... |
//<>< (C) 2016 <NAME>, FULLY Under MIT/x11 License.
//All MIT/x11 Licensed Code in this file may be relicensed freely under the GPL or LGPL licenses.
#include "survive_cal.h"
#include "survive_config.h"
#include "survive_default_devices.h"
#include "survive_playback.h"
//XXX TODO: Once data is avialble in the context... |
#include "twi.h"
#include <avr/io.h>
#include <avr/interrupt.h>
#define DDR_USI DDRA
#define PORT_USI PORTA
#define PIN_USI PINA
#define PORT_USI_SDA PORTA6
#define PORT_USI_SCL PORTA4
#define PIN_USI_SDA PINA6
#define PIN_USI_SCL PINA4
#define USI_START... |
///////////////////////////////////////////////////////////////////////////////
// File: gcdkeyservertest_qr2.c
// SDK: GameSpy CD Key SDK
//
// Copyright (c) IGN Entertainment, Inc. All rights reserved.
// This software is made available only pursuant to certain license terms offered
// by IGN or its subsidiary Ga... |
#include "stdlib.h"
#include "string.h"
#include "sys/param.h"
#include "kernel/os/os.h"
#include "lwip/sockets.h"
#include "lwip/inet.h"
#include "lwip/ip.h"
#include "smartlink/airkiss/wlan_airkiss.h"
#include "airkiss.h"
#define g_debuglevel ERROR
#define AIRKISS_LAN_PORT 12476
#define AIRKISS_BIND_PORT 12476
... |
/*
* 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 distributed in the hope that it will be use... |
#include "art.h"
/*
* return the closest point on box ip to point testp.
*/
Dpoint nearbox(Item *ip, Dpoint testp){
Dpoint p=testp, p0=ip->p[0], p1=ip->p[1];
Flt d0, d1, d2, d3;
if(p0.x>p1.x){ d0=p0.x; p0.x=p1.x; p1.x=d0; }
if(p0.y>p1.y){ d0=p0.y; p0.y=p1.y; p1.y=d0; }
if(p.x<p0.x) p.x=p0.x; else if(p.x>p1.x) p.... |
/*
* Copyright 2005-2018 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... |
/**********************************************************************
Each of the companies; Qualcomm, and Lucent (hereinafter
referred to individually as "Source" or collectively as "Sources") do
hereby state:
To the extent to which the Source(s) may legally and freely do so, the
Source(s), upon submission of a ... |
// RUN: %clang_cc1 -fsyntax-only %s 2>&1 | FileCheck %s -strict-whitespace
#define M1(x) x
#define M2 1;
void foo() {
M1(
M2);
// CHECK: {{.*}}:7:{{[0-9]+}}: warning: expression result unused
// CHECK: {{.*}}:4:{{[0-9]+}}: note: expanded from macro 'M2'
// CHECK: {{.*}}:3:{{[0-9]+}}: note: expanded from ma... |
/*
* This file is part of GreatFET
*/
#include <drivers/comms.h>
#include <drivers/gpio.h>
#include <debug.h>
#include <stddef.h>
#include <errno.h>
#include <greatfet_core.h>
#include <spiflash.h>
#include <spiflash_target.h>
#include <gpio_lpc.h>
#include <pins.h>
#define CLASS_NUMBER_SPI_FLASH (0x101)
/* Ac... |
#include <stdbool.h>
#include <stdint.h>
#include <stdarg.h>
#include <stddef.h>
#pragma once
struct lua_State;
struct luaL_Reg;
struct Color;
// Enums
typedef struct {
uint8_t length;
char string[31];
} StringEntry;
#define ENTRY(s) { sizeof(s) - 1, s }
extern StringEntry lovrAnimationProperty[];
extern Strin... |
/*
* Copyright (C) 2009 The Android Open Source Project
*
* 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 app... |
/* VNC Reflector
* Copyright (C) 2001-2003 HorizonLive.com, Inc. All rights reserved.
*
* This software is released under the terms specified in the file LICENSE,
* included. HorizonLive provides e-Learning and collaborative synchronous
* presentation solutions in a totally Web-based environment. For more
* in... |
/*
* Copyright (c) 2004-2005 <NAME>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License V2
* as published by the Free Software Foundation
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY W... |
//-------------------------------------------------------------------------//
// //
// This benchmark is a serial C version of the NPB UA code. This C //
// version is developed by the Center for Manycore Programming at Seoul //
// Nati... |
#define _GNU_SOURCE
#include <sched.h>
#include <getopt.h>
#include <stdbool.h>
#include <sys/time.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#include <linux/unistd.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <sys/syscall.h>
#include <pthread.h... |
//ezquake likes this
#include <assert.h>
#include <ctype.h>
extern plug2dfuncs_t *drawfuncs;
extern plugfsfuncs_t *filefuncs;
extern plugclientfuncs_t *clientfuncs;
extern pluginputfuncs_t *inputfuncs;
//ezquake sucks. I'd fix these, but that'd make diffs more messy.
#ifdef __GNUC__
#pragma GCC diagnostic... |
// SPDX-License-Identifier: GPL-2.0+
/*
* multiq3.c
* Hardware driver for Quanser Consulting MultiQ-3 board
*
* COMEDI - Linux Control and Measurement Device Interface
* Copyright (C) 1999 <NAME> <<EMAIL>>
*/
/*
* Driver: multiq3
* Description: Quanser Consulting MultiQ-3
* Devices: [Quanser Consulting] Multi... |
#pragma once
#include "bspfile.h"
#include "studio.h"
#include "com_model.h"
#define MAX_QPATH 64
//wad
#pragma pack(1)
typedef struct lumpinfo_s
{
int filepos;
int disksize;
int size;
char type;
char compression;
char pad1, pad2;
char name[16];
}lumpinfo_t;
#pragma pack()
typedef struct
{
char name[MAX_QP... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.