Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Replace `REQUIRES-ANY: a, b, c` with `REQUIRES: a || b || c`.
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s // XFAIL: -linux- // REQUIRES-ANY: amd64, x86_64, x86_64h, arm, aarch64, arm64 typedef int a;
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s // XFAIL: -linux- // REQUIRES: amd64 || x86_64 || x86_64h || arm || aarch64 || arm64 typedef int a;
Add methods to apply multiple transformations
#pragma once class VolumeTransformation { public: /// <summary> /// Transforms a given volume level to a new ("virtual") level based on a /// formula or set of rules (e.g., a volume curve transformation). /// </summary> virtual float Apply(float vol) = 0; /// <summary> /// Given a transfor...
#pragma once class VolumeTransformation { public: /// <summary> /// Transforms a given volume level to a new ("virtual") level based on a /// formula or set of rules (e.g., a volume curve transformation). /// </summary> virtual float Apply(float vol) = 0; /// <summary> /// Given a transfor...
Add function ID member in MODBUSExceptionLog structure
//Declarations for master types typedef enum { Register = 0 } MODBUSDataType; //MODBUS data types enum (coil, register, input, etc.) typedef struct { uint8_t Address; //Device address uint8_t Code; //Exception code } MODBUSExceptionLog; //Parsed exception data typedef struct { uint8_t Address; //Device address ...
//Declarations for master types typedef enum { Register = 0 } MODBUSDataType; //MODBUS data types enum (coil, register, input, etc.) typedef struct { uint8_t Address; //Device address uint8_t Function; //Function called, in which exception occured uint8_t Code; //Exception code } MODBUSExceptionLog; //Parsed exce...
Add a test forgotten in r339088.
// RUN: %clang_analyze_cc1 -analyzer-checker=unix.StdCLibraryFunctions -verify %s // RUN: %clang_analyze_cc1 -triple i686-unknown-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s // RUN: %clang_analyze_cc1 -triple x86_64-unknown-linux -analyzer-checker=unix.StdCLibraryFunctions -verify %s // RUN: %clang_ana...
Update utility functions to work with pyp-topics.
#ifndef DICT_H_ #define DICT_H_ #include <cassert> #include <cstring> #include <tr1/unordered_map> #include <string> #include <vector> #include <boost/functional/hash.hpp> #include "wordid.h" class Dict { typedef std::tr1::unordered_map<std::string, WordID, boost::hash<std::string> > Map; public: Dict() : b0_("...
#ifndef DICT_H_ #define DICT_H_ #include <cassert> #include <cstring> #include <tr1/unordered_map> #include <string> #include <vector> #include <boost/functional/hash.hpp> #include "wordid.h" class Dict { typedef std::tr1::unordered_map<std::string, WordID, boost::hash<std::string> > Map; public: Dict() : b0_(...
Move variable to base class
#include "bayesian.h" namespace baysian { class bayesianNetwork : public bayesian { private: long double ***cpt; double *classCount; // this array store the total number of each // decision's class in training data int *discrete; int *classNum; // this array store the number ...
#include "bayesian.h" namespace baysian { class bayesianNetwork : public bayesian { private: long double ***cpt; int **parent; public: bayesianNetwork(char *); ~bayesianNetwork(); // initialize all the information we need from training data void predict(char *); // calculate the probabili...
Update Skia milestone to 98
/* * 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 97 #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 98 #endif
Tweak this test a bit further to make it easier on grep. Who knows what characters get dropped into the regular expression from %t.
// rdar://6533411 // RUN: %clang -MD -MF %t.d -S -x c -o %t.o %s // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d // RUN: %clang -S -M -x c %s -o %t.d // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d // PR8974 // XFAIL: win32 // RUN: rm -rf %t.dir // RUN: mkdir ...
// rdar://6533411 // RUN: %clang -MD -MF %t.d -S -x c -o %t.o %s // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d // RUN: %clang -S -M -x c %s -o %t.d // RUN: grep '.*dependency-gen.*:' %t.d // RUN: grep 'dependency-gen.c' %t.d // PR8974 // XFAIL: win32 // RUN: rm -rf %t.dir // RUN: mkdir ...
Update wrapper fusion header file
#ifndef HALIDE__build___wrapper_fusion_o_h #define HALIDE__build___wrapper_fusion_o_h #include <coli/utils.h> #ifdef __cplusplus extern "C" { #endif int fusion_coli(buffer_t *_b_input_buffer, buffer_t *_b_output_f_buffer, buffer_t *_b_output_g_buffer) HALIDE_FUNCTION_ATTRS; int fusion_coli_argv(void **args) HALIDE_F...
#ifndef HALIDE__build___wrapper_fusion_o_h #define HALIDE__build___wrapper_fusion_o_h #include <coli/utils.h> #ifdef __cplusplus extern "C" { #endif int fusion_coli(buffer_t *_b_input_buffer, buffer_t *_b_output_f_buffer, buffer_t *_b_output_g_buffer, buffer_t *_b_output_h_buffer, buffer_t *_b_output_k_buffer) HALID...
Enable debug option for all components
#ifndef _TSLIB_PRIVATE_H_ #define _TSLIB_PRIVATE_H_ /* * tslib/src/tslib-private.h * * Copyright (C) 2001 Russell King. * * This file is placed under the LGPL. * * * Internal touch screen library definitions. */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "tslib.h" #include "tslib-filt...
#ifndef _TSLIB_PRIVATE_H_ #define _TSLIB_PRIVATE_H_ /* * tslib/src/tslib-private.h * * Copyright (C) 2001 Russell King. * * This file is placed under the LGPL. * * * Internal touch screen library definitions. */ #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ #include "tslib.h" #include "tslib-filt...
Implement timeradd as an inline function
#ifndef OS_COMMON_H_ #define OS_COMMON_H_ #include <stddef.h> #include <fcntl.h> #include <io.h> #include <stdio.h> /* * MinGW lfind() and friends use `unsigned int *` where they should use a * `size_t *` according to the man page. */ typedef unsigned int lfind_size_t; // timeradd doesn't exist on MinGW #ifndef t...
#ifndef OS_COMMON_H_ #define OS_COMMON_H_ #include <stddef.h> #include <fcntl.h> #include <io.h> #include <stdio.h> #include <sys/time.h> /* * MinGW lfind() and friends use `unsigned int *` where they should use a * `size_t *` according to the man page. */ typedef unsigned int lfind_size_t; // timeradd doesn't ex...
Add video orientation to play ad option
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
// Copyright 2019 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in w...
Add macros for ioctl fetching of log data.
#ifndef HELLOW_IOCTL_H #define HELLOW_IOCTL_H #define HWM_LOG_OFF 0xff00 #define HWM_LOG_ON 0xff01 #endif
#ifndef HELLOW_IOCTL_H #define HELLOW_IOCTL_H #define HWM_LOG_OFF 0xff00 #define HWM_LOG_ON 0xff01 #define HWM_GET_LOG_ENT_SIZE 0xff02 #define HWM_GET_LOG_ENT 0xff03 #endif
Make adding related works sections private.
#import "ARArtworkMasonryModule.h" #import "ARArtworkViewController.h" typedef NS_ENUM(NSInteger, ARRelatedArtworksSubviewOrder) { ARRelatedArtworksSameShow = 1, ARRelatedArtworksSameFair, ARRelatedArtworksSameAuction, ARRelatedArtworksArtistArtworks, ARRelatedArtworks, }; @class ARArtworkRelatedA...
#import "ARArtworkMasonryModule.h" #import "ARArtworkViewController.h" typedef NS_ENUM(NSInteger, ARRelatedArtworksSubviewOrder) { ARRelatedArtworksSameShow = 1, ARRelatedArtworksSameFair, ARRelatedArtworksSameAuction, ARRelatedArtworksArtistArtworks, ARRelatedArtworks, }; @class ARArtworkRelatedA...
Add an abstract bitmap class.
#ifndef OUTPUTBITMAP_H #define OUTPUTBITMAP_H #include <iostream> #include "common.h" using std::ostream; class OutputBitmap { protected: unsigned int width, height; OutputBitmap(unsigned int width, unsigned int height) : width(width), height(height) {}; public: unsigned int getWidth() const { return width;...
Fix update callback position to be grid-relative not scrollback-relative.
#include <libterm_internal.h> void term_update(term_t_i *term) { if( term->dirty.exists && term->update != NULL ) { term->update(TO_H(term), term->dirty.x, term->dirty.y, term->dirty.width, term->dirty.height); term->dirty.exists = false; } } void term_cursor_update(term_t_i *term) { if( t...
#include <libterm_internal.h> void term_update(term_t_i *term) { if( term->dirty.exists && term->update != NULL ) { term->update(TO_H(term), term->dirty.x, term->dirty.y - (term->grid.history - term->grid.height), term->dirty.width, term->dirty.height); term->dirty.exists = false; } } void ter...
Test whether removing a cast still hurts performance.
/* * Copyright (c) 2012 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) 2012 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...
Make threads autostart by default
#pragma once #include "ThreadState.h" #include <atomic> #include <mutex> #include <thread> // Lightweight wrapper for std::thread to provide extensibility namespace AscEmu { namespace Threading { class AEThread { typedef std::function<void(AEThread&)> ThreadFunc; static std::atomic<unsigned i...
#pragma once #include "ThreadState.h" #include <atomic> #include <mutex> #include <thread> // Lightweight wrapper for std::thread to provide extensibility namespace AscEmu { namespace Threading { class AEThread { typedef std::function<void(AEThread&)> ThreadFunc; static std::atomic<unsigned i...
Revert "Indicate the location of sqlite failures."
#ifndef _PKG_ERROR_H #define _PKG_ERROR_H #ifdef DEBUG # define pkg_error_set(code, fmt, ...) \ _pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__) #else # define pkg_error_set _pkg_error_set #endif #define ERROR_BAD_ARG(name) \ pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FU...
#ifndef _PKG_ERROR_H #define _PKG_ERROR_H #ifdef DEBUG # define pkg_error_set(code, fmt, ...) \ _pkg_error_set(code, fmt " [at %s:%d]", ##__VA_ARGS__, __FILE__, __LINE__) #else # define pkg_error_set _pkg_error_set #endif #define ERROR_BAD_ARG(name) \ pkg_error_set(EPKG_FATAL, "Bad argument `%s` in %s", name, __FU...
Correct the frame format and async mode for the UART. Add useful comments.
/** * This is used to setup the UART device on an AVR unit. */ #pragma once #include <avr/io.h> #ifndef BAUD # define BAUD 9600 # warning BAUD rate not set. Setting BAUD rate to 9600. #endif // BAUD #define BAUDRATE ((F_CPU)/(BAUD*16UL)-1) static inline void uart_enable(void) { UBRR0H = BAUDRATE >> 8; UBR...
/** * This is used to setup the UART device on an AVR unit. */ #pragma once #include <avr/io.h> #ifndef BAUD # define BAUD 9600 # warning BAUD rate not set. Setting BAUD rate to 9600. #endif // BAUD #define BAUDRATE ((F_CPU)/(BAUD*16UL)-1) static inline void uart_enable(void) { UBRR0H = BAUDRATE >> 8; UBR...
Set 1 challenge 5 Implement repeating-key XOR
#include <stdio.h> char input[] = "Burning 'em, if you ain't quick and nimble\nI go crazy when I hear a cymbal"; char key[] = "ICE"; char lookup[] = "0123456789abcdef"; int main() { for(unsigned int i = 0; i < (sizeof(input) - 1); ++i) { char num = input[i] ^ key[i % (sizeof(key) - 1)]; printf("%c%c", loo...
Add basic argument parsing and file reading
#include "common.h" int main(int argc, char **argv) { return 0; }
#include "common.h" #include <stdlib.h> #include <stdio.h> #include <string.h> internal void usage() { fprintf(stderr, "usage: mepa <command> [<options>] [<args>]\n" "\n" "Commands:\n" " help - show this usage text\n" " format [<file>] - reformat code\n...
Mend command line flag parsing
#include <stdio.h> #include "src/sea.h" int main(int argc, char* argv[]) { // parse arguments while((opt = getopt(argc, argv, "d:")) != -1) { switch(opt) { case 'd': { extern int yydebug; yydebug = 1; } default: { fpri...
#include <stdlib.h> #include <stdio.h> #include "src/sea.h" int main(int argc, char* argv[]) { // parse arguments char opt; extern int optind; while((opt = getopt(argc, argv, "d")) != -1) { switch(opt) { case 'd': { extern int yydebug; yydebug = 1; ...
Change default value to align with the original react
// Copyright (c) 2018 PaddlePaddle 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...
// Copyright (c) 2018 PaddlePaddle 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...
Add overloaded () operator to LogSingletonHelper.
#ifndef _LOG_SINGLETON_H_ #define _LOG_SINGLETON_H_ #include "log.h" #include "basedefs.h" namespace anp { class LogSingleton: public anp::Log { public: static LogSingleton &getInstance(); static void releaseInstance(); private: LogSingleton() { } ~LogSingleton() { } static uint32 m_refCount; static LogSingl...
#ifndef _LOG_SINGLETON_H_ #define _LOG_SINGLETON_H_ #include "log.h" #include "basedefs.h" namespace anp { class LogSingleton: public anp::Log { public: static LogSingleton &getInstance(); static void releaseInstance(); private: LogSingleton() { } ~LogSingleton() { } static uint32 m_refCount; static LogSingl...
Add preliminary API definition for learn cache.
/* * Copyright (c) 2015, Vsevolod Stakhov * * 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 co...
Test case for static storage blocks
extern int printf(char *, ...); void (^pb)() = ^{ return; }; int i, j; int *(^funcs[])() = { [0 ... 1] = ^{ printf("1!\n"); return &i; }, ^{ printf("2!\n"); return &j; }, }; void *f(int x) { return funcs[x](); } main() { printf("&i = %p\n", &i); printf("&j = %p\n", &j); for(int i = 0; i < 3; i++) printf("f...
Fix an outdated comment in a test. NFC.
// RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s // Avoid the crash when finding the expression for tracking the origins // of the null pointer for path notes. Apparently, not much actual tracking // needs to be done in this example. void pr34373() { int *a = 0; // expected-...
// RUN: %clang_analyze_cc1 -w -x c -analyzer-checker=core -analyzer-output=text -verify %s // Avoid the crash when finding the expression for tracking the origins // of the null pointer for path notes. void pr34373() { int *a = 0; // expected-note{{'a' initialized to a null pointer value}} (a + 0)[0]; // expected-...
Fix case insensitive UTF16 string search.
#pragma once class UnicodeUtf16StringSearcher { private: const wchar_t* m_Pattern; uint32_t m_PatternLength; public: UnicodeUtf16StringSearcher() : m_Pattern(nullptr) { } void Initialize(const wchar_t* pattern, size_t patternLength) { if (patternLength > std::numeric_limits<uint32_t>::max() / 2) __fast...
#pragma once class UnicodeUtf16StringSearcher { private: const wchar_t* m_Pattern; uint32_t m_PatternLength; public: UnicodeUtf16StringSearcher() : m_Pattern(nullptr) { } void Initialize(const wchar_t* pattern, size_t patternLength) { if (patternLength > std::numeric_limits<uint32_t>::max() / 2) __fast...
Add example from traces paper
// PARAM: --enable ana.int.interval --sets exp.solver.td3.side_widen cycle_self #include <pthread.h> #include <assert.h> int g = 6; pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { int x = 1; pthread_mutex_lock(&A); assert(g == 6); assert(x...
Switch to Stable V2.3 Release Candidates
#ifndef QGC_CONFIGURATION_H #define QGC_CONFIGURATION_H #include <QString> /** @brief Polling interval in ms */ #define SERIAL_POLL_INTERVAL 4 /** @brief Heartbeat emission rate, in Hertz (times per second) */ #define MAVLINK_HEARTBEAT_DEFAULT_RATE 1 #define WITH_TEXT_TO_SPEECH 1 // If you need to make an incompati...
#ifndef QGC_CONFIGURATION_H #define QGC_CONFIGURATION_H #include <QString> /** @brief Polling interval in ms */ #define SERIAL_POLL_INTERVAL 4 /** @brief Heartbeat emission rate, in Hertz (times per second) */ #define MAVLINK_HEARTBEAT_DEFAULT_RATE 1 #define WITH_TEXT_TO_SPEECH 1 // If you need to make an incompati...
Reduce memory usage of us_syslog_redirect
#include <stdio.h> #include <stdlib.h> #include <syslog.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <US/unitscript.h> #include <US/logging.h> int us_syslog_redirect( struct us_unitscript* unit, int priority ){ int fds[2]; if( pipe(fds) ){ perror("pipe failed"); return -1; } ...
#include <stdio.h> #include <stdlib.h> #include <syslog.h> #include <unistd.h> #include <string.h> #include <errno.h> #include <US/unitscript.h> #include <US/logging.h> int us_syslog_redirect( struct us_unitscript* unit, int priority ){ int fds[2]; if( pipe(fds) ){ perror("pipe failed"); return -1; } ...
Fix ram end for kl82z
/** * @file target.c * @brief Target information for the kl46z * * DAPLink Interface Firmware * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in complian...
/** * @file target.c * @brief Target information for the kl46z * * DAPLink Interface Firmware * Copyright (c) 2009-2016, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in complian...
Add a triple to the test.
// This uses a headermap with this entry: // someheader.h -> Product/someheader.h // RUN: %clang_cc1 -v -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H // RUN: %clang_cc1 -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/...
// This uses a headermap with this entry: // someheader.h -> Product/someheader.h // RUN: %clang_cc1 -triple x86_64-apple-darwin13 -v -fsyntax-only %s -iquote %S/Inputs/headermap-rel2/project-headers.hmap -isysroot %S/Inputs/headermap-rel2/system -I %S/Inputs/headermap-rel2 -H // RUN: %clang_cc1 -triple x86_64-apple...
Test double -> long double
#include "src/math/reinterpret.h" #include <math.h> #include <stdint.h> #include <assert.h> double __trunctfdf2(long double); static _Bool run(double x) { return reinterpret(uint64_t, x) == reinterpret(uint64_t, __trunctfdf2(x)); } int main(void) { const uint64_t step = 0x00000034CBF126F8; assert(run(IN...
Make aes-hmac-sha2 encryption methods from `MXSecretStorage` available in SDK
/* Copyright 2020 The Matrix.org Foundation C.I.C 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...
/* Copyright 2020 The Matrix.org Foundation C.I.C 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...
Add active transaction member variable to DataStore
#pragma once #ifndef YOU_DATASTORE_DATASTORE_H_ #define YOU_DATASTORE_DATASTORE_H_ #include <memory> #include "task_typedefs.h" #include "transaction.h" namespace You { namespace DataStore { namespace UnitTests {} class DataStore { public: Transaction && begin(); static DataStore& get(); // Modifying methods v...
#pragma once #ifndef YOU_DATASTORE_DATASTORE_H_ #define YOU_DATASTORE_DATASTORE_H_ #include <memory> #include "task_typedefs.h" #include "transaction.h" namespace You { namespace DataStore { namespace UnitTests {} class DataStore { public: Transaction && begin(); static DataStore& get(); // Modifying methods v...
Fix smart quote in file template
/******************************************************************************/ /** @file @author AUTHOR NAME HERE. @brief BRIEF HERE. @copyright Copyright 2016 The University of British Columbia, IonDB Project Contributors (see @ref AUTHORS.md) @par Licensed under the Apache License, Version 2.0 (the "Li...
/******************************************************************************/ /** @file @author AUTHOR NAME HERE. @brief BRIEF HERE. @copyright Copyright 2016 The University of British Columbia, IonDB Project Contributors (see @ref AUTHORS.md) @par Licensed under the Apache License, Version 2.0 (the "Li...
Add clarifying comment for assertEqualCopies
#pragma once #include "rapidcheck/seq/Operations.h" namespace rc { namespace test { //! Forwards Seq a random amount and copies it to see if it is equal to the //! original. template<typename T> void assertEqualCopies(Seq<T> seq) { std::size_t len = seq::length(seq); std::size_t n = *gen::ranged<std::size_t>...
#pragma once #include "rapidcheck/seq/Operations.h" namespace rc { namespace test { //! Forwards Seq a random amount and copies it to see if it is equal to the //! original. Must not be infinite, of course. template<typename T> void assertEqualCopies(Seq<T> seq) { std::size_t len = seq::length(seq); std::siz...
Add missing newline to usage print call.
#include <anerley/anerley-tp-feed.h> #include <libmissioncontrol/mission-control.h> #include <glib.h> #include <dbus/dbus-glib.h> int main (int argc, char **argv) { GMainLoop *main_loop; MissionControl *mc; McAccount *account; AnerleyTpFeed *feed; DBusGConnection *conn; if (argc < 2) { g_p...
#include <anerley/anerley-tp-feed.h> #include <libmissioncontrol/mission-control.h> #include <glib.h> #include <dbus/dbus-glib.h> int main (int argc, char **argv) { GMainLoop *main_loop; MissionControl *mc; McAccount *account; AnerleyTpFeed *feed; DBusGConnection *conn; if (argc < 2) { g_p...
Fix a build issue on Solaris
#ifndef LOCK_H #define LOCK_H enum lockstat { GET_LOCK_NOT_GOT=0, GET_LOCK_ERROR, GET_LOCK_GOT }; typedef struct lock lock_t; struct lock { int fd; enum lockstat status; char *path; lock_t *next; }; extern struct lock *lock_alloc(void); extern int lock_init(struct lock *lock, const char *path); extern struct...
#ifndef LOCK_H #define LOCK_H enum lockstat { GET_LOCK_NOT_GOT=0, GET_LOCK_ERROR, GET_LOCK_GOT }; struct lock { int fd; enum lockstat status; char *path; struct lock *next; }; extern struct lock *lock_alloc(void); extern int lock_init(struct lock *lock, const char *path); extern struct lock *lock_alloc_and_in...
Add : navigation bar fix
// // UINavigationBar+Fix.h // LYCategory // // Created by Luo Yu on 2017/02/11. // Copyright (c) 2014 Luo Yu. All rights reserved. // #import <UIKit/UIKit.h> @interface UINavigationBar (Fix) @end
Add additional test case for handling of overflows in congruence domain.
// PARAM: --enable ana.int.congruence #include <goblint.h> // #include <assert.h> // #define __goblint_check(e) assert(e) int basic(){ unsigned int two_pow_16 = 65536; unsigned int a; unsigned int b; if (a % two_pow_16 == 3) { if (b % two_pow_16 == 5) { __goblint_check(a % two_pow_16 == 3); __goblint_c...
Add help and binary options
// // main.c // d16-asm // // Created by Michael Nolan on 6/17/16. // Copyright © 2016 Michael Nolan. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include "parser.h" #include "assembler.h" #include <string.h> #include "instruction.h" #include <unistd.h> extern int yyparse (FILE* output_file); ex...
// // main.c // d16-asm // // Created by Michael Nolan on 6/17/16. // Copyright © 2016 Michael Nolan. All rights reserved. // #include <stdio.h> #include <stdlib.h> #include "parser.h" #include "assembler.h" #include <string.h> #include "instruction.h" #include <unistd.h> extern int yyparse (FILE* output_file); ex...
Use stdint.h in CAST to implement 32 bit and 8 bit unsigned integers.
/* * CAST-128 in C * Written by Steve Reid <sreid@sea-to-sky.net> * 100% Public Domain - no warranty * Released 1997.10.11 */ #ifndef _CAST_H_ #define _CAST_H_ typedef unsigned char u8; /* 8-bit unsigned */ typedef unsigned long u32; /* 32-bit unsigned */ typedef struct { u32 xkey[32]; /* Key, after expansion ...
/* * CAST-128 in C * Written by Steve Reid <sreid@sea-to-sky.net> * 100% Public Domain - no warranty * Released 1997.10.11 */ #ifndef _CAST_H_ #define _CAST_H_ #include <stdint.h> typedef uint8_t u8; /* 8-bit unsigned */ typedef uint32_t u32; /* 32-bit unsigned */ typedef struct { u32 xkey[32]; /* Key,...
Add mathextras.h to wtf to give win32 roundf/lroundf support.
/* * Copyright (C) 2006 Apple Computer, Inc. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright * notice, this list of c...
Add RocksDB merge operator import to the main public header
// // ObjectiveRocks.h // ObjectiveRocks // // Created by Iska on 20/11/14. // Copyright (c) 2014 BrainCookie. All rights reserved. // #import "RocksDB.h" #import "RocksDBOptions.h" #import "RocksDBReadOptions.h" #import "RocksDBWriteOptions.h" #import "RocksDBWriteBatch.h" #import "RocksDBIterator.h" #import "Roc...
// // ObjectiveRocks.h // ObjectiveRocks // // Created by Iska on 20/11/14. // Copyright (c) 2014 BrainCookie. All rights reserved. // #import "RocksDB.h" #import "RocksDBOptions.h" #import "RocksDBReadOptions.h" #import "RocksDBWriteOptions.h" #import "RocksDBWriteBatch.h" #import "RocksDBIterator.h" #import "Roc...
Fix external extension install (post-sideload) restriction on Windows.
// 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_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_UI_H_ #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_UI_H_ class Browser; class ExtensionServi...
// 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_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_UI_H_ #define CHROME_BROWSER_EXTENSIONS_EXTERNAL_INSTALL_UI_H_ #include "build/build_config.h" cl...
Remove a cast again, after it was shown to worsen Windows perf.
/* * Copyright (c) 2012 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) 2012 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...
Add a fence in barrier.
#ifndef UTIL_H #define UTIL_H #include "fibrile.h" /** Atomics. */ #define fence() fibrile_fence() #define fadd(ptr, n) __sync_fetch_and_add(ptr, n) #define cas(...) __sync_val_compare_and_swap(__VA_ARGS__) /** Lock. */ #define lock(ptr) fibrile_lock(ptr) #define unlock(ptr) fibrile_unlock(ptr) #define trylock(ptr...
#ifndef UTIL_H #define UTIL_H #include "fibrile.h" /** Atomics. */ #define fence() fibrile_fence() #define fadd(ptr, n) __sync_fetch_and_add(ptr, n) #define cas(...) __sync_val_compare_and_swap(__VA_ARGS__) /** Lock. */ #define lock(ptr) fibrile_lock(ptr) #define unlock(ptr) fibrile_unlock(ptr) #define trylock(ptr...
Remove ndk-build from [] flac build rules
/* * 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...
Add explicit Foundation import to NSDate extension (for spm compatibility)
// // NSDate+RFC1123.h // MKNetworkKit // // Created by Marcus Rohrmoser // http://blog.mro.name/2009/08/nsdateformatter-http-header/ // http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 // No obvious license attached /** Convert RFC1123 format dates */ @interface NSDate (RFC1123) /** * @name...
// // NSDate+RFC1123.h // MKNetworkKit // // Created by Marcus Rohrmoser // http://blog.mro.name/2009/08/nsdateformatter-http-header/ // http://www.w3.org/Protocols/rfc2616/rfc2616-sec3.html#sec3.3.1 // No obvious license attached #import <Foundation/Foundation.h> /** Convert RFC1123 format dates */ @interf...
Fix for new versions of gtksourceview provided by Oleg Chiruhin
#include "gtk2hs_macros.h" #include <gtksourceview/gtksourcebuffer.h> #if GTK_MAJOR_VERSION < 3 #include <gtksourceview/gtksourceiter.h> #endif #include <gtksourceview/gtksourcelanguage.h> #include <gtksourceview/gtksourcelanguagemanager.h> #include <gtksourceview/gtksourcestyle.h> #include <gtksourceview/gtksourcestyl...
#include "gtk2hs_macros.h" #include <gtksourceview/gtksourcebuffer.h> #if GTK_MAJOR_VERSION < 3 #include <gtksourceview/gtksourceiter.h> #endif #include <gtksourceview/gtksourcelanguage.h> #include <gtksourceview/gtksourcelanguagemanager.h> #include <gtksourceview/gtksourcestyle.h> #include <gtksourceview/gtksourcestyl...
Include NSArray category into main header
// // OMValidation.h // OMValidation // // Copyright (C) 2015 Oliver Mader // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the ...
// // OMValidation.h // OMValidation // // Copyright (C) 2015 Oliver Mader // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal // in the Software without restriction, including without limitation the ...
Add notification message which will be used to notify about voice activity.
// // Copyright (C) 2008 SIPez LLC. // Licensed to SIPfoundry under a Contributor Agreement. // // Copyright (C) 2008 SIPfoundry Inc. // Licensed by SIPfoundry under the LGPL license. // // $$ /////////////////////////////////////////////////////////////////////////////// #ifndef _MprnRtpStreamActivityMsg_h_ #defi...
Update XFAIL line after r294781.
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s // XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64 // REQUIRES: linux typedef int a;
// RUN: not %clang -o /dev/null -v -fxray-instrument -c %s // XFAIL: amd64-, x86_64-, x86_64h-, arm, aarch64, arm64, powerpc64le- // REQUIRES: linux typedef int a;
Fix win builder by tagging MenuButtonDelegate with VIEWS_EXPORT.
// 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 UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_ #define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_ #pragma once namespace gfx { class ...
// 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 UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_ #define UI_VIEWS_CONTROLS_BUTTON_MENU_BUTTON_DELEGATE_H_ #pragma once #include "ui/views/vie...
Extend interfaces with new parsing functions
#pragma once class IElfRelocator; enum class Endianness { Big, Little }; class CArchitecture { public: virtual void AssembleOpcode(const std::wstring& name, const std::wstring& args) = 0; virtual bool AssembleDirective(const std::wstring& name, const std::wstring& args) = 0; virtual void NextSection() = 0; virtu...
#pragma once class IElfRelocator; class CAssemblerCommand; class Tokenizer; enum class Endianness { Big, Little }; class CArchitecture { public: virtual void AssembleOpcode(const std::wstring& name, const std::wstring& args) = 0; virtual bool AssembleDirective(const std::wstring& name, const std::wstring& args) = ...
Change to using CompactTensorV2 as default impl for sparse tensors.
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "compact/compact_tensor.h" #include "compact/compact_tensor_builder.h" namespace vespalib { namespace tensor { struct DefaultTensor { using type = CompactTensor; using buil...
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "compact/compact_tensor_v2.h" #include "compact/compact_tensor_v2_builder.h" namespace vespalib { namespace tensor { struct DefaultTensor { using type = CompactTensorV2; us...
Fix error with char pointer
#include <stdio.h> #include <stdlib.h> #include "error.h" #include "memory.h" #define READ_SIZE 0x4000 static void usage(void) { fprintf(stderr, "usage: tmpgb <file>"); exit(EXIT_FAILURE); } static void load_rom(const char *rom) { FILE *fp; unsigned char *buffer[READ_SIZE]; size_t nread; int i = -1; fp = fo...
#include <stdio.h> #include <stdlib.h> #include "error.h" #include "memory.h" #define READ_SIZE 0x4000 static void usage(void) { fprintf(stderr, "usage: tmpgb <file>"); exit(EXIT_FAILURE); } static void load_rom(const char *rom) { FILE *fp; unsigned char buffer[READ_SIZE]; size_t nread; int i = -1; fp = fop...
Allow tests to override error tolerance
#pragma once #include <stdlib.h> #include <stdio.h> #include <math.h> #include <stdbool.h> #include <check.h> #include <pal.h> #include "../../src/base/pal_base_private.h" #include <common.h> /* Max allowed diff against expected value */ #define EPSILON_MAX 0.001f #define EPSILON_RELMAX 0.00001f struct gold { f...
#pragma once #include <stdlib.h> #include <stdio.h> #include <math.h> #include <stdbool.h> #include <check.h> #include <pal.h> #include "../../src/base/pal_base_private.h" #include <common.h> /* Max allowed diff against expected value */ #ifndef EPSILON_MAX #define EPSILON_MAX 0.001f #endif #ifndef EPSILON_RELMAX #d...
Fix typo in empty struct test check
// RUN: %layout_check %s // RUN: %check %s struct A { }; // CHEKC: /warning: empty struct/ struct Containter { struct A a; }; struct Pre { int i; struct A a; int j; }; struct Pre p = { 1, /* warn */ 2 }; // CHECK: /warning: missing {} initialiser for empty struct/ struct Pre q = { 1, {}, 2 }; main() { struct ...
// RUN: %layout_check %s // RUN: %check %s struct A { }; // CHECK: /warning: empty struct/ struct Container { struct A a; }; struct Pre { int i; struct A a; int j; }; struct Pre p = { 1, /* warn */ 2 }; // CHECK: /warning: missing {} initialiser for empty struct/ struct Pre q = { 1, {}, 2 }; main() { struct A...
Fix compile error on gcc 6.3.0.
#ifndef LPSLCD_VALIDATOR_H #define LPSLCD_VALIDATOR_H #include "generator.h" class Validator { public: static bool Validate (const Code & code) { // | N - k | // | ____ | // | \ a + a | < L // | /___ i i + k | ...
#ifndef LPSLCD_VALIDATOR_H #define LPSLCD_VALIDATOR_H #include "generator.h" #include <cmath> class Validator { public: static bool Validate (const Code & code) { // | N - k | // | ____ | // | \ a + a | < L // | /___...
Solve Fire Flowers in c
#include <math.h> #include <stdio.h> int main() { double r1, x1, y1, r2, x2, y2; double distance; while (scanf("%lf %lf %lf %lf %lf %lf", &r1, &x1, &y1, &r2, &x2, &y2) != EOF) { distance = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); if (r1 >= distance + r2) { puts("RI...
#include <math.h> #include <stdio.h> int main() { double r1, x1, y1, r2, x2, y2; double distance; while (scanf("%lf %lf %lf %lf %lf %lf", &r1, &x1, &y1, &r2, &x2, &y2) != EOF) { distance = sqrt((x1 - x2) * (x1 - x2) + (y1 - y2) * (y1 - y2)); if (r1 >= distance + r2) { ...
Add types "ushort" and "rlim_t" for AIX.
#ifndef FIX_TYPES_H #define FIX_TYPES_H #include <sys/types.h> /* The system include file defines this in terms of bzero(), but ANSI says we should use memset(). */ #if defined(OSF1) #undef FD_ZERO #define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p))) #endif /* Various non-POSIX conforming files which depend o...
#ifndef FIX_TYPES_H #define FIX_TYPES_H #include <sys/types.h> /* The system include file defines this in terms of bzero(), but ANSI says we should use memset(). */ #if defined(OSF1) #undef FD_ZERO #define FD_ZERO(p) memset((char *)(p), 0, sizeof(*(p))) #endif /* Various non-POSIX conforming files which depend o...
Implement interpretation of basic arithmetic and comparatory functions.
#include <stdlib.h> #include <stdio.h> #include <string.h> void runStep(struct stack_node node, struct stack_node *top) { switch( node.data.type ) { case 0: struct stack_node push; push.cdr = top; push.data = node.data; *top = push; break; } }
#include <stdlib.h> #include <stdio.h> #include <string.h> void runStep(struct stack_node node, struct stack_node *top) { switch( node.data.type ) { case T_INT: push(node, top); break; case T_SBRTN: push(node, top); break; case T_char 1: switch( nonde.data.numval ) { case '+': int x =...
Add configuration for MI libsa loadfile, to be used soon.
/* $OpenBSD: loadfile_machdep.h,v 1.1 2013/10/18 10:55:33 miod Exp $ */ /*- * Copyright (c) 1999 The NetBSD Foundation, Inc. * All rights reserved. * * This code is derived from software contributed to The NetBSD Foundation * by Christos Zoulas. * * Redistribution and use in source and binary forms, with or wit...
Correct name of "DisplaceModules" field
#pragma once #include <spotify/json.hpp> #include <spotify/json/codec/boost.hpp> #include "noise/module/NoiseSources.h" namespace spotify { namespace json { template<> struct default_codec_t<noise::module::NoiseSources> { typedef noise::module::NoiseSources NoiseSources; static codec::object_t<NoiseSources...
#pragma once #include <spotify/json.hpp> #include <spotify/json/codec/boost.hpp> #include "noise/module/NoiseSources.h" namespace spotify { namespace json { template<> struct default_codec_t<noise::module::NoiseSources> { typedef noise::module::NoiseSources NoiseSources; static codec::object_t<NoiseSources...
Change solution name to Budget Planner
start Go to Layout [ “budget” (budget) ] Set Window Title [ Current Window; New Title: "Budget Research" ] Set Zoom Level [ 100% ] # #Report version number to Memory Switch Table. Set Field [ MemorySwitch::versionBudget; Reference::version ] # #Show regular menus if Admin logs in only. Show/Hide Text Ruler [ Hide ] If ...
start Go to Layout [ “budget” (budget) ] Set Window Title [ Current Window; New Title: "Budget Planner" ] Set Zoom Level [ 100% ] # #Report version number to Memory Switch Table. Set Field [ MemorySwitch::versionBudget; Reference::version ] # #Show regular menus if Admin logs in only. Show/Hide Text Ruler [ Hide ] If [...
Add a little test driver
#include "bitboard.h" int main(int argc, char** argv) { Bitboard test = board_init(); board_print(test); return 0; }
Add a new feature, lol
/* * buffer.c * * Created on: 06.02.2015. * Author: ichiro */ /* Includes ------------------------------------------------------------------*/ #include "buffer.h" /* Private typedef -----------------------------------------------------------*/ /* Private define ---------------------------------------------...
/* * buffer.c * * Created on: 06.02.2015. * Author: ichiro */ /* Includes ------------------------------------------------------------------*/ #include "buffer.h" /* Private typedef -----------------------------------------------------------*/ /* Private define ---------------------------------------------...
Add include to get declaration for std::mutex (staging_vespalib).
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/util/executor.h> #include <vespa/vespalib/util/time.h> #include <vector> class FNET_Transport; namespace vespalib { class TimerTask; /** * ScheduledExecutor is a class cap...
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include <vespa/vespalib/util/executor.h> #include <vespa/vespalib/util/time.h> #include <mutex> #include <vector> class FNET_Transport; namespace vespalib { class TimerTask; /** * ScheduledExecut...
Move some action methods into header for subclasses to support.
// // BRMenuOrderingGroupViewController.h // MenuKit // // Created by Matt on 29/07/15. // Copyright (c) 2015 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0. // #import <UIKit/UIKit.h> #import "BRMenuOrderingDelegate.h" #import <BRStyle/BRUIStylish.h> @class BRMenuOrderingFlowContr...
// // BRMenuOrderingGroupViewController.h // MenuKit // // Created by Matt on 29/07/15. // Copyright (c) 2015 Blue Rocket. Distributable under the terms of the Apache License, Version 2.0. // #import <UIKit/UIKit.h> #import "BRMenuOrderingDelegate.h" #import <BRStyle/BRUIStylish.h> @class BRMenuOrderingFlowContr...
Add hal watchdog for stm32f3
/** * Licensed to the Apache Software Foundation (ASF) under one * or more contributor license agreements. See the NOTICE file * distributed with this work for additional information * regarding copyright ownership. The ASF licenses this file * to you under the Apache License, Version 2.0 (the * "License"); you...
Put all NFS-related header files (and the platform-dependent ugliness) in one place.
/***************************Copyright-DO-NOT-REMOVE-THIS-LINE** * CONDOR Copyright Notice * * See LICENSE.TXT for additional notices and disclaimers. * * Copyright (c)1990-1998 CONDOR Team, Computer Sciences Department, * University of Wisconsin-Madison, Madison, WI. All Rights Reserved. * No use of the COND...
Add Chapter 27, exercise 16
/* Chapter 27, exercise 16: "improve" (obfuscate) exercise 15 by using macros */ #include<stdio.h> #include<stdlib.h> #define GET_PTR(type,var_name) type* var_name = (type*)malloc(sizeof(type)) #define SET_FCT_PTR(pshape,pfct,fct) pshape->shape.pvtable->pfct = &fct typedef void (*Pfct0)(struct Shape*); typedef void ...
Include math.h instead of bits headers.
#if defined (__GNUC__) || defined (__INTEL_COMPILER) || defined (__clang__) #ifdef INFINITY #undef INFINITY #endif #ifdef NAN #undef NAN #endif #define NAN __builtin_nan("") #define NANf __builtin_nanf("") #define INFINITY __builtin_inf() #define INFINITYf __builtin_inff() #else #include <bits/nan.h> #include <bits/...
#if defined (__GNUC__) || defined (__INTEL_COMPILER) || defined (__clang__) #ifdef INFINITY #undef INFINITY #endif #ifdef NAN #undef NAN #endif #define NAN __builtin_nan("") #define NANf __builtin_nanf("") #define INFINITY __builtin_inf() #define INFINITYf __builtin_inff() #else #include <math.h> #endif
Reduce chance of include guard conflicts
#ifndef FLATCC_PORTABLE_H #define FLATCC_PORTABLE_H #include "flatcc/portable/portable.h" #endif /* FLATCC_PORTABLE_H */
#ifndef FLATCC_PORTABLE_H #define FLATCC_PORTABLE_H #include "flatcc/portable/portable_basic.h" #endif /* FLATCC_PORTABLE_H */
Change RemoveFileAsRoot to RemoveFile per change in FileIO.
#pragma once #include <gtest/gtest.h> #include <FileIO.h> #include <czmq.h> class NotifierTest : public ::testing::Test { public: NotifierTest() { }; ~NotifierTest() { } protected: virtual void SetUp() { }; virtual void TearDown() { FileIO::RemoveFileAsRoot(notifierIPCPath); FileI...
#pragma once #include <gtest/gtest.h> #include <FileIO.h> #include <czmq.h> class NotifierTest : public ::testing::Test { public: NotifierTest() { }; ~NotifierTest() { } protected: virtual void SetUp() { }; virtual void TearDown() { FileIO::RemoveFile(notifierIPCPath); FileIO::Rem...
Introduce inline assembly parsing test is PR30372.
// REQUIRES: x86-registered-target // RUN: %clang_cc1 %s -triple i386-pc-windows-msvc18.0.0 -disable-free -fms-volatile -fms-extensions -fms-compatibility -fms-compatibility-version=18 -std=c++11 -x c++ // Check that the parser catching an 'error' from forward declaration of "location" does not lexer out it's subseque...
Adjust dutch connection lost message.
#include "num2words.h" // Language strings for Dutch const Language LANG_DUTCH = { .hours = { "een", "twee", "drie", "vier", "vijf", "zes", "zeven", "acht", "negen", "tien", "elf", "twaalf" }, .phrases = { "*$1 uur ", "vijf over *$1 ", "tien over *$1 ", "kwart over *$1 ", "tien vo...
#include "num2words.h" // Language strings for Dutch const Language LANG_DUTCH = { .hours = { "een", "twee", "drie", "vier", "vijf", "zes", "zeven", "acht", "negen", "tien", "elf", "twaalf" }, .phrases = { "*$1 uur ", "vijf over *$1 ", "tien over *$1 ", "kwart over *$1 ", "tien vo...
Allow optional(nullable) parameters to register starflight-client
// // StarFlightPushClient.h // // Created by Starcut Software on 4/30/13. // Copyright (c) Starcut. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN extern NSString *const SCStarFlightClientUUIDNotification; @interface SCStarFlightPushClient : NSObject <NSURLConnectionDelegate> ...
// // StarFlightPushClient.h // // Created by Starcut Software on 4/30/13. // Copyright (c) Starcut. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN extern NSString *const SCStarFlightClientUUIDNotification; @interface SCStarFlightPushClient : NSObject <NSURLConnectionDelegate> ...
Make `read` wrapper for stdio.h
#include "FILE.h" extern _Thread_local int errno; ptrdiff_t __read(int, void*, size_t); size_t __stdio_read(void* restrict buffer, size_t size, FILE stream[restrict static 1]) { ptrdiff_t count = __read(stream->fd, buffer, size); if (count < 0) { stream->state |= _errbit; errno = -count; ...
Add first version of elf header struct
#ifndef TYPES_H #define TYPES_H struct elf_header { }; #endif
#ifndef TYPES_H #define TYPES_H #define unsigned char ubyte_t #define unsigned int uint_t #define unsigned short int uword_t #define ELF_FORM 1 #define ELF_32 0 #define ELF_64 1 #define ELF_ORG 1 #define END_BIG 0 #define END_LTL 1 struct el...
Mark state unused in float test
/* * Copyright 2019 Arnaud Gelas <arnaud.gelas@sensefly.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright 2019 Arnaud Gelas <arnaud.gelas@sensefly.com> * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
Fix soft-reset for some platforms
/* * arch/arm/mach-orion5x/include/mach/system.h * * Tzachi Perelstein <tzachi@marvell.com> * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ #ifndef __ASM_ARCH_SYSTEM_H #...
/* * arch/arm/mach-orion5x/include/mach/system.h * * Tzachi Perelstein <tzachi@marvell.com> * * This file is licensed under the terms of the GNU General Public * License version 2. This program is licensed "as is" without any * warranty of any kind, whether express or implied. */ #ifndef __ASM_ARCH_SYSTEM_H #...
Make the declaration of bzero match size_t on x86-64-linux.
// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.memset | count 3 void *memset(void*, int, long); void bzero(void*, int); void test(int* X, char *Y) { memset(X, 4, 1000); bzero(Y, 100); }
// RUN: %llvmgcc -xc %s -c -o - | llvm-dis | grep llvm.memset | count 3 void *memset(void*, int, long); void bzero(void*, long); void test(int* X, char *Y) { memset(X, 4, 1000); bzero(Y, 100); }
Modify arduino hab help menu.
#include "sim-hab.h" // // display usage // void usage(void) { fprintf(stderr, "\nsim-hab must be ran with two options. -p and -a both followed\n" "by a file location. To determine the file locations run the\n" "findPort program.\n" "\n" "usage: sim-hab...
#include "sim-hab.h" // // display usage // void usage(void) { fprintf(stderr, "\ncgba-sim-arduino-hab must be ran with one option. -a followed\n" "by a file location.\n" "\n" "usage: cgba-sim-arduino-hab [OPTIONS]\n" " -?, --help Show this ...
Add ES 3.0 support for iPhone
#ifndef _GL_COMMON_H #define _GL_COMMON_H #if defined(USING_GLES2) #ifdef IOS // I guess we can soon add ES 3.0 here too #include <OpenGLES/ES2/gl.h> #include <OpenGLES/ES2/glext.h> #else #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #ifndef MAEMO #include <EGL/egl.h> #endif // !MAEMO #endif // IOS #if defined(ANDR...
#ifndef _GL_COMMON_H #define _GL_COMMON_H #if defined(USING_GLES2) #ifdef IOS #include <OpenGLES/ES3/gl.h> #include <OpenGLES/ES3/glext.h> #include <OpenGLES/ES2/gl.h> #include <OpenGLES/ES2/glext.h> #else #include <GLES2/gl2.h> #include <GLES2/gl2ext.h> #ifndef MAEMO #include <EGL/egl.h> #endif // !MAEMO #endif // IO...
Add label alias for control
#pragma once #include "Control.h" class Label : public Control { public: Label() { } Label(int id, HWND parent) : Control(id, parent) { } };
ADD commented out skip menu
#ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H #define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H #include "GameState.h" #include "StartState.h" #include "LevelSelectState.h" #include <vector> #define START_WITHOUT_MENU class GameStateHandler { private: std::vector<GameState*> m_stateStack; std::vector<Game...
#ifndef SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H #define SSPAPPLICATION_GAMESTATES_GAMESTATEHANDLER_H #include "GameState.h" #include "StartState.h" #include "LevelSelectState.h" #include <vector> //#define START_WITHOUT_MENU class GameStateHandler { private: std::vector<GameState*> m_stateStack; std::vector<Ga...
Fix k64f stack overflow during WebUSB flashing
/** * @file tasks.h * @brief Macros for configuring the run time tasks * * DAPLink Interface Firmware * Copyright (c) 2009-2020, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in ...
/** * @file tasks.h * @brief Macros for configuring the run time tasks * * DAPLink Interface Firmware * Copyright (c) 2009-2020, ARM Limited, All Rights Reserved * SPDX-License-Identifier: Apache-2.0 * * Licensed under the Apache License, Version 2.0 (the "License"); you may * not use this file except in ...
Update Skia milestone to 104
/* * 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 103 #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 104 #endif
Add attribute for unused arguments
#ifndef HL7PARSER_CONFIG_H #define HL7PARSER_CONFIG_H /** * \file config.h * * Generic configuration directives and macros used by the HL7 parser. * * \internal * Copyright (c) 2003-2011 \b Erlar (http://erlar.com) */ /* ------------------------------------------------------------------------ Headers ----------...
#ifndef HL7PARSER_CONFIG_H #define HL7PARSER_CONFIG_H /** * \file config.h * * Generic configuration directives and macros used by the HL7 parser. * * \internal * Copyright (c) 2003-2011 \b Erlar (http://erlar.com) */ /* ------------------------------------------------------------------------ Headers ----------...
Replace include stdio with include terminal
#if defined(__linux__) #include <stdio.h> #else #include "../tlibc/stdio/stdio.h" #endif void abort(void) { // TODO: Add proper kernel panic. printf("Kernel Panic! abort()\n"); while ( 1 ) { } }
#include "kputs.c" void abort(void) { // TODO: Add proper kernel panic. kputs("Kernel Panic! abort()\n"); while ( 1 ) { } }
Update method defs for v7
// // APLifecycleHooks.h // LoyaltyRtr // // Created by David Benko on 7/22/14. // Copyright (c) 2014 David Benko. All rights reserved. // #import <Foundation/Foundation.h> @interface APLifecycleHooks : NSObject +(void)setSDKLogging:(BOOL)shouldLog; +(void)synchronousConnectionFinished:(void (^)(NSData *downloade...
// // APLifecycleHooks.h // LoyaltyRtr // // Created by David Benko on 7/22/14. // Copyright (c) 2014 David Benko. All rights reserved. // #import <Foundation/Foundation.h> #define __VERBOSE @interface APLifecycleHooks : NSObject + (void)connectionWillStart:(NSURLRequest * (^)(NSURLRequest * req))connectionWill...
Add some IB support for uiStyle.
// // BRMenuPlusMinusButton.h // Menu // // Created by Matt on 4/17/13. // Copyright (c) 2013 Pervasent Consulting, Inc. All rights reserved. // #import <UIKit/UIKit.h> @class BRMenuUIStyle; IB_DESIGNABLE @interface BRMenuPlusMinusButton : UIControl @property (nonatomic, strong) BRMenuUIStyle *uiStyle; @propert...
// // BRMenuPlusMinusButton.h // Menu // // Created by Matt on 4/17/13. // Copyright (c) 2013 Pervasent Consulting, Inc. All rights reserved. // #import <UIKit/UIKit.h> @class BRMenuUIStyle; IB_DESIGNABLE @interface BRMenuPlusMinusButton : UIControl @property (nonatomic, strong) IBOutlet BRMenuUIStyle *uiStyle;...
Remove unused fields in dynamic library writer
//===- lib/ReaderWriter/ELF/ARM/ARMDynamicLibraryWriter.h -----------------===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------...
//===- lib/ReaderWriter/ELF/ARM/ARMDynamicLibraryWriter.h -----------------===// // // The LLVM Linker // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===----------------------------------------------------------------...
Change memory exception to MemoryError
/* * This file is part of the OpenMV project. * Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com> * This work is licensed under the MIT license, see the file LICENSE for details. * * Memory allocation functions. * */ #include <mp.h> #include "mdefs.h" #include "xalloc.h" void *xalloc_fail() { ...
/* * This file is part of the OpenMV project. * Copyright (c) 2013/2014 Ibrahim Abdelkader <i.abdalkader@gmail.com> * This work is licensed under the MIT license, see the file LICENSE for details. * * Memory allocation functions. * */ #include <mp.h> #include "mdefs.h" #include "xalloc.h" void *xalloc_fail() { ...
Update include psa_defs -> psa/client
/* * Copyright (c) 2018-2019 ARM Limited. All rights reserved. * * 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...
/* * Copyright (c) 2018-2019 ARM Limited. All rights reserved. * * 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...