Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Add back missing platform defines
// Copyright 2014-2016 the project authors as listed in the AUTHORS file. // All rights reserved. Use of this source code is governed by the // license that can be found in the LICENSE file. #ifndef _DEVICE #define _DEVICE #include "MessageQueue.h" #include "DeviceMessageHandler.h" typedef struct MessageHandlerList...
// Copyright 2014-2016 the project authors as listed in the AUTHORS file. // All rights reserved. Use of this source code is governed by the // license that can be found in the LICENSE file. #ifndef _DEVICE #define _DEVICE #include "MessageQueue.h" #include "DeviceMessageHandler.h" #ifdef __arm__ #define INTERRUPT_...
Fix warning about missing strcmp() definition
// Copyright (c) 2013 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <unistd.h> #include <sys/types.h> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <errno.h> #include <pwd.h> int xwalk_tiz...
// Copyright (c) 2013 Intel Corporation. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #include <unistd.h> #include <sys/types.h> #include <string.h> #include <stdio.h> #include <stdlib.h> #include <stdbool.h> #include <errno.h> #include <p...
Use the tenary operator instead of a simple if/else inside an inline function
/****************************************************************************** * This file is part of the Mula project * Copyright (c) 2011 Laszlo Papp <lpapp@kde.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as publi...
/****************************************************************************** * This file is part of the Mula project * Copyright (c) 2011 Laszlo Papp <lpapp@kde.org> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as publi...
Change basic cell type name to bf_value.
#ifndef BFC_TYPES_H #define BFC_TYPES_H #ifndef __cplusplus # include <stdint.h> #else # include <cstdint> #endif typedef bfc_cell uint8_t; #endif /* !BFC_TYPES_H */
#ifndef BFC_TYPES_H #define BFC_TYPES_H #ifndef __cplusplus # include <stdint.h> #else # include <cstdint> #endif typedef bf_value uint8_t; #endif /* !BFC_TYPES_H */
Fix inline static local warning
// RUN: %check %s // extern extern inline int f() { static int i; return i++; } // static static inline int h() { static int i; return i++; } // neither inline int g() { static int i; // CHECK: warning: static variable in pure-inline function - may differ per file return i++; } // neither, but const inline in...
// RUN: %check %s // extern extern inline int f() { static int i; return i++; } // static static inline int h() { static int i; return i++; } // neither inline int g() { static int i; // CHECK: warning: mutable static variable in pure-inline function - may differ per file return i++; } // neither, but const i...
Fix a typo, that could cause a crash on mac.
// Copyright (c) 2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_PROXY_PROXY_RESOLVER_MAC_H_ #define NET_PROXY_PROXY_RESOLVER_MAC_H_ #pragma once #include <string> #include "googleurl/src/gurl.h" #incl...
// Copyright (c) 2008 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_PROXY_PROXY_RESOLVER_MAC_H_ #define NET_PROXY_PROXY_RESOLVER_MAC_H_ #pragma once #include <string> #include "googleurl/src/gurl.h" #incl...
Remove redundant declaration of lsmash_fseek.
/***************************************************************************** * osdep.h: ***************************************************************************** * Copyright (C) 2010 L-SMASH project * * Authors: Yusuke Nakamura <muken.the.vfrmaniac@gmail.com> * Takashi Hirata <silverfilain@gmail.co...
/***************************************************************************** * osdep.h: ***************************************************************************** * Copyright (C) 2010 L-SMASH project * * Authors: Yusuke Nakamura <muken.the.vfrmaniac@gmail.com> * Takashi Hirata <silverfilain@gmail.co...
Add ifs around TUI function not available in emscripten
#ifndef DEBUGGER_TUI_H #define DEBUGGER_TUI_H #include "asic.h" char **tui_parse_commandline(const char *, int *); void tui_tick(asic_t *asic); #endif
#ifndef DEBUGGER_TUI_H #define DEBUGGER_TUI_H #include "asic.h" char **tui_parse_commandline(const char *, int *); #ifndef EMSCRIPTEN void tui_tick(asic_t *asic); #endif #endif
Mark ContiguousMemoryRange::size as const. am: f2c28cd765 am: 1b5ab79b0b am: 69614c4761 am: e447d8a1c2
/* * Copyright (C) 2017 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...
/* * Copyright (C) 2017 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...
Tweak to work with new AA implementation
//===- llvm/Analysis/BasicAliasAnalysis.h - Alias Analysis Impl -*- C++ -*-===// // // This file defines the default implementation of the Alias Analysis interface // that simply implements a few identities (two different globals cannot alias, // etc), but otherwise does no analysis. // //===---------------------------...
//===- llvm/Analysis/BasicAliasAnalysis.h - Alias Analysis Impl -*- C++ -*-===// // // This file defines the default implementation of the Alias Analysis interface // that simply implements a few identities (two different globals cannot alias, // etc), but otherwise does no analysis. // //===---------------------------...
Add SavedModel tag-constant for gpu.
/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
/* Copyright 2016 The TensorFlow Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or a...
Fix compile error on CentOS
/* This file is part of VoltDB. * Copyright (C) 2008-2010 VoltDB Inc. * * VoltDB 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. ...
/* This file is part of VoltDB. * Copyright (C) 2008-2010 VoltDB Inc. * * VoltDB 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. ...
Remove stray character introduced during merge
n/************************************************* * Character Set Handling Header File * * (C) 1999-2007 Jack Lloyd * *************************************************/ #ifndef BOTAN_CHARSET_H__ #define BOTAN_CHARSET_H__ #include <botan/types.h> #include <botan/enums.h> #include <s...
/************************************************* * Character Set Handling Header File * * (C) 1999-2007 Jack Lloyd * *************************************************/ #ifndef BOTAN_CHARSET_H__ #define BOTAN_CHARSET_H__ #include <botan/types.h> #include <botan/enums.h> #include <st...
Fix compilation waring on Mac
// Copyright (c) 2015 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #ifndef ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_ #define ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_ #include <vector> #include "base/compiler_specific.h" #include "base/memory/sc...
// Copyright (c) 2015 GitHub, Inc. // Use of this source code is governed by the MIT license that can be // found in the LICENSE file. #ifndef ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_ #define ATOM_UTILITY_ATOM_CONTENT_UTILITY_CLIENT_H_ #include <vector> #include "base/compiler_specific.h" #include "base/memory/sc...
Fix build issue on windows
/* * OpenSplice DDS * * This software and documentation are Copyright 2006 to TO_YEAR PrismTech * Limited, its affiliated companies and licensors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complia...
/* * OpenSplice DDS * * This software and documentation are Copyright 2006 to TO_YEAR PrismTech * Limited, its affiliated companies and licensors. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in complia...
Add file that did not get added by MQ.
#ifndef NDBOOLSWITCH_H #define NDBOOLSWITCH_H /** * $LicenseInfo:firstyear=2013&license=fsviewerlgpl$ * Phoenix Firestorm Viewer Source Code * Copyright (C) 2013, Nicky Dasmijn * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * Licens...
Reimplement InsertPointGuard to avoid LLVM ABI incompatibility.
#pragma once #include "preprocessor/llvm_includes_start.h" #include <llvm/IR/IRBuilder.h> #include "preprocessor/llvm_includes_end.h" namespace dev { namespace eth { namespace jit { class RuntimeManager; /// Base class for compiler helpers like Memory, GasMeter, etc. class CompilerHelper { protected: CompilerHelpe...
#pragma once #include "preprocessor/llvm_includes_start.h" #include <llvm/IR/IRBuilder.h> #include "preprocessor/llvm_includes_end.h" namespace dev { namespace eth { namespace jit { class RuntimeManager; /// Base class for compiler helpers like Memory, GasMeter, etc. class CompilerHelper { protected: CompilerHelpe...
Fix export macro for plugin test utility library.
/*============================================================================= Library: CTK Copyright (c) 2010 German Cancer Research Center, Division of Medical and Biological Informatics Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
/*============================================================================= Library: CTK Copyright (c) 2010 German Cancer Research Center, Division of Medical and Biological Informatics Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with...
Fix undefined GLint in Mac builds
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkMesaGLContext_DEFINED #define SkMesaGLContext_DEFINED #include "SkGLContext.h" #if SK_MESA class SkMesaGLContext : public SkGLContext { private: typedef intpt...
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkMesaGLContext_DEFINED #define SkMesaGLContext_DEFINED #include "SkGLContext.h" #if SK_MESA class SkMesaGLContext : public SkGLContext { private: typedef intpt...
Fix knode compilation on NetBSD. Patch by Mark Davies, thanks. BUG: 154721
/* This file is part of KDE. Copyright (c) 2005 Tobias Koenig <tokoe@kde.org> 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 ...
/* This file is part of KDE. Copyright (c) 2005 Tobias Koenig <tokoe@kde.org> 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 ...
Remove now somehow unnecessary empty mutex B section from 13/32
#include <pthread.h> #include <assert.h> int g = 0; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t C = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { pthread_mutex_lock(&A); pthread_mutex_lock(&C); pthread_mutex_lock(&B); g = 5; pthread_mut...
#include <pthread.h> #include <assert.h> int g = 0; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t C = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { pthread_mutex_lock(&A); pthread_mutex_lock(&C); pthread_mutex_lock(&B); g = 5; pthread_mut...
Implement all of the methods
//===- PPC32JITInfo.h - PowerPC/Darwin JIT interface --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===------------...
//===- PPC32JITInfo.h - PowerPC/Darwin JIT interface --------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file was developed by the LLVM research group and is distributed under // the University of Illinois Open Source License. See LICENSE.TXT for details. // //===------------...
Rename to reflect the list situation of this header
#ifndef _LIBADT_LIST_COMMONS_H #define _LIBADT_LIST_COMMONS_H typedef void (*t_destroyfunc)(void *data); enum list_insert_el_mode { HEAD, TAIL }; typedef struct _list_root list_root; typedef struct _list_node list_node; struct _list_node; struct _list_root { int size; // Size of the list structure. t_destro...
Remove trailing dots in group definitions.
// Document groups and namespaces. ///\defgroup objpipe Object Pipes. /** * \defgroup objpipe_errors Object pipe error handling. * \ingroup objpipe */ /** * \defgroup objpipe_detail Object pipe implementation details. * \ingroup objpipe */ namespace monsooon { /** * \brief Namespace for object pipes. * * ...
// Document groups and namespaces. ///\defgroup objpipe Object Pipes /** * \defgroup objpipe_errors Object pipe error handling * \ingroup objpipe */ /** * \defgroup objpipe_detail Object pipe implementation details * \ingroup objpipe */ namespace monsooon { /** * \brief Namespace for object pipes. * * Obj...
Add support for image trust commands
#define DIGEST_CMD /* Image crypto digest commands */ #define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */ #define IMAGE_COMBOOT /* COMBOOT */ #define NET_PROTO_IPV6 /* IPv6 protocol */ #define VLAN_CMD /* VLAN commands */
#define DIGEST_CMD /* Image crypto digest commands */ #define DOWNLOAD_PROTO_HTTPS /* Secure Hypertext Transfer Protocol */ #define IMAGE_COMBOOT /* COMBOOT */ #define IMAGE_TRUST_CMD /* Image trust management commands */ #define NET_PROTO_IPV6 /* IPv6 protocol */ #define VLAN_CMD...
Add missing header to test suite
#ifndef __CLAR_TEST_ATTR_EXPECT__ #define __CLAR_TEST_ATTR_EXPECT__ enum attr_expect_t { EXPECT_FALSE, EXPECT_TRUE, EXPECT_UNDEFINED, EXPECT_STRING }; struct attr_expected { const char *path; const char *attr; enum attr_expect_t expected; const char *expected_str; }; static inline void attr_check_expected( ...
Remove printfs in exit path
/* * Copyright 2011 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can * be found in the LICENSE file. */ #include <stdlib.h> #include <stdio.h> #include "native_client/src/include/portability.h" #include "native_client/src/shared/platform/nacl_ex...
/* * Copyright (c) 2011 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * be found in the LICENSE file. */ #include <stdlib.h> #include <stdio.h> #include "native_client/src/include/portability.h" #include "native_client/src/shared/platform/...
Create core FancyMath module and add hooks for ruby to access the C logic
#include <ruby.h> #include "add.h" static VALUE call_add(VALUE rb_self, VALUE rb_a, VALUE rb_b) { // Convert ruby values to C integers int a = FIX2INT(rb_a); int b = FIX2INT(rb_b); // Call C function int result = add(a, b); // Convert C integer into ruby value and return it VALUE rb_result = INT2FIX(re...
Use doubles instead of floats ny default
#ifndef __SIM_H_ #define __SIM_H_ 1 #define GEO_FLUID 0 #define GEO_WALL 1 #define GEO_INFLOW 2 #define LAT_H 180 #define LAT_W 420 #define BLOCK_SIZE 64 struct Dist { float *fC, *fE, *fW, *fS, *fN, *fSE, *fSW, *fNE, *fNW; }; struct SimState { int *map, *dmap; // macroscopic quantities on the video card float ...
#ifndef __SIM_H_ #define __SIM_H_ 1 #define GEO_FLUID 0 #define GEO_WALL 1 #define GEO_INFLOW 2 #define LAT_H 180 #define LAT_W 420 #define BLOCK_SIZE 64 #ifdef USE_FLOATS #define double float #define __dadd_rn __fadd_rn #define __dmul_rn __fmul_rn #else #define float double #define __fadd_rn __dadd_rn #define __fmu...
Add C 'Hello World' for connect to MySQL
/* http://zetcode.com/db/mysqlc/ */ /* http://www.cyberciti.biz/tips/linux-unix-connect-mysql-c-api-program.html */ #include <mysql.h> #include <stdio.h> main(){ MYSQL *conn; MYSQL_RES *res; MYSQL_ROW row; char *server = "localhost"; char *user = "sa"; char *password = "developsa"; /* set me first ...
Move IOperation to Internal namespace
#pragma once #ifndef YOU_DATASTORE_INTERNAL_OPERATION_H_ #define YOU_DATASTORE_INTERNAL_OPERATION_H_ #include <unordered_map> #include "../task_typedefs.h" namespace You { namespace DataStore { /// A pure virtual class of operations to be put into transaction stack class IOperation { public: virtual ~IOperation(); ...
#pragma once #ifndef YOU_DATASTORE_INTERNAL_OPERATION_H_ #define YOU_DATASTORE_INTERNAL_OPERATION_H_ #include <unordered_map> #include "../task_typedefs.h" namespace You { namespace DataStore { namespace Internal { /// A pure virtual class of operations to be put into transaction stack class IOperation { public: vir...
Add lastfm error handling to the test suite
/* * librest - RESTful web services access * Copyright (C) 2009 Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, * version 2.1, as published by the Free Software Foundation. * * This program ...
/* * librest - RESTful web services access * Copyright (C) 2009 Intel Corporation. * * This program is free software; you can redistribute it and/or modify it * under the terms and conditions of the GNU Lesser General Public License, * version 2.1, as published by the Free Software Foundation. * * This program ...
Add the MP_API_COMPATIBLE for Mac builds so that MPI libraries build correctly.
/* Defines common to all versions of NSS */ #define NSPR20 1
/* Defines common to all versions of NSS */ #define NSPR20 1 #define MP_API_COMPATIBLE 1
Add C implementation for problem 5
#include <stdio.h> #define LIST_SIZE 20 unsigned long mdc(unsigned long a, unsigned long b){ unsigned long mod; mod = a % b; while(mod != 0){ a = b; b = mod; mod = a % b; } return b; } unsigned long mmc(unsigned long a, unsigned long b){ unsigned long r = a * b / mdc(a, b); return r; } uns...
Replace backslashes in paths with slashes; should be compatible with both win32 compilers and mingw32 on linux
#ifndef __win32commandline_h__ #define __win32commandline_h__ #include <conio.h> #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <assert.h> #include "..\..\commandline.h" class CWin32CommandLine : public CCommandLine { public: CWin32CommandLine(); ~CWin32CommandLine(); public: virtu...
#ifndef __win32commandline_h__ #define __win32commandline_h__ #include <conio.h> #include <stdio.h> #include <stdlib.h> #include <windows.h> #include <assert.h> #include "../../commandline.h" class CWin32CommandLine : public CCommandLine { public: CWin32CommandLine(); ~CWin32CommandLine(); public: virtu...
Move away from deprecated C++ APIs in the demo
// Copyright 2020 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 w...
// Copyright 2020 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 w...
Add daemon to handle tree growth in the future
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2012 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundati...
Add ANSI C code snippet.
#include <stdio.h> #include <stdlib.h> #include <string.h> /* * 1) ĺһǸ 2) ΪͨԺǿ׳Ҫ󣬲ܶԿʹκμ */ #define PRINT_GREETINGS do { \ printf("Hi there!\n"); \ } while (0) int main(const int argc, const char* const* argv) { // macro PRINT_GREETINGS; return 0; }
Fix the MSVC bots by using LLVM_EXPLICIT rather than explicit.
//===----------- JITSymbol.h - JIT symbol abstraction -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===----------- JITSymbol.h - JIT symbol abstraction -----------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Move to new Photo API
#import <AssetsLibrary/AssetsLibrary.h> #import <AssetsLibrary/ALAssetsGroup.h> #import <Cordova/CDVPlugin.h> @interface GalleryAPI : CDVPlugin - (void) getAlbums:(CDVInvokedUrlCommand*)command; - (void) getMedia:(CDVInvokedUrlCommand*)command; @end
#import <Photos/Photos.h> #import <Cordova/CDVPlugin.h> @interface GalleryAPI : CDVPlugin - (void) getAlbums:(CDVInvokedUrlCommand*)command; - (void) getMedia:(CDVInvokedUrlCommand*)command; @end
Add some comments to the GDT header.
#ifndef KERNEL_X86_GDT_H #define KERNEL_X86_GDT_H #define NULL_SEGMENT 0 #define KCODE_SEGMENT 1 #define KDATA_SEGMENT 2 #define SEGOFF(seg) (8 * seg) #ifndef ASM_FILE typedef struct GDTDesc GDTDesc; extern GDTDesc gdt_desc; void gdt_load(GDTDesc *); #endif #endif
#ifndef KERNEL_X86_GDT_H #define KERNEL_X86_GDT_H /** * Support for managing the Global Descriptor Table (GDT) * * GDT initialization in zero is trivial at runtime: the entire structure is * baked into the binary, ready to go, and the bringup code need only load the * GDT pointer. A simple call to: * * gdt_...
Support for atomic operations on integers
/* * viratomic.h: atomic integer operations * * Copyright (C) 2012 IBM Corporation * * Authors: * Stefan Berger <stefanb@linux.vnet.ibm.com> * * 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 Sof...
Add FCoE feature code to 82599
/******************************************************************************* Intel 10 Gigabit PCI Express Linux driver Copyright(c) 1999 - 2009 Intel Corporation. This program is free software; you can redistribute it and/or modify it under the terms and conditions of the GNU General Public License, ver...
Use HAL_Delay in LED Task
#include "stdio.h" #include "FreeRTOS.h" #include "task.h" #include STM32_HAL_H void LedTask(void *pvParameters) { /* GPIO structure */ GPIO_InitTypeDef GPIO_InitStructure; /* Configure I/O speed, mode, output type and pull */ GPIO_InitStructure.Pin = GPIO_PIN_5; GPIO_InitStructure.Mode = GPIO_MOD...
#include "stdio.h" #include "FreeRTOS.h" #include "task.h" #include STM32_HAL_H void LedTask(void *pvParameters) { /* GPIO structure */ GPIO_InitTypeDef GPIO_InitStructure; /* Configure I/O speed, mode, output type and pull */ GPIO_InitStructure.Pin = GPIO_PIN_5; GPIO_InitStructure.Mode = GPIO_MOD...
Add missing classes to Foundation import
// // ObjectiveChain.h // Objective-Chain // // Created by Martin Kiss on 30.12.13. // Copyright © 2014 Martin Kiss. All rights reserved. // /// Producers #import "OCAProducer.h" #import "OCACommand.h" #import "OCAHub.h" #import "OCAProperty.h" #import "OCAInvoker.h" #import "OCANotificator.h" #import "OCATimer...
// // ObjectiveChain.h // Objective-Chain // // Created by Martin Kiss on 30.12.13. // Copyright © 2014 Martin Kiss. All rights reserved. // /// Producers #import "OCAProducer.h" #import "OCACommand.h" #import "OCAHub.h" #import "OCAProperty.h" #import "OCATimer.h" #import "OCANotificator.h" /// Mediators #i...
Add more test cases to trim
#include <string_manip.h> #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define TEST_STRS 4 char *test_strs_initial[TEST_STRS] = {" ", " a", "a ", " a "}; char *test_strs_correct[TEST_STRS] = {"", "a", "a", "a"}; int main() { int i; for(i = 0; i < TEST_STRS; i++) { char *dup...
#include <string_manip.h> #include <assert.h> #include <stdio.h> #include <stdlib.h> #include <string.h> #define TEST_STRS 6 char *test_strs_initial[TEST_STRS] = {"", " ", " a", "a ", " a ", " a a "}; char *test_strs_correct[TEST_STRS] = {"", "", "a", "a", "a", "a a"}; int main() { int i, result = 0; for(i = ...
Add new line at end
#pragma once #include <boost/timer/timer.hpp> namespace marian { namespace timer { using Timer = boost::timer::cpu_timer; using AutoTimer = boost::timer::auto_cpu_timer; } }
#pragma once #include <boost/timer/timer.hpp> namespace marian { namespace timer { using Timer = boost::timer::cpu_timer; using AutoTimer = boost::timer::auto_cpu_timer; } }
Add displacement mesh warper module header file
/*========================================================================= * * Copyright Leiden University Medical Center, Erasmus University Medical * Center and contributors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * Y...
Make sure to free memory in tests, and have better failure messages
#include <check.h> #include "../src/roman_calculator.h" START_TEST(can_add_by_simple_repetition) { ck_assert_str_eq("II", roman_calculator_add("I", "I")); ck_assert_str_eq("III", roman_calculator_add("I", "II")); ck_assert_str_eq("XXX", roman_calculator_add("XX", "X")); ck_assert_str_eq("CC", roman_calculator_add...
#include <stdlib.h> #include <check.h> #include "../src/roman_calculator.h" void verify_addition(const char *left, const char *right, const char *expected_result) { char *actual_result = roman_calculator_add(left, right); ck_assert_msg( strcmp(expected_result, actual_result) == 0, "%s + %s: expected %s, but w...
Add example where the generated witnesses are unsound.
//PARAM: --enable witness.yaml.enabled --enable ana.int.interval #include <stdlib.h> int foo(int* ptr1, int* ptr2){ int result; if(ptr1 == ptr2){ result = 0; } else { result = 1; } // Look at the generated witness.yml to check whether there contradictory precondition_loop_invariant[...
Fix 'implicitly declaring library function 'malloc' ...' warning
// Copyright 2017 Adam Cowdy // // 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...
// Copyright 2017 Adam Cowdy // // 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...
Remove some rarely-used headers from library pch
#pragma once #include "dependencies/tinyformat/tinyformat.h" #include <algorithm> #include <boost/algorithm/string/predicate.hpp> #include <boost/locale.hpp> #include <cstdint> #include <fstream> #include <glm/glm.hpp> #include <glm/vec2.hpp> #include <glm/vec3.hpp> #include <iostream> #include <istream> #include <ite...
#pragma once #include "dependencies/tinyformat/tinyformat.h" #include <algorithm> #include <cstdint> #include <fstream> #include <glm/glm.hpp> #include <glm/vec2.hpp> #include <glm/vec3.hpp> #include <iostream> #include <istream> #include <iterator> #include <limits> #include <list> #include <map> #include <memory> #i...
Add the missing PNaCl atomicops support.
// Protocol Buffers - Google's data interchange format // Copyright 2012 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistri...
Update blink_modular.ino: changed blinkrate argument to uint32_t
#ifndef Atm_blink_h #define Atm_blink_h #include <Automaton.h> class Atm_blink: public Machine { public: Atm_blink( void ) : Machine() { class_label = "BLNK"; }; short pin; atm_timer_millis timer; enum { LED_ON, LED_OFF } STATES; enum { EVT_TIMER, ELSE } EVENTS; enum { ACT_ON, ACT_OF...
#ifndef Atm_blink_h #define Atm_blink_h #include <Automaton.h> class Atm_blink: public Machine { public: Atm_blink( void ) : Machine() { class_label = "BLNK"; }; short pin; atm_timer_millis timer; enum { LED_ON, LED_OFF } STATES; enum { EVT_TIMER, ELSE } EVENTS; enum ...
Add restricted GPIO pins for FPGA testing
/* mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
/* mbed Microcontroller Library * Copyright (c) 2006-2013 ARM Limited * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless re...
Fix comment for Empty app
/* * Copyright (c) 2008-2012 the MansOS team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of con...
/* * Copyright (c) 2008-2012 the MansOS team. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions are met: * * Redistributions of source code must retain the above copyright notice, * this list of con...
Remove unnecessary import of UIKit
// // OneTimePasswordLegacy.h // OneTimePasswordLegacy // // Created by Matt Rubin on 7/10/14. // Copyright (c) 2014 Matt Rubin. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for OneTimePasswordLegacy. FOUNDATION_EXPORT double OneTimePasswordLegacyVersionNumber; //! Project version s...
// // OneTimePasswordLegacy.h // OneTimePasswordLegacy // // Created by Matt Rubin on 7/10/14. // Copyright (c) 2014 Matt Rubin. All rights reserved. // @import Foundation; //! Project version number for OneTimePasswordLegacy. FOUNDATION_EXPORT double OneTimePasswordLegacyVersionNumber; //! Project version strin...
Work on --daemon option handling
/** * main.c * * Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com> */ #include "common.h" #include "argv.h" #include "daemon.h" #include "usage.h" int main (int argc, char *argv[]) { int i; /** * If the `--help` option was given, display usage details and exit */ if (in_array(GIT_STASHD_USAGE_OPT,...
/** * main.c * * Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com> */ #include "common.h" #include "argv.h" #include "daemon.h" #include "usage.h" int main (int argc, char *argv[]) { /** * If the `--help` option was given, display usage details and exit. */ if (in_array(GIT_STASHD_USAGE_OPT, argv, a...
Make the declatarion match reality.
/* * */ typedef union { float floatingPoint; byte binary[4]; } binaryFloat; uint8_t setXBeePanId (uint16_t addr); uint8_t setXBeeMyAddress (uint16_t addr); uint8_t setXBeeChannel (uint8_t channel); uint8_t setXBeeHoppingChannel (uint8_t channel); uint8_t setXBeeChannelVerification (uint8_t mode); uint8_t setXBe...
/* * */ typedef union { float floatingPoint; byte binary[4]; } binaryFloat; uint8_t setXBeePanId (uint16_t addr); uint8_t setXBeeMyAddress (uint16_t addr); uint8_t setXBeeChannel (uint8_t channel); uint8_t setXBeeHoppingChannel (uint8_t channel); uint8_t setXBeeChannelVerification (uint8_t mode); uint8_t setXBe...
Fix a -Wpointer-to-int-cast when searching Jemalloc
#include <jemalloc.h> int main(int argc, char** argv) { (void)argv; return argc + (int)(malloc(42)); }
#include <jemalloc.h> int main(int argc, char** argv) { void *volatile dummyPtr = malloc(42); (void)argv; return argc; }
Define a protocol, study how to create and use the protocol in Objective-C programming.
/************************************************************************************************** * File name : MyProtocol.h * Description : Study how to create a protocol and use it. * Creator : Frederick Hsu * Creation date: Wed. 07 Sep. 2016 * Copyright(C) 2016 All rights reserved. * **********...
Add console implementation for Muen
/* * Copyright (c) 2017 Contributors as noted in the AUTHORS file * * This file is part of Solo5, a unikernel base layer. * * 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 no...
Include stdio.h in case bzlib.h needs it.
/* Copyright (c) 2005-2008 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "istream-internal.h" #include "istream-zlib.h" #ifdef HAVE_BZLIB #include <bzlib.h> #define BZLIB_INCLUDE #define gzFile BZFILE #define gzdopen BZ2_bzdopen #define gzclose BZ2_bzclose #define gzread BZ2_bzread #de...
/* Copyright (c) 2005-2008 Dovecot authors, see the included COPYING file */ #include "lib.h" #include "istream-internal.h" #include "istream-zlib.h" #ifdef HAVE_BZLIB #include <stdio.h> #include <bzlib.h> #define BZLIB_INCLUDE #define gzFile BZFILE #define gzdopen BZ2_bzdopen #define gzclose BZ2_bzclose #define gz...
Delete copy and move constructors.
// Copyright 2017 Massachusetts Institute of Technology #pragma once #include <csignal> #include <deque> #include <vector> #include <mutex> #include "pcl_ros/point_cloud.h" namespace global_mapper { typedef pcl::PointCloud<pcl::PointXYZ> PointCloud; class GlobalMapper { public: explicit GlobalMapper(volatile st...
// Copyright 2017 Massachusetts Institute of Technology #pragma once #include <csignal> #include <deque> #include <vector> #include <mutex> #include "pcl_ros/point_cloud.h" namespace global_mapper { typedef pcl::PointCloud<pcl::PointXYZ> PointCloud; class GlobalMapper { public: explicit GlobalMapper(volatile st...
Allow to change the parent widget after construction. Sometimes your main widget changes and you don't want to make a new logger.
/*Copyright 2010-2015 George Karagoulis 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 writing, so...
/*Copyright 2010-2015 George Karagoulis 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 writing, so...
Add support for MS 'EVEN' directive
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -fasm-blocks -emit-llvm -o - | FileCheck %s // CHECK: .byte 64 // CHECK: .byte 64 // CHECK: .byte 64 // CHECK: .even void t1() { __asm { .byte 64 .byte 64 .byte 64 EVEN mov eax, ebx } }
Increase the minimum interval for timers on background tabs to reduce their CPU consumption.
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ #define WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ namespace webkit_glue { // Chromium sets the minimum interval timeou...
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ #define WEBKIT_GLUE_WEBKIT_CONSTANTS_H_ namespace webkit_glue { // Chromium sets the minimum interval timeou...
Fix its tests in non-psa targets
/* Copyright (c) 2018 ARM Limited * * 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/LICENSE-2.0 * * Unle...
/* Copyright (c) 2018 ARM Limited * * 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/LICENSE-2.0 * * Unle...
Remove unused private instance variable
/* * This file is part of btag. * * © 2011 Fernando Tarlá Cardoso Lemos * * Refer to the LICENSE file for licensing information. * */ #ifndef CONFIRMATION_HANDLER_H #define CONFIRMATION_HANDLER_H #include <string> #include "BasicStringFilter.h" #include "InteractiveTerminal.h" class ConfirmationHandler { ...
/* * This file is part of btag. * * © 2011 Fernando Tarlá Cardoso Lemos * * Refer to the LICENSE file for licensing information. * */ #ifndef CONFIRMATION_HANDLER_H #define CONFIRMATION_HANDLER_H #include <string> #include "BasicStringFilter.h" #include "InteractiveTerminal.h" class ConfirmationHandler { ...
Remove unnecessary definition and disable EV_USE_MONOTONIC and EV_USE_REALTIME on windows
#define EV_STANDALONE /* keeps ev from requiring config.h */ #ifdef _WIN32 # define EV_SELECT_IS_WINSOCKET 1 /* configure libev for windows select */ # define FD_SETSIZE 2048 /* wishful thinking, as msvcrt6 [?] seems to only allow 512 fd's and 256 sockets max */ #endif #include "../libev/ev.h"
#define EV_STANDALONE /* keeps ev from requiring config.h */ #ifdef _WIN32 #define EV_SELECT_IS_WINSOCKET 1 /* configure libev for windows select */ #define EV_USE_MONOTONIC 0 #define EV_USE_REALTIME 0 #endif #include "../libev/ev.h"
Change RACKeyPathUtilities to be undefined on strings that aren't key paths.
// // NSString+RACKeyPathUtilities.h // ReactiveCocoa // // Created by Uri Baghin on 05/05/2013. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import <Foundation/Foundation.h> @interface NSString (RACKeyPathUtilities) // Returns an array of the components of the receiver, or nil if the receiver is ...
// // NSString+RACKeyPathUtilities.h // ReactiveCocoa // // Created by Uri Baghin on 05/05/2013. // Copyright (c) 2013 GitHub, Inc. All rights reserved. // #import <Foundation/Foundation.h> @interface NSString (RACKeyPathUtilities) // Returns an array of the components of the receiver. // // Calling this method ...
Fix compatibility with some modules
/** * \usergroup{SceUpdateMgr} * \usage{psp2/update.h,SceSblSsUpdateMgr_stub} */ #ifndef _PSP2_UPDATE_MGR_H_ #define _PSP2_UPDATE_MGR_H_ #include <psp2/types.h> typedef char SceUpdateMode; #define SCE_UPDATE_MODE_SWU_GUI 0x10 #define SCE_UPDATE_MODE_SWU_CUI 0x30 /** * Getting system update mode on boot * * @...
/** * \usergroup{SceUpdateMgr} * \usage{psp2/update.h,SceSblSsUpdateMgr_stub} */ #ifndef _PSP2_UPDATE_MGR_H_ #define _PSP2_UPDATE_MGR_H_ #include <psp2/types.h> typedef char SceUpdateMode; #define SCE_UPDATE_MODE_SWU_GUI 0x10 #define SCE_UPDATE_MODE_SWU_CUI 0x30 /** * Getting system update mode on boot * * @...
Test case for alignment directive change in LLVM r251418
// REQUIRES: x86-registered-target // RUN: %clang_cc1 %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s --check-prefix=DARWIN // RUN: %clang_cc1 %s -triple i686-pc-win32 -fasm-blocks -emit-llvm -o - | FileCheck %s --check-prefix=WINDOWS // On Windows, .align is in bytes, and on Darwin, .align ...
Document command to get even more details
#include <X11/Xlib.h> #include <X11/extensions/Xinerama.h> #include <stdbool.h> #include <stdio.h> int main() { Display *dpy = XOpenDisplay(NULL); int xinerama_event_base; int xinerama_error_base; bool xinerama_ready = XineramaQueryExtension(dpy,&xinerama_event_base, &xinerama_error_base); if (!xi...
#include <X11/Xlib.h> #include <X11/extensions/Xinerama.h> #include <stdbool.h> #include <stdio.h> int main() { Display *dpy = XOpenDisplay(NULL); int xinerama_event_base; int xinerama_error_base; bool xinerama_ready = XineramaQueryExtension(dpy,&xinerama_event_base, &xinerama_error_base); fprintf...
Put back this wholly innocent victim of Mike's drive-by shooting on alog; it belongs to the labpc driver. Mike will be in the corner wearing the pointed hat, should anyone be looking for him.
/* Header for general data acquisition definitions. */ #ifndef _SYS_DATAACQ_H_ #define _SYS_DATAACQ_H_ #include <sys/ioccom.h> /* Period in microseconds between analog I/O samples. */ #define AD_MICRO_PERIOD_SET _IOW('A', 1, long) #define AD_MICRO_PERIOD_GET _IOR('A', 2, long) /* Gain list support. Initially all...
Add newline to end of generated cunit header file
/* * Called by the Gradle CUnit launcher to register all CUnit tests. */ void gradle_cunit_register();
/* * Called by the Gradle CUnit launcher to register all CUnit tests. */ void gradle_cunit_register();
Add List destroy function declaration
#include <stdlib.h> #ifndef __LIST_H__ #define __LIST_H__ struct ListNode; struct List; typedef struct ListNode ListNode; typedef struct List List; List* List_Create(void); #endif
#include <stdlib.h> #ifndef __LIST_H__ #define __LIST_H__ struct ListNode; struct List; typedef struct ListNode ListNode; typedef struct List List; List* List_Create(void); void List_Destroy(List* l); #endif
Remove declaration of non-existent method
// Copyright (c) 2011 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_NACL_NACL_BROKER_LISTENER_H_ #define CHROME_NACL_NACL_BROKER_LISTENER_H_ #pragma once #include "base/memory/scoped_ptr.h" #include "ba...
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef CHROME_NACL_NACL_BROKER_LISTENER_H_ #define CHROME_NACL_NACL_BROKER_LISTENER_H_ #pragma once #include "base/memory/scoped_ptr.h" #include "ba...
Add TODO no deadlock test due to common mutex
// PARAM: --set ana.activated[+] deadlock #include <pthread.h> #include <stdio.h> int g1, g2; pthread_mutex_t mutex1 = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex2 = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t mutex3 = PTHREAD_MUTEX_INITIALIZER; void *t1(void *arg) { pthread_mutex_lock(&mutex3); // NODEADLOCK ...
Add documentation to Vector3 typedefs
/****************************************************************************** ** ** Copyright (C) 2009-2011 Kyle Lutz <kyle.r.lutz@gmail.com> ** ** This file is part of chemkit. For more information see ** <http://www.chemkit.org>. ** ** chemkit is free software: you can redistribute it and/or modify ** it under the ...
/****************************************************************************** ** ** Copyright (C) 2009-2011 Kyle Lutz <kyle.r.lutz@gmail.com> ** ** This file is part of chemkit. For more information see ** <http://www.chemkit.org>. ** ** chemkit is free software: you can redistribute it and/or modify ** it under the ...
Add solution to Exercise 2-3.
/* * A solution to Exercise 2-3 in The C Programming Language (Second Edition). * * This file was written by Damien Dart <damiendart@pobox.com>. This is free * and unencumbered software released into the public domain. For more * information, please refer to the accompanying "UNLICENCE" file. */ #include <ctype....
Allow ScallocAssert() to be used in Release code
// Copyright (c) 2015, the scalloc project authors. All rights reserved. // Please see the AUTHORS file for details. Use of this source code is governed // by a BSD license that can be found in the LICENSE file. #ifndef SCALLOC_PLATFORM_ASSERT_H_ #define SCALLOC_PLATFORM_ASSERT_H_ #include "log.h" #define DISALLOW...
// Copyright (c) 2015, the scalloc project authors. All rights reserved. // Please see the AUTHORS file for details. Use of this source code is governed // by a BSD license that can be found in the LICENSE file. #ifndef SCALLOC_PLATFORM_ASSERT_H_ #define SCALLOC_PLATFORM_ASSERT_H_ #include "log.h" #define DISALLOW...
Include stdlib.h and changed function declaration to extern
/** arm-016-util.h */ #ifndef RPI_UTIL_H #define RPI_UTIL_H #define SCREEN_WIDTH 640 #define SCREEN_HEIGHT 480 #define SCREEN_DEPTH 24 /* 16 or 32-bit */ #define COLOUR_DELTA 0.05 /* Float from 0 to 1 incremented by this amount */ #include <math.h> typedef struct { float r; float g; ...
/** arm-016-util.h */ #ifndef RPI_UTIL_H #define RPI_UTIL_H #define SCREEN_WIDTH 640 #define SCREEN_HEIGHT 480 #define SCREEN_DEPTH 24 /* 16 or 32-bit */ #define COLOUR_DELTA 0.05 /* Float from 0 to 1 incremented by this amount */ #include <math.h> #include <stdlib.h> typedef struct { float...
Fix irq offload inline asm memory ordering.
/* * Copyright (c) 2015 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 law or ...
/* * Copyright (c) 2015 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 law or ...
Fix issue with Windows build
/** * PANDA 3D SOFTWARE * Copyright (c) Carnegie Mellon University. All rights reserved. * * All use of this software is subject to the terms of the revised BSD * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * * @file stdtypedefs.h * @autho...
/** * PANDA 3D SOFTWARE * Copyright (c) Carnegie Mellon University. All rights reserved. * * All use of this software is subject to the terms of the revised BSD * license. You should have received a copy of this license along * with this source code in a file named "LICENSE." * * @file stdtypedefs.h * @autho...
Add missing file for the MPI test.
#include <stdio.h> #include <stdlib.h> #include <mpi.h> int main (int argc, char *argv[]) { int rank, size, length; char name[BUFSIZ]; MPI_Init (&argc, &argv); MPI_Comm_rank (MPI_COMM_WORLD, &rank); MPI_Comm_size (MPI_COMM_WORLD, &size); MPI_Get_processor_name (name, &length); printf ("%s: hello world ...
Fix TestProcessAttach for Linux ptracer lock-down and llgs-local.
#include <stdio.h> #include <unistd.h> int main(int argc, char const *argv[]) { // Waiting to be attached by the debugger. int temp = 0; while (temp < 30) // Waiting to be attached... { sleep(1); temp++; } printf("Exiting now\n"); }
#include <stdio.h> #include <unistd.h> #if defined(__linux__) #include <sys/prctl.h> #endif int main(int argc, char const *argv[]) { int temp; #if defined(__linux__) // Immediately enable any ptracer so that we can allow the stub attach // operation to succeed. Some Linux kernels are locked down so that ...
Add the vpsc library for IPSEPCOLA features
/** * \brief A block is a group of variables that must be moved together to improve * the goal function without violating already active constraints. * The variables in a block are spanned by a tree of active constraints. * * Authors: * Tim Dwyer <tgdwyer@gmail.com> * * Copyright (C) 2005 Authors * * This v...
Remove volatile from test (decl_equal doesn't check properly for now)
int f(int x[static volatile /*const*/ 10]) { return *++x; } main() { int x[5]; x[1] = 2; f(x); //int y[1]; //int *y; //#define y (void *)0 //pipe(y); }
int f(int x[static /*const*/ 10]) { return *++x; } main() { int x[5]; x[1] = 2; f(x); //int y[1]; //int *y; //#define y (void *)0 //pipe(y); }
Replace CALLS_MAP symbol in compile-tested binaries
/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2016-2020 Authors of Cilium */ /* * This is just a dummy header with dummy values to allow for test * compilation without the full code generation engine backend. */ #define DROP_NOTIFY #ifndef SKIP_DEBUG #define DEBUG #endif #define ENCAP_IFINDEX 1 #define SE...
/* SPDX-License-Identifier: GPL-2.0 */ /* Copyright (C) 2016-2020 Authors of Cilium */ /* * This is just a dummy header with dummy values to allow for test * compilation without the full code generation engine backend. */ #define DROP_NOTIFY #ifndef SKIP_DEBUG #define DEBUG #endif #define ENCAP_IFINDEX 1 #define SE...
Include specific declarations only on ńon-Windows platform
#define INTERCOM_FLATTEN_DECLARATIONS #include <intercom.h> #include "../../intercom-cpp/src/msdef.h" // Interface definitions. #ifdef _MSC_VER #include "msvc/import.h" #endif // Platform specific runtime initialization. void InitializeRuntime(); // Platform specific runtime uninitialization. void UninitializeRunt...
// Interface definitions. #ifdef _MSC_VER #include "msvc/import.h" #else // Include declarations on non-Windows platforms. #define INTERCOM_FLATTEN_DECLARATIONS #include <intercom.h> #include "../../intercom-cpp/src/msdef.h" #endif // Platform specific runtime initialization. void InitializeRuntime(); // Platform ...
Use 4KB as the default page size
#ifndef BLOCK_PAGE_SIZE # define BLOCK_PAGE_SIZE 65536 #endif #include <stddef.h> struct block { void **pages; size_t *offsets; size_t count; size_t size; }; struct block *block_new(void); void block_free(struct block*); void *block_alloc(struct block*, size_t bytes);
#ifndef BLOCK_PAGE_SIZE # define BLOCK_PAGE_SIZE 4096 #endif #include <stddef.h> struct block { void **pages; size_t *offsets; size_t count; size_t size; }; struct block *block_new(void); void block_free(struct block*); void *block_alloc(struct block*, size_t bytes);
Add example code for FIFO
//============================================================================// // File: demo_buffer_fifo.c // // Description: Example for CANpie FIFO configuration // // ...
Create a bridging header so we can import important libraries implicitly.
// // SouqTask-Bridging-Header.h // SouqTask // // Created by Ma'moun Diraneyya on 3/4/16. // Copyright © 2016 Mamouneyya. All rights reserved. // // NOTE This workaround is used to import important libraries everywhere in the app // REF http://stackoverflow.com/questions/26408612/implicitly-import-specific-swift...
Fix Neurons struct so that hidden is 2D
#include <stdio.h> #define INPUTS 3 #define HIDDEN 5 #define OUTPUTS 2 #define ROWS 5 typedef struct { double input[HIDDEN][INPUTS]; double hidden[ROWS - 3][HIDDEN][HIDDEN]; double output[OUTPUTS][HIDDEN]; } Links; typedef struct { int input[INPUTS]; int hidden[HIDDEN]; int output[OUTPUTS]; }...
#include <stdio.h> #define INPUTS 3 #define HIDDEN 5 #define OUTPUTS 2 #define ROWS 5 typedef struct { double input[HIDDEN][INPUTS]; double hidden[ROWS - 3][HIDDEN][HIDDEN]; double output[OUTPUTS][HIDDEN]; } Links; typedef struct { int input[INPUTS]; int hidden[ROWS - 3][HIDDEN]; int output[O...
Add strings (will be used for translation)
#pragma once #include "Tab.h" class Display : public Tab { public: virtual void SaveSettings(); private: virtual DLGPROC Command(unsigned short nCode, unsigned short ctrlId); virtual DLGPROC Notification(NMHDR *nHdr); virtual void Initialize(); virtual void LoadSettings(); void OnPositionCh...
#pragma once #include "Tab.h" class Display : public Tab { public: virtual void SaveSettings(); private: virtual DLGPROC Command(unsigned short nCode, unsigned short ctrlId); virtual DLGPROC Notification(NMHDR *nHdr); virtual void Initialize(); virtual void LoadSettings(); void OnPositionCh...
Update Skia milestone to 95
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 94 #endif
/* * Copyright 2016 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SK_MILESTONE #define SK_MILESTONE 95 #endif
Add Makefile, bwio lib, headers and compile script
int main() { printf("Hello World!\n"); return 0; }
#include <bwio.h> int main() { bwsetfifo(COM2, OFF); bwprintf(COM2, "Hello World!\n"); return 0; }
Fix stations details request url (webservices were updated)
// // Velib.h // Bicyclette // // Created by Nicolas on 09/10/10. // Copyright 2010 Nicolas Bouilleaud. All rights reserved. // #import "CoreDataManager.h" #import <MapKit/MapKit.h> #define kVelibStationsListURL @"http://www.velib.paris.fr/service/carto" #define kVelibStationsStatusURL @"http://www.velib.paris...
// // Velib.h // Bicyclette // // Created by Nicolas on 09/10/10. // Copyright 2010 Nicolas Bouilleaud. All rights reserved. // #import "CoreDataManager.h" #import <MapKit/MapKit.h> #define kVelibStationsListURL @"http://www.velib.paris.fr/service/carto" #define kVelibStationsStatusURL @"http://www.velib.paris...
Add enums for credentials acquire methods
/* * Copyright (c) 2014 Samsung Electronics Co., Ltd 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 * * ...
/* * Copyright (c) 2014 Samsung Electronics Co., Ltd 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 * * ...