Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Create MatrixBufferType struct to hold current world, view, and projection matricies
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #ifndef CRATE_DEMO_GRAPHICS_MANAGER_H #define CRATE_DEMO_GRAPHICS_MANAGER_H #include "common/graphics_manager_base.h" #include <d3d11.h> #include "DirectXMath...
/* The Halfling Project - A Graphics Engine and Projects * * The Halfling Project is the legal property of Adrian Astley * Copyright Adrian Astley 2013 */ #ifndef CRATE_DEMO_GRAPHICS_MANAGER_H #define CRATE_DEMO_GRAPHICS_MANAGER_H #include "common/graphics_manager_base.h" #include <d3d11.h> #include "DirectXMath...
Add loading view to SVPUllToRefresh header
// // SVPullToRefresh.h // SVPullToRefreshDemo // // Created by Sam Vermette on 23.04.12. // Copyright (c) 2012 samvermette.com. All rights reserved. // // https://github.com/samvermette/SVPullToRefresh // // this header file is provided for backwards compatibility and will be removed in the future // here's how you...
// // SVPullToRefresh.h // SVPullToRefreshDemo // // Created by Sam Vermette on 23.04.12. // Copyright (c) 2012 samvermette.com. All rights reserved. // // https://github.com/samvermette/SVPullToRefresh // // this header file is provided for backwards compatibility and will be removed in the future // here's how you...
Fix public header for macOS
// // Lottie.h // Pods // // Created by brandon_withrow on 1/27/17. // // #if __has_feature(modules) @import Foundation; #else #import <Foundation/Foundation.h> #endif #ifndef Lottie_h #define Lottie_h //! Project version number for Lottie. FOUNDATION_EXPORT double LottieVersionNumber; //! Project version string...
// // Lottie.h // Pods // // Created by brandon_withrow on 1/27/17. // // #if __has_feature(modules) @import Foundation; #else #import <Foundation/Foundation.h> #endif #ifndef Lottie_h #define Lottie_h //! Project version number for Lottie. FOUNDATION_EXPORT double LottieVersionNumber; //! Project version string...
Switch on vowels in argument
#include <stdio.h> int main(int argc, char *argv[]){ if(argc != 2){ printf("You must supply one argument!\n"); //this is how you abort a program. return 1; } return 0; }
#include <stdio.h> int main(int argc, char *argv[]){ if(argc != 2){ printf("You must supply one argument!\n"); //this is how you abort a program. return 1; } int i = 0; for(i = 0; argv[1][i] != '\0'; i++){ char letter = argv[1][i]; switch(letter){ ...
Fix EVK status led to be inverted
#define MICROPY_HW_BOARD_NAME "iMX RT 1060 EVK" #define MICROPY_HW_MCU_NAME "IMXRT1062DVJ6A" // If you change this, then make sure to update the linker scripts as well to // make sure you don't overwrite code #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define BOARD_FLASH_SIZE (8 * 1024 * 1024) #define MICROPY_HW_LED_STAT...
#define MICROPY_HW_BOARD_NAME "iMX RT 1060 EVK" #define MICROPY_HW_MCU_NAME "IMXRT1062DVJ6A" // If you change this, then make sure to update the linker scripts as well to // make sure you don't overwrite code #define CIRCUITPY_INTERNAL_NVM_SIZE 0 #define BOARD_FLASH_SIZE (8 * 1024 * 1024) #define MICROPY_HW_LED_STAT...
Update Skia milestone to 79
/* * 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 78 #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 79 #endif
Make pump happy. Add in this header. -Erik
/* Definitions for use with Linux AF_PACKET sockets. Copyright (C) 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the F...
Remove no longer used SkipEncodingUnusedStreams.
/* * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
/* * Copyright (c) 2013 The WebRTC project authors. All Rights Reserved. * * Use of this source code is governed by a BSD-style license * that can be found in the LICENSE file in the root of the source * tree. An additional intellectual property rights grant can be found * in the file PATENTS. All contribut...
Put Pointer Authentication key value in BSS section
/* * Copyright (c) 2019, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <cdefs.h> #include <stdint.h> /* * Instruction pointer authentication key A. The low 64-bit are at [0], and the * high bits at [1]. They are run-time constants so they are placed in the * rodata sec...
/* * Copyright (c) 2019, Arm Limited. All rights reserved. * * SPDX-License-Identifier: BSD-3-Clause */ #include <cdefs.h> #include <stdint.h> /* * Instruction pointer authentication key A. The low 64-bit are at [0], and the * high bits at [1]. */ uint64_t plat_apiakey[2]; /* * This is only a toy implementat...
Use standard notations for mega (M) and giga (G)
#include <stdio.h> #include <stdarg.h> #include <haka/stat.h> #include <haka/types.h> bool stat_printf(FILE *out, const char *format, ...) { va_list args; va_start(args, format); vfprintf(out, format, args); va_end(args); return true; } size_t format_bytes(size_t v, char *c) { if (v > (1 << 30)) { *c = 'g';...
#include <stdio.h> #include <stdarg.h> #include <haka/stat.h> #include <haka/types.h> bool stat_printf(FILE *out, const char *format, ...) { va_list args; va_start(args, format); vfprintf(out, format, args); va_end(args); return true; } size_t format_bytes(size_t v, char *c) { if (v > (1 << 30)) { *c = 'G';...
Make testcase more robust for completely-out-of-tree builds.
// RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ // RUN: %s -emit-llvm -o - | FileCheck %s // RUN: cp %s %t.c // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ // RUN: %t.c -emit-llvm -o - | FileCheck %s --check-prefix=INTREE void foo() {} // Since %s is an absolut...
// RUN: mkdir -p %t/UNIQUEISH_SENTINEL // RUN: cp %s %t/UNIQUEISH_SENTINEL/debug-info-abspath.c // RUN: %clang_cc1 -debug-info-kind=limited -triple %itanium_abi_triple \ // RUN: %t/UNIQUEISH_SENTINEL/debug-info-abspath.c -emit-llvm -o - \ // RUN: | FileCheck %s // RUN: cp %s %t.c // RUN: %clang_cc1 -debug-info-ki...
Add message when tests are finished.
/* * Copyright (C) 2014 René Kijewski <rene.kijewski@fu-berlin.de> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any l...
/* * Copyright (C) 2014 René Kijewski <rene.kijewski@fu-berlin.de> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any l...
Change protector macro to match the filename
/* * Copyright (C) 2016 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) 2016 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...
Solve Age in Days in c
#include <stdio.h> int main() { int t, a = 0, m = 0, d = 0; while (scanf("%d", &t) != EOF) { if (t >= 365) { a = t / 365; t %= 365; } if (t >= 30) { m = t / 30; t %= 30; } d = t; printf("%d ano(s)\n", a); ...
Delete some extern vars that were in ugens.h. Other minor cleanups.
/* command_line.c */ /* to return command line arguments */ #include "../H/ugens.h" #include "../Minc/defs.h" #include "../Minc/ext.h" extern int aargc; extern char *aargv[]; /* to pass commandline args to subroutines */ double f_arg(float *p, short n_args) { double atof(); return (((int)p[0]) < aargc - 1)...
/* command_line.c */ /* to return command line arguments */ #include <stdlib.h> #include <math.h> #include <ugens.h> #include "../Minc/ext.h" double f_arg(float *p, short n_args) { return (((int)p[0]) < aargc - 1) ? (atof(aargv[(int)p[0]])) : 0.0; } double i_arg(float *p, short n_args) { return (((int)p[0]) < aarg...
Remove warning `Warning: Unused class rule: PackedContainer`
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class CustomStruct+; #pragma link C++ class DerivedA+; #pragma link C++ class DerivedA2+; #pragma link C++ class DerivedB+; #pragma link C++ class DerivedC+; #pragma link C++ class IAuxSetOpti...
#ifdef __CINT__ #pragma link off all globals; #pragma link off all classes; #pragma link off all functions; #pragma link C++ class CustomStruct+; #pragma link C++ class DerivedA+; #pragma link C++ class DerivedA2+; #pragma link C++ class DerivedB+; #pragma link C++ class DerivedC+; #pragma link C++ class IAuxSetOpti...
Update test case for llvm summary format changes in D17592.
// RUN: %clang_cc1 -flto=thin -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck %s // CHECK: <FUNCTION_SUMMARY_BLOCK // CHECK-NEXT: <PERMODULE_ENTRY // CHECK-NEXT: <PERMODULE_ENTRY // CHECK-NEXT: </FUNCTION_SUMMARY_BLOCK __attribute__((noinline)) void foo() {} int main() { foo(); }
// RUN: %clang_cc1 -flto=thin -emit-llvm-bc < %s | llvm-bcanalyzer -dump | FileCheck %s // CHECK: <GLOBALVAL_SUMMARY_BLOCK // CHECK-NEXT: <PERMODULE // CHECK-NEXT: <PERMODULE // CHECK-NEXT: </GLOBALVAL_SUMMARY_BLOCK __attribute__((noinline)) void foo() {} int main() { foo(); }
Use GCC visibility for exporting symbols
/* * * OBEX Server * * Copyright (C) 2007-2009 Marcel Holtmann <marcel@holtmann.org> * * * 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 * (a...
/* * * OBEX Server * * Copyright (C) 2007-2009 Marcel Holtmann <marcel@holtmann.org> * * * 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 * (a...
Fix timezone issue -- call the correct C function
#define _XOPEN_SOURCE #include <time.h> #include <locale.h> void set_c_locale() { setlocale(LC_TIME, "C"); } time_t c_parse_http_time(char* s) { struct tm dest; strptime(s, "%a, %d %b %Y %H:%M:%S GMT", &dest); return mktime(&dest); } void c_format_http_time(time_t src, char* dest) { struct tm t...
#define _XOPEN_SOURCE #include <time.h> #include <locale.h> void set_c_locale() { setlocale(LC_TIME, "C"); } time_t c_parse_http_time(char* s) { struct tm dest; strptime(s, "%a, %d %b %Y %H:%M:%S GMT", &dest); return timegm(&dest); } void c_format_http_time(time_t src, char* dest) { struct tm t...
Add receiver and meta data
#ifndef TIN_BUSSIGNALDEF_H #define TIN_BUSSIGNALDEF_H #include <cstdint> #include <string> namespace tin { enum class Byte_order : std::uint8_t { Intel, Moto }; enum class Value_sign : std::uint8_t { Signed, Unsigned }; struct Bus_signal_def { bool multiplex_switch; Byte_order order; Value_sign sign; st...
#ifndef TIN_BUSSIGNALDEF_H #define TIN_BUSSIGNALDEF_H #include <cstdint> #include <string> #include <vector> namespace tin { enum class Byte_order : std::uint8_t { Intel, Moto }; enum class Value_sign : std::uint8_t { Signed, Unsigned }; struct Bus_signal_meta_data { std::int8_t factor_precision = 7; std::i...
Allow to build with clang-cl
#ifndef stdbool_h #define stdbool_h #include <wtypes.h> /* MSVC doesn't define _Bool or bool in C, but does have BOOL */ /* Note this doesn't pass autoconf's test because (bool) 0.5 != true */ typedef BOOL _Bool; #define bool _Bool #define true 1 #define false 0 #define __bool_true_false_are_defined 1 #endif /* st...
#ifndef stdbool_h #define stdbool_h #include <wtypes.h> /* MSVC doesn't define _Bool or bool in C, but does have BOOL */ /* Note this doesn't pass autoconf's test because (bool) 0.5 != true */ /* Clang-cl uses MSVC headers, so needs msvc_compat, but has _Bool as * a built-in type. */ #ifndef __clang__ typedef BOOL _...
Add tests for RDM feature.
// RUN: %clang -target aarch64-none-none-eabi -march=armv8a+rdm -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-RDM %s // RUN: %clang -target aarch64-none-none-eabi -mcpu=generic+rdm -### -c %s 2>&1 | FileCheck --check-prefix=CHECK-RDM %s // RUN: %clang -target aarch64-none-none-eabi -mcpu=falkor -### -c %s 2>&1 | Fil...
Add docs to authenticator header.
// // TJDropboxAuthenticator.h // Close-up // // Created by Tim Johnsen on 3/14/20. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(10.0)) @interface TJDropboxAuthenticator : NSObject + (void)authenticateWithClientIdentifier:(NSString *const)clientIdentifier by...
// // TJDropboxAuthenticator.h // Close-up // // Created by Tim Johnsen on 3/14/20. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN API_AVAILABLE(ios(10.0)) @interface TJDropboxAuthenticator : NSObject /** * Invoke this to initiate auth * @param clientIdentifier Your registered Dropbox client iden...
Add a generic rack-pinion steering subsystem.
// ============================================================================= // PROJECT CHRONO - http://projectchrono.org // // Copyright (c) 2014 projectchrono.org // All right reserved. // // Use of this source code is governed by a BSD-style license that can be found // in the LICENSE file at the top level of th...
Change how proxr resources are set. Previously it was given a value 0-255 which the proxr hardware uses to set the voltage. now just give it a voltage and do the conversion in the hab. also if a voltage supplied is out of range it snaps to nearest in range.
#include <string.h> #include <stdlib.h> #include "proxrcmds.h" #include "sim-hab.h" void cb_set_resource(bionet_resource_t *resource, bionet_value_t *value) { double data; double content; char number[3]; char *res_name = NULL; long int id; bionet_node_t *node; bionet_value_get_double(value...
#include <string.h> #include <stdlib.h> #include "proxrcmds.h" #include "sim-hab.h" void cb_set_resource(bionet_resource_t *resource, bionet_value_t *value) { double data; double content; char number[3]; char *res_name = NULL; long int id; bionet_node_t *node; bionet_value_get_double(value...
Fix type missmatch (crucial for wasienv)
// // m3_api_defs.h // // Created by Volodymyr Shymanskyy on 12/20/19. // Copyright © 2019 Volodymyr Shymanskyy. All rights reserved. // #ifndef m3_api_defs_h #define m3_api_defs_h #include "m3_core.h" #define m3ApiReturnType(TYPE) TYPE* raw_return = ((TYPE*) (_sp)); #define m3ApiGetArg(TYPE, NAME) TYPE N...
// // m3_api_defs.h // // Created by Volodymyr Shymanskyy on 12/20/19. // Copyright © 2019 Volodymyr Shymanskyy. All rights reserved. // #ifndef m3_api_defs_h #define m3_api_defs_h #include "m3_core.h" #define m3ApiReturnType(TYPE) TYPE* raw_return = ((TYPE*) (_sp)); #define m3ApiGetArg(TYPE, NAME) TYPE N...
Remove unused and untested Payload constructor
#ifndef CPR_PAYLOAD_H #define CPR_PAYLOAD_H #include <memory> #include <string> #include <initializer_list> namespace cpr { struct Pair { Pair(const std::string& key, const std::string& value) : key{key}, value{value} {} Pair(const std::string& key, const int& value) : key{key}, value{std::to_string(value)} ...
#ifndef CPR_PAYLOAD_H #define CPR_PAYLOAD_H #include <memory> #include <string> #include <initializer_list> namespace cpr { struct Pair { Pair(const std::string& key, const std::string& value) : key{key}, value{value} {} Pair(const std::string& key, const int& value) : key{key}, value{std::to_string(value)} ...
Add alias to sys_rand and sys_srand
static unsigned long next = 1; /* RAND_MAX assumed to be 32767 */ int sys_rand(void) { next = next * 1103515245 + 12345; return((unsigned)(next/65536) % 32768); } void sys_srand(unsigned seed) { next = seed; }
static unsigned long next = 1; /* RAND_MAX assumed to be 32767 */ int sys_rand(void) { next = next * 1103515245 + 12345; return((unsigned)(next/65536) % 32768); } void sys_srand(unsigned seed) { next = seed; } __attribute__((weak)) int rand(void) { return sys_rand(); } __attribute__((weak)) void srand(un...
Remove needless include of Cocoa.
// // CwlSignal.h // CwlSignal // // Created by Matt Gallagher on 11/6/16. // Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. // #import <Cocoa/Cocoa.h> //! Project version number for CwlSignal. FOUNDATION_EXPORT double CwlSignalVersionNumber; //! Project version string for Cwl...
// // CwlSignal.h // CwlSignal // // Created by Matt Gallagher on 11/6/16. // Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. // #import <Foundation/Foundation.h> //! Project version number for CwlSignal. FOUNDATION_EXPORT double CwlSignalVersionNumber; //! Project version stri...
Fix a comment that wasn't commente'd out
/*------------------------------------------------------------------------- * * dynahash-- * POSTGRES dynahash.h file definitions * * * Copyright (c) 1994, Regents of the University of California * * $Id: dynahash.h,v 1.1 1996/11/09 05:48:28 momjian Exp $ * *------------------------------------------------...
/*------------------------------------------------------------------------- * * dynahash-- * POSTGRES dynahash.h file definitions * * * Copyright (c) 1994, Regents of the University of California * * $Id: dynahash.h,v 1.2 1996/11/14 20:06:39 scrappy Exp $ * *------------------------------------------------...
Add portable floating point parsing with optional grisu3 support
#ifndef PPARSEFP_H #define PPARSEFP_H /* * Parses a float or double number and returns the length parsed if * successful. The length argument is of limited value due to dependency * on `strtod` - buf[len] must be accessible and must not be part of * a valid number, including hex float numbers.. * * Unlike strtod...
Use memset instead of bzero
/* Copyright (C) 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the Licen...
/* Copyright (C) 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the Licen...
Fix for building without notify
/* Copyright (C) 2003 Timo Sirainen */ #include "lib.h" #include "ioloop-internal.h" #ifdef IOLOOP_NOTIFY_NONE struct io *io_loop_notify_add(struct ioloop *ioloop __attr_unused__, const char *path __attr_unused__, io_callback_t *callback __attr_unused__, void *context __attr_unused__) { r...
/* Copyright (C) 2003 Timo Sirainen */ #include "lib.h" #include "ioloop-internal.h" #ifdef IOLOOP_NOTIFY_NONE #undef io_add_notify struct io *io_add_notify(const char *path __attr_unused__, io_callback_t *callback __attr_unused__, void *context __attr_unused__) { return NULL; } void io_loop_notify_remove(...
Fix guards for renamed header files.
#ifndef FHASH_H #define FHASH_H /* Box the filename pointer in a struct, for added typechecking. */ typedef struct fname { char *name; } fname; set *fname_new_set(int sz_factor); fname *fname_new(char *n, size_t len); fname *fname_add(set *wt, fname *f); void fname_free(void *w); #endif
#ifndef FNAME_H #define FNAME_H /* Box the filename pointer in a struct, for added typechecking. */ typedef struct fname { char *name; } fname; set *fname_new_set(int sz_factor); fname *fname_new(char *n, size_t len); fname *fname_add(set *wt, fname *f); void fname_free(void *w); #endif
Move inliner pass header file.
//===- InlinerPass.h - Code common to all inliners --------------*- 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. // //===----------...
Use class for non-trivial types
// This file is distributed under the MIT license. // See the LICENSE file for details. #pragma once #ifndef VSNRAY_DETAIL_SPD_BLACKBODY_H #define VSNRAY_DETAIL_SPD_BLACKBODY_H 1 #include <cmath> #include "../macros.h" namespace visionaray { //----------------------------------------------------------------------...
// This file is distributed under the MIT license. // See the LICENSE file for details. #pragma once #ifndef VSNRAY_DETAIL_SPD_BLACKBODY_H #define VSNRAY_DETAIL_SPD_BLACKBODY_H 1 #include <cmath> #include "../macros.h" namespace visionaray { //----------------------------------------------------------------------...
Fix headers so SNTP builds on Esp32
// // Copyright (c) 2018 The nanoFramework project contributors // Portions Copyright (c) Microsoft Corporation. All rights reserved. // See LICENSE file in the project root for full license information. // #ifndef _NF_NETWORKING_SNTP_H_ #define _NF_NETWORKING_SNTP_H_ #include <nanoCLR_Interop.h> #include <nanoCLR_...
// // Copyright (c) 2018 The nanoFramework project contributors // Portions Copyright (c) Microsoft Corporation. All rights reserved. // See LICENSE file in the project root for full license information. // #ifndef _NF_NETWORKING_SNTP_H_ #define _NF_NETWORKING_SNTP_H_ #include <nanoCLR_Interop.h> #include <nanoCLR_...
Refactor trace values to work as a proper pass. Before it used to add methods while the pass was running which was a no no. Now it adds the printf method at pass initialization
//===- llvm/Transforms/Instrumentation/TraceValues.h - Tracing ---*- C++ -*--=// // // Support for inserting LLVM code to print values at basic block and method // exits. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H #define LL...
//===- llvm/Transforms/Instrumentation/TraceValues.h - Tracing ---*- C++ -*--=// // // Support for inserting LLVM code to print values at basic block and method // exits. // //===----------------------------------------------------------------------===// #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_TRACEVALUES_H #define LL...
Remove an include which has been upstreamed to ImageDiff.cpp.
// 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_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #include <string> #include <vector> // TODO(darin): Remove...
// 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_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #define WEBKIT_SUPPORT_WEBKIT_SUPPORT_GFX_H_ #include <string> #include <vector> namespace webkit_suppo...
Make this test target independent.
// REQUIRES: x86-registered-target // RUN: %clang -target i386-unknown-linux -masm=intel %s -S -o - | FileCheck --check-prefix=CHECK-INTEL %s // RUN: %clang -target i386-unknown-linux -masm=att %s -S -o - | FileCheck --check-prefix=CHECK-ATT %s // RUN: not %clang -target i386-unknown-linux -masm=somerequired %s -S -o -...
// RUN: %clang -target i386-unknown-linux -masm=intel -S %s -### 2>&1 | FileCheck --check-prefix=CHECK-INTEL %s // RUN: %clang -target i386-unknown-linux -masm=att -S %s -### 2>&1 | FileCheck --check-prefix=CHECK-ATT %s // RUN: %clang -target i386-unknown-linux -S -masm=somerequired %s -### 2>&1 | FileCheck --check-pre...
Add prototype to prevent warning.
#ifndef PYTHON_THREADS #define PYTHON_THREADS #ifdef __EMSCRIPTEN__ static inline void init_python_threads() { } #else #include "Python.h" static inline void init_python_threads() { PyEval_InitThreads(); } #endif #endif
#ifndef PYTHON_THREADS #define PYTHON_THREADS #ifdef __EMSCRIPTEN__ static inline void init_python_threads(void) { } #else #include "Python.h" static inline void init_python_threads(void) { PyEval_InitThreads(); } #endif #endif
Stop SkyShell from crashing on startup
// Copyright 2015 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 SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ #define SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ #include "sky/shell/platform_view.h" struct ANativeWindow; namesp...
// Copyright 2015 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 SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ #define SKY_SHELL_PLATFORM_VIEW_ANDROID_H_ #include "sky/shell/platform_view.h" struct ANativeWindow; namesp...
Include spotify/api.h and request.h instead of sp_opaque.h
#ifndef LIBOPENSPOTIFY_BROWSE_H #define LIBOPENSPOTIFY_BROWSE_H #include "buf.h" #include "sp_opaque.h" #define BROWSE_RETRY_TIMEOUT 30 int browse_process(sp_session *session, struct request *req); #endif
#ifndef LIBOPENSPOTIFY_BROWSE_H #define LIBOPENSPOTIFY_BROWSE_H #include <spotify/api.h> #include "buf.h" #include "request.h" #define BROWSE_RETRY_TIMEOUT 30 int browse_process(sp_session *session, struct request *req); #endif
Add a test for octagon
// PARAM: --sets solver td3 --set ana.activated "['base','threadid','threadflag','mallocWrapper','octApron']" // Example from https://github.com/sosy-lab/sv-benchmarks/blob/master/c/bitvector-regression/signextension-1.c #include "stdio.h" #include <assert.h> int main() { // This test is a part taken from of 24 13 ...
Move this file into public domain; it's too simple to copyright...
/* * Copyright (c) 2014, 2016 Scott Bennett <scottb@fastmail.com> * * 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...
/* * Written by Scott Bennett. * Public domain. */ #ifndef LOADER_H #define LOADER_H #include "bool.h" bool load(const char * fileName); #endif /* LOADER_H */
Fix test when isPICDefault() returns false after rCTE352003
// Ensure compatiblity of UBSan unreachable with ASan in the presence of // noreturn functions // RUN: %clang -O2 -fsanitize=address,unreachable %s -emit-llvm -S -o - | FileCheck %s // REQUIRES: ubsan-asan void bar(void) __attribute__((noreturn)); void foo() { bar(); } // CHECK-LABEL: define void @foo() // CHECK: ...
// Ensure compatiblity of UBSan unreachable with ASan in the presence of // noreturn functions // RUN: %clang -O2 -fPIC -fsanitize=address,unreachable %s -emit-llvm -S -o - | FileCheck %s // REQUIRES: ubsan-asan void bar(void) __attribute__((noreturn)); void foo() { bar(); } // CHECK-LABEL: define void @foo() // CH...
Add missing 'extern' when declaring NSStringFromSPTPersistentCacheResponseCode in header
/* * Copyright (c) 2016 Spotify AB. * * 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,...
/* * Copyright (c) 2016 Spotify AB. * * 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,...
Add explicit specifier to Simulator ctor
/* * simulator.h - interface for simulator * Copyright 2018 MIPT-MIPS */ #ifndef SIMULATOR_H #define SIMULATOR_H #include <memory.h> #include <infra/types.h> #include <infra/log.h> class Simulator : public Log { public: Simulator( bool log = false) : Log( log) {} virtual void run(const std::string& t...
/* * simulator.h - interface for simulator * Copyright 2018 MIPT-MIPS */ #ifndef SIMULATOR_H #define SIMULATOR_H #include <memory.h> #include <infra/types.h> #include <infra/log.h> class Simulator : public Log { public: explicit Simulator( bool log = false) : Log( log) {} virtual void run(const std::...
Add a structure defintion for the id prom contents.
/* * Copyright (c) 1993 Adam Glass * 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 condition...
Make hex string buffer guarantee a null terminator
#include <stdio.h> #include "memdumper.h" static const char HEX[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', }; void byteToHex(char byte, char* output) { output[0] = HEX[(byte >> 4) & 0x0F]; output[1] = HEX[byte & 0x0F]; } void dumpMemoryAsHex(char* da...
#include <stdio.h> #include "memdumper.h" static const char HEX[] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F', }; void byteToHex(char byte, char* output) { output[0] = HEX[(byte >> 4) & 0x0F]; output[1] = HEX[byte & 0x0F]; } void dumpMemoryAsHex(char* da...
Add more methods to be more value-like
//===-- llvm/Support/ValueHolder.h - Wrapper for Value's --------*- C++ -*-===// // // This class defines a simple subclass of User, which keeps a pointer to a // Value, which automatically updates when Value::replaceAllUsesWith is called. // This is useful when you have pointers to Value's in your pass, but the // poi...
//===-- llvm/Support/ValueHolder.h - Wrapper for Value's --------*- C++ -*-===// // // This class defines a simple subclass of User, which keeps a pointer to a // Value, which automatically updates when Value::replaceAllUsesWith is called. // This is useful when you have pointers to Value's in your pass, but the // poi...
Fix unresolved symbol when pkcs11 is disabled
/* GIO - GLib Input, Output and Streaming Library * * Copyright 2010 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your ...
/* GIO - GLib Input, Output and Streaming Library * * Copyright 2010 Red Hat, Inc. * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your ...
Use correct cffi type for 'value'
#ifndef NME_BYTE_ARRAY_H #define NME_BYTE_ARRAY_H #include <nme/Object.h> #include <nme/QuickVec.h> #include "Utils.h" namespace nme { // If you put this structure on the stack, then you do not have to worry about GC. // If you store this in a heap structure, then you will need to use GC roots for mValue... struct ...
#ifndef NME_BYTE_ARRAY_H #define NME_BYTE_ARRAY_H #include <nme/Object.h> #include <nme/QuickVec.h> #include "Utils.h" #include <hx/CFFI.h> namespace nme { // If you put this structure on the stack, then you do not have to worry about GC. // If you store this in a heap structure, then you will need to use GC roots ...
Add a missing config header
C $Header$ C $Name$ C CPP options file for GM/Redi package C C Use this file for selecting options within the GM/Redi package C #ifndef GMREDI_OPTIONS_H #define GMREDI_OPTIONS_H #include "PACKAGES_CONFIG.h" #ifdef ALLOW_GMREDI #include "CPP_OPTIONS.h" C Designed to simplify the Ajoint code: C exclude the clipping/...
Remove phases command line from SV-COMP observer example
extern void __VERIFIER_error() __attribute__ ((__noreturn__)); extern int __VERIFIER_nondet_int(); int main() { int x, y; if (__VERIFIER_nondet_int()) { x = 0; y = 1; } else { x = 1; y = 0; } // if (!(x + y == 1)) if (x + y != 1) __VERIFIER_e...
extern void __VERIFIER_error() __attribute__ ((__noreturn__)); extern int __VERIFIER_nondet_int(); int main() { int x, y; if (__VERIFIER_nondet_int()) { x = 0; y = 1; } else { x = 1; y = 0; } // if (!(x + y == 1)) if (x + y != 1) __VERIFIER_e...
Modify constant buffer init method template type name
#pragma once #include "Rendering/BufferDX11.h" #include "Rendering/ShaderDX11.h" namespace Mile { class MEAPI ConstantBufferDX11 : public BufferDX11 { public: ConstantBufferDX11(RendererDX11* renderer); ~ConstantBufferDX11(); bool Init(unsigned int size); template <typename Buffer> ...
#pragma once #include "Rendering/BufferDX11.h" #include "Rendering/ShaderDX11.h" namespace Mile { class MEAPI ConstantBufferDX11 : public BufferDX11 { public: ConstantBufferDX11(RendererDX11* renderer); ~ConstantBufferDX11(); bool Init(unsigned int size); template <typename BufferType...
Add getters for window constants
#pragma once #include <SDL2/SDL.h> #include <string> class Application { private: // Main loop flag bool quit; // The window SDL_Window* window; // The window renderer SDL_Renderer* renderer; // The background color SDL_Color backgroundColor; // Window properties std::string title...
#pragma once #include <SDL2/SDL.h> #include <string> class Application { private: // Main loop flag bool quit; // The window SDL_Window* window; // The window renderer SDL_Renderer* renderer; // The background color SDL_Color backgroundColor; // Window properties std::string title...
Add copyright and license header.
#import <Cocoa/Cocoa.h> @interface CreamMonkey : NSObject { } @end
/* * Copyright (c) 2006 KATO Kazuyoshi <kzys@8-p.info> * This source code is released under the MIT license. */ #import <Cocoa/Cocoa.h> @interface CreamMonkey : NSObject { } @end
Change to private Qt slots.
#ifndef QTVMBVIEWER_H #define QTVMBVIEWER_H // Qt dependencies #include <QWidget> #include <QLabel> #include <QSlider> // Local dependency #include "VmbCamera.h" // Qt widget to display the images from an Allied Vision camera through the Vimba SDK class QtVmbViewer : public QWidget { // Macro to use Qt signals and s...
#ifndef QTVMBVIEWER_H #define QTVMBVIEWER_H // Qt dependencies #include <QWidget> #include <QLabel> #include <QSlider> // Local dependency #include "VmbCamera.h" // Qt widget to display the images from an Allied Vision camera through the Vimba SDK class QtVmbViewer : public QWidget { // Macro to use Qt signals and s...
Use @import in Objective-C header
/* Faraday Faraday.h * * Copyright © 2015, 2016, Roy Ratcliffe, Pioneering Software, United Kingdom * * 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 with...
/* Faraday Faraday.h * * Copyright © 2015, 2016, Roy Ratcliffe, Pioneering Software, United Kingdom * * 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 with...
Test uint64_t -> long double
#include "src/math/reinterpret.h" #include <stdint.h> #include <assert.h> uint64_t __fixunstfdi(long double); static _Bool run(uint64_t a) { return a == __fixunstfdi(a); } int main(void) { const uint64_t delta = 0x0008D46BA87B5A22; for (uint64_t i = 0x3FFFFFFFFFFFFFFF; i < 0x4340000000000000; i += delta...
Add the ocl_defines header file into libocl
#ifndef __OCL_COMMON_DEF_H__ #define __OCL_COMMON_DEF_H__ #define __OPENCL_VERSION__ 110 #define __CL_VERSION_1_0__ 100 #define __CL_VERSION_1_1__ 110 #define __ENDIAN_LITTLE__ 1 #define __IMAGE_SUPPORT__ 1 #define __kernel_exec(X, TYPE) __kernel __attribute__((work_group_size_hint(X,1,1))) \ ...
Make the varianttypes work more pleasantly - now you simply include the file, and stuff happens magically! (that is, Eigen::Vector3d is registered as a QVariant now... more to come!)
/* <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> 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 (...
/* <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> 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 (...
Add global SCU internal header file
/* * Copyright (c) 2012 Israel Jacques * See LICENSE for details. * * Israel Jacques <mrko@eecs.berkeley.edu> */ #ifndef _SCU_INTERNAL_H_ #define _SCU_INTERNAL_H_ #include <inttypes.h> #include <stddef.h> /* Write and read directly to specified address */ #define MEMORY_WRITE(t, x, y) (*(volatile uint ## t ##...
Make comment conform to coding standard...
/****************************************************************************** globus_rsl_assist.h Description: This header contains the interface prototypes for the rsl_assist library. CVS Information: $Source$ $Date$ $Revision$ $Author$ ****************************************************...
/* * globus_rsl_assist.h * * Description: * * This header contains the interface prototypes for the rsl_assist library. * * CVS Information: * * $Source$ * $Date$ * $Revision$ * $Author$ ******************************************************************************/ #ifndef _GLOBUS_RSL_ASSIST_INCLUDE_G...
Remove UNKNOWN annotation from assert that now succeeds
// PARAM: --enable ana.int.interval --enable ana.int.def_exc // issue #120 #include <assert.h> int main() { // should be LP64 unsigned long n = 16; unsigned long size = 4912; assert(!(0xffffffffffffffffUL / size < n)); // UNKNOWN (for now) }
// PARAM: --enable ana.int.interval --enable ana.int.def_exc // issue #120 #include <assert.h> int main() { // should be LP64 unsigned long n = 16; unsigned long size = 4912; assert(!(0xffffffffffffffffUL / size < n)); }
Add comment for document::DocumentTypeRepoFactory::make method.
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <memory> #include <mutex> #include <map> namespace document { namespace internal { class InternalDocumenttypesType; } class DocumentTypeRepo; /* * Factory class for doc...
// Copyright 2018 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <memory> #include <mutex> #include <map> namespace document { namespace internal { class InternalDocumenttypesType; } class DocumentTypeRepo; /* * Factory class for doc...
Correct case of include file to build on Linux.
#include "FreeRTOS.h" #include "Semphr.h" #include "task.h" /* The interrupt entry point. */ void vEMAC_ISR_Wrapper( void ) __attribute__((naked)); /* The handler that does the actual work. */ void vEMAC_ISR_Handler( void ); extern xSemaphoreHandle xEMACSemaphore; void vEMAC_ISR_Handler( void ) { po...
#include "FreeRTOS.h" #include "semphr.h" #include "task.h" /* The interrupt entry point. */ void vEMAC_ISR_Wrapper( void ) __attribute__((naked)); /* The handler that does the actual work. */ void vEMAC_ISR_Handler( void ); extern xSemaphoreHandle xEMACSemaphore; void vEMAC_ISR_Handler( void ) { po...
Improve comments in the header file
// // SloppySwiper.h // // Created by Arkadiusz on 29-05-14. // #import <Foundation/Foundation.h> @interface SloppySwiper : NSObject <UINavigationControllerDelegate> // Designated initializer if the class isn't set in the Interface Builder. - (instancetype)initWithNavigationController:(UINavigationController *)nav...
// // SloppySwiper.h // // Created by Arkadiusz on 29-05-14. // #import <Foundation/Foundation.h> @interface SloppySwiper : NSObject <UINavigationControllerDelegate> /// Gesture recognizer used to recognize swiping to the right. @property (weak, nonatomic) UIPanGestureRecognizer *panRecognizer; /// Designated ini...
Fix incorrect information in comment
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #import <UIKit/UIKit.h> #import <React/RCTViewComponentView.h> NS_ASSUME_NONNULL_BEGIN /** * UIView class for root <Shimmering...
/** * Copyright (c) Facebook, Inc. and its affiliates. * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. */ #import <UIKit/UIKit.h> #import <React/RCTViewComponentView.h> NS_ASSUME_NONNULL_BEGIN /** * UIView class for root <ActivityIn...
Add test of IF statement
/* name: TEST006 description: Basic test for if output: G1 M c F1 X2 F1 main G2 F1 main { - j L2 #I0 #I0 =I yI #I1 j L3 L2 j L4 #I0 #I0 =I j L5 L4 j L6 #I1 #I0 =I j L7 G1 MI #I0 =I yI #I1 j L8 L7 yI #I0 L8 j L9 L6 yI #I1 L9 L5 L3 yI #I1 } */ char c; int main() { if(0) { return 1; } else if(0) { /* ...
Add test case for nested creation of tasks
// RUN: %libomp-compile-and-run #include <stdio.h> #include <omp.h> #include "omp_my_sleep.h" /* * This test creates tasks that themselves create a new task. * The runtime has to take care that they are correctly freed. */ int main() { #pragma omp task { #pragma omp task { my_sleep( 0.1 ); } ...
Add better linux support by using the right macro. This still should be autoconfiscated, but for now this is sufficient.
//===-- include/Support/DataTypes.h - Define fixed size types ----*- C++ -*--=// // // This file contains definitions to figure out the size of _HOST_ data types. // This file is important because different host OS's define different macros, // which makes portability tough. This file exports the following definitions...
//===-- include/Support/DataTypes.h - Define fixed size types ----*- C++ -*--=// // // This file contains definitions to figure out the size of _HOST_ data types. // This file is important because different host OS's define different macros, // which makes portability tough. This file exports the following definitions...
Increase command line size to 2048 like other arches.
/* * Just a place holder. */ #ifndef _SPARC64_SETUP_H #define _SPARC64_SETUP_H #define COMMAND_LINE_SIZE 256 #endif /* _SPARC64_SETUP_H */
/* * Just a place holder. */ #ifndef _SPARC64_SETUP_H #define _SPARC64_SETUP_H #define COMMAND_LINE_SIZE 2048 #endif /* _SPARC64_SETUP_H */
Clarify data in static card data
#ifndef YGO_DATA_CARDDATA_H #define YGO_DATA_CARDDATA_H #include <string> #include "CardType.h" namespace ygo { namespace data { struct StaticCardData { std::string name; CardType cardType; // monster only Attribute attribute; MonsterType monsterType; Type type; MonsterType monsterAbilit...
#ifndef YGO_DATA_CARDDATA_H #define YGO_DATA_CARDDATA_H #include <string> #include "CardType.h" namespace ygo { namespace data { struct StaticCardData { std::string name; CardType cardType; // monster only Attribute attribute; MonsterType monsterType; Type type; MonsterType monsterAbilit...
Add forgotten file, espie@ has checked it compiles
/* $OpenBSD: isa_machdep.c,v 1.4 1999/03/05 19:17:44 niklas Exp $ */ /* * Copyright (c) 1999 Niklas Hallqvist * 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 sour...
Enable compiling with older versions of GCC
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" ...
/* * Copyright 2019 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" ...
Add speed to aux motor functions.
#ifndef HAL1_H #define HAL1_H // Configurable constants extern int const MAIN_MOTOR_PWM_TOP; extern int const MAIN_MOTOR_BRAKE_SPEED; extern int const MAIN_MOTOR_MIN_SPEED; extern int const MAIN_MOTOR_MED_SPEED; extern int const MAIN_MOTOR_MAX_SPEED; extern int const MAGNET_OPEN_WAIT; void init(void); void main_mot...
#ifndef HAL1_H #define HAL1_H // Configurable constants extern int const MAIN_MOTOR_PWM_TOP; extern int const MAIN_MOTOR_BRAKE_SPEED; extern int const MAIN_MOTOR_MIN_SPEED; extern int const MAIN_MOTOR_MED_SPEED; extern int const MAIN_MOTOR_MAX_SPEED; extern int const MAGNET_OPEN_WAIT; void init(void); void main_mot...
Add include <functional> for osx
#include "helper.h" #include <string> // string #include <stdlib.h> // srand, rand #include <time.h> // time - for rand seed #include <algorithm> // sort using namespace std; class BaseSheet { protected: int _level; int _str; int _dex; int _con; int _int; int _wis; ...
#include "helper.h" #include <string> // string #include <stdlib.h> // srand, rand #include <time.h> // time - for rand seed #include <algorithm> // sort #include <functional> // std::greater for mac osx using namespace std; class BaseSheet { protected: int _level; int _str; int _dex; ...
Add new manifest constant for demand mode DMA; form NetBSD
/* $OpenBSD: i8237reg.h,v 1.2 1996/04/18 23:47:19 niklas Exp $ */ /* $NetBSD: i8237reg.h,v 1.5 1996/03/01 22:27:09 mycroft Exp $ */ /* * Intel 8237 DMA Controller */ #define DMA37MD_WRITE 0x04 /* read the device, write memory operation */ #define DMA37MD_READ 0x08 /* write the device, read memory operation */ #defi...
/* $OpenBSD: i8237reg.h,v 1.3 1999/08/04 23:07:49 niklas Exp $ */ /* $NetBSD: i8237reg.h,v 1.5 1996/03/01 22:27:09 mycroft Exp $ */ /* * Intel 8237 DMA Controller */ #define DMA37MD_DEMAND 0x00 /* demand mode */ #define DMA37MD_WRITE 0x04 /* read the device, write memory operation */ #define DMA37MD_READ 0x08 /* wr...
Add new randr header file.
#ifdef E_TYPEDEFS typedef struct _E_Randr_Output_Config E_Randr_Output_Config; typedef struct _E_Randr_Crtc_Config E_Randr_Crtc_Config; typedef struct _E_Randr_Config E_Randr_Config; #else # ifndef E_RANDR_H # define E_RANDR_H #define E_RANDR_CONFIG_FILE_EPOCH 1 #define E_RANDR_CONFIG_FILE_GENERATION 1 #define E_RA...
Add another ctrl dep test that we get right!
#include "rmc.h" // Some test cases that required some bogosity to not have the branches get // optimized away. // // Also, if r doesn't get used usefully, that load gets optimized away. // I can't decide whether that is totally fucked or not. int global_p, global_q; int bogus_ctrl_dep1() { XEDGE(read, write); ...
#include "rmc.h" // Some test cases that required some bogosity to not have the branches get // optimized away. // // Also, if r doesn't get used usefully, that load gets optimized away. // I can't decide whether that is totally fucked or not. int global_p, global_q; int bogus_ctrl_dep1() { XEDGE(read, write); ...
Add solution to Exercise 1-9.
/* Exercise 1-8: Write a program to copy its input to its output, replacing * each string of one of more blanks with a single blank. */ #include <stdint.h> #include <stdio.h> #include <stdlib.h> int main(int argc, char **argv) { int16_t character, previous_character; while ((character = getchar()) != EOF) { ...
Change alternate port number; seemed to be taken already!
/* * EMULAB-COPYRIGHT * Copyright (c) 2000-2002 University of Utah and the Flux Group. * All rights reserved. */ #define TBSERVER_PORT 7777 #define TBSERVER_PORT2 14443 #define MYBUFSIZE 2048 #define BOSSNODE_FILENAME "bossnode" /* * As the tmcd changes, incompatable changes with older version of * the softw...
/* * EMULAB-COPYRIGHT * Copyright (c) 2000-2002 University of Utah and the Flux Group. * All rights reserved. */ #define TBSERVER_PORT 7777 #define TBSERVER_PORT2 14447 #define MYBUFSIZE 2048 #define BOSSNODE_FILENAME "bossnode" /* * As the tmcd changes, incompatable changes with older version of * the softw...
Fix import to what's actually needed.
// // BRScrollerUtilities.h // BRScroller // // Created by Matt on 7/11/13. // Copyright (c) 2013 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0. // #ifndef BRScroller_BRScrollerUtilities_h #define BRScroller_BRScrollerUtilities_h #include <CoreFoundation/CoreFoundation.h> #include ...
// // BRScrollerUtilities.h // BRScroller // // Created by Matt on 7/11/13. // Copyright (c) 2013 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0. // #ifndef BRScroller_BRScrollerUtilities_h #define BRScroller_BRScrollerUtilities_h #include <CoreGraphics/CoreGraphics.h> bool BRFloat...
Make the filerator test more portable
#include "dirent.h" typedef DIR* DIRptr; typedef struct dirent* direntptr; #define chpl_rt_direntptr_getname(x) ((x)->d_name) // // Note: This is not portable; more generally, need to use lstat() or similar; // see the readdir() man page for notes // #define chpl_rt_direntptr_isDir(x) ((x)->d_type == DT_DIR)
#include "dirent.h" typedef DIR* DIRptr; #ifndef __USE_FILE_OFFSET64 typedef struct dirent* direntptr; #else #ifdef __REDIRECT typedef struct dirent* direntptr; #else typedef struct dirent64* direntptr; #endif #endif #define chpl_rt_direntptr_getname(x) ((x)->d_name) // // Note: This is not portable; more generally...
Remove unnecessary include and just forward declare. NFC
//===- llvm/TableGen/TableGenBackend.h - Backend utilities ------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===- llvm/TableGen/TableGenBackend.h - Backend utilities ------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Add links to original problem
// UIKitExtensions // // UIKitExtensions/UIView/Framing.h // // Copyright (c) 2013 Stanislaw Pankevich // Released under the MIT license // // Inspired by FrameAccessor // https://github.com/AlexDenisov/FrameAccessor/ #import <UIKit/UIKit.h> @interface UIView (Framing) @property CGPoint viewOrigin; @property CGSize ...
// UIKitExtensions // // UIKitExtensions/UIView/Framing.h // // Copyright (c) 2013 Stanislaw Pankevich // Released under the MIT license // // Inspired by FrameAccessor // https://github.com/AlexDenisov/FrameAccessor/ #import <UIKit/UIKit.h> @interface UIView (Framing) // http://stackoverflow.com/questions/16118106/...
Mend incorrect whitespace from 3103a58
#ifndef TENYR_VPI_ #define TENYR_VPI_ #include <vpi_user.h> struct tenyr_sim_state; typedef int tenyr_sim_cb(p_cb_data data); typedef int tenyr_sim_call(struct tenyr_sim_state *state, void *userdata); struct tenyr_sim_state { struct { tenyr_sim_call *genesis; ///< beginning of sim tenyr_sim...
#ifndef TENYR_VPI_ #define TENYR_VPI_ #include <vpi_user.h> struct tenyr_sim_state; typedef int tenyr_sim_cb(p_cb_data data); typedef int tenyr_sim_call(struct tenyr_sim_state *state, void *userdata); struct tenyr_sim_state { struct { tenyr_sim_call *genesis; ///< beginning of sim tenyr_sim...
Handle restrict on Windows compilers
#pragma once #include <stdio.h> #ifdef __cplusplus extern "C" { #endif enum Turbo_Type {TJ_Error, TJ_String, TJ_Number, TJ_Object, TJ_Array, TJ_Boolean, TJ_Null}; struct Turbo_Value{ enum Turbo_Type type; unsigned length; union{ double number; int boolean; const char *string; ...
#pragma once #include <stdio.h> #ifdef _MSC_VER #define __restrict__ __restrict #elif defined __WATCOMC__ #define __restrict__ #endif #ifdef __cplusplus extern "C" { #endif enum Turbo_Type {TJ_Error, TJ_String, TJ_Number, TJ_Object, TJ_Array, TJ_Boolean, TJ_Null}; struct Turbo_Value{ enum Turbo_Type type; u...
Disable GL sizes PPAPI tests
/* 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. * * This file has compile assertions for the sizes of types that are dependent * on the architecture for which they are compiled (i.e., 32-bit vs 64...
/* 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. * * This file has compile assertions for the sizes of types that are dependent * on the architecture for which they are compiled (i.e., 32-bit vs 64...
Allow uname() with linux emulation on NetBSD
/* $Id$ */ /* Copyright (c) 2006 The DeforaOS Project */ #include "../syscalls.h" #include "sys/utsname.h" /* uname */ #ifndef __NetBSD__ syscall1(int, uname, struct utsname *, utsname); #endif
/* $Id$ */ /* Copyright (c) 2007 The DeforaOS Project */ #include "../syscalls.h" #include "sys/utsname.h" /* uname */ #if !defined(__NetBSD__) || defined(NETBSD_USE_LINUX_EMULATION) syscall1(int, uname, struct utsname *, utsname); #endif
Add nullability annotations to the custom login view controller's public interface
#import <ResearchKit/ResearchKit.h> @class CMHLoginViewController; @protocol CMHLoginViewControllerDelegate <NSObject> @optional - (void)loginViewControllerCancelled:(CMHLoginViewController *_Nonnull)viewController; - (void)loginViewController:(CMHLoginViewController *_Nonnull)viewController didLogin:(BOOL)success er...
#import <ResearchKit/ResearchKit.h> @class CMHLoginViewController; @protocol CMHLoginViewControllerDelegate <NSObject> @optional - (void)loginViewControllerCancelled:(CMHLoginViewController *_Nonnull)viewController; - (void)loginViewController:(CMHLoginViewController *_Nonnull)viewController didLogin:(BOOL)success er...
Fix inappropriate move in ReadAsString
#pragma once #include "ionTypes.h" #include <algorithm> #include <numeric> #include <iomanip> #include <iostream> #include <fstream> #include <sstream> using std::move; using std::ifstream; template <typename T, typename U> U * ConditionalMapAccess(map<T, U *> & Map, T const Key) { auto Iterator...
#pragma once #include "ionTypes.h" #include <algorithm> #include <numeric> #include <iomanip> #include <iostream> #include <fstream> #include <sstream> using std::move; using std::ifstream; template <typename T, typename U> U * ConditionalMapAccess(map<T, U *> & Map, T const Key) { auto Iterator...
Update byte code ID for InitConst change
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //---------------------------------------------------------...
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //---------------------------------------------------------...
Comment regarding value serialization of date.
// // SWXMLDateMapping.h // This file is part of the "SWXMLMapping" project, and is distributed under the MIT License. // // Created by Samuel Williams on 13/11/05. // Copyright 2005 Samuel Williams. All rights reserved. // #import "SWXMLMemberMapping.h" @class SWXMLMemberMapping; @interface SWXMLDateMapping : S...
// // SWXMLDateMapping.h // This file is part of the "SWXMLMapping" project, and is distributed under the MIT License. // // Created by Samuel Williams on 13/11/05. // Copyright 2005 Samuel Williams. All rights reserved. // #import "SWXMLMemberMapping.h" @class SWXMLMemberMapping; // Formats value attribute acco...
Add nested infinite loops test
// https://github.com/goblint/analyzer/issues/231#issuecomment-868369123 int main(void) { int x = 0; while(1) { while(1) { x++; } x--; } x--; return x; }
Add test for NULL pointer invariant refinement
#include <stddef.h> int main() { int *r; // rand if (r == NULL) assert(r == NULL); else assert(r != NULL); // TODO if (r != NULL) assert(r != NULL); else assert(r == NULL); // TODO return 0; }
Allow neuron values (outputs) to be stored
#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 { Links weights; } ANN; int main(void) { return 0; }
#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]; }...
Make sure used unit constants are non-zero
/* * free.h * Memory usage utility for Darwin & MacOS X (similar to 'free' under Linux) * * by: David Cantrell <david.l.cantrell@gmail.com> * Copyright (C) 2008, David Cantrell, Honolulu, HI, USA. * * Licensed under the GNU Lesser General Public License version 2.1 or later. * See COPYING.LIB for licensing det...
/* * free.h * Memory usage utility for Darwin & MacOS X (similar to 'free' under Linux) * * by: David Cantrell <david.l.cantrell@gmail.com> * Copyright (C) 2008, David Cantrell, Honolulu, HI, USA. * * Licensed under the GNU Lesser General Public License version 2.1 or later. * See COPYING.LIB for licensing det...