Instruction
stringlengths
14
778
input_code
stringlengths
0
4.24k
output_code
stringlengths
1
5.44k
Remove duplicate content in file.
// Copyright (c) 2014 The Chromium Embedded Framework 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 CEF_LIBCEF_DLL_CEF_MACROS_H_ #define CEF_LIBCEF_DLL_CEF_MACROS_H_ #pragma once #ifdef BUILDING_CEF_SHARED #include "base/m...
// Copyright (c) 2014 The Chromium Embedded Framework 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 CEF_LIBCEF_DLL_CEF_MACROS_H_ #define CEF_LIBCEF_DLL_CEF_MACROS_H_ #pragma once #ifdef BUILDING_CEF_SHARED #include "base/m...
Add integer interpret and register algorithm.
using namespace std; vector<int> Int; vector<string> Name; int CheckForInt(string ProcessInput) { if (ProcessInput.substr(0, 3) == "int") { int EqualLocation; int SemicolonLocation; stringstream Number; stringstream StringName; int FinalNumber; string FinalName; EqualLocation = ProcessInput...
Handle epoll events one at a time. Doesn't seem to make things slower, and eliminates (I think) risk of freed backends getting events.
#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <sys/epoll.h> #include "epollinterface.h" #define MAX_EPOLL_EVENTS 10 void add_epoll_handler(int epoll_fd, struct epoll_event_handler* handler, uint32_t event_mask) { struct epoll_event event; event.data.ptr = handler; event.events = e...
#include <stdint.h> #include <stdio.h> #include <stdlib.h> #include <sys/epoll.h> #include "epollinterface.h" #define MAX_EPOLL_EVENTS 1 void add_epoll_handler(int epoll_fd, struct epoll_event_handler* handler, uint32_t event_mask) { struct epoll_event event; event.data.ptr = handler; event.events = ev...
Change name to const char *
#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 { const char* name; CardType cardType; // monster only Attribute attribute; MonsterType monsterType; Type type; MonsterType monsterAbilit...
Fix warning due to lack of virtual destructor
#ifndef REQUESTHANDLER_H #define REQUESTHANDLER_H class RequestHandler { public: virtual bool canHandle(HTTPMethod method, String uri) { return false; } virtual bool canUpload(String uri) { return false; } virtual bool handle(ESP8266WebServer& server, HTTPMethod requestMethod, String requestUri) { return f...
#ifndef REQUESTHANDLER_H #define REQUESTHANDLER_H class RequestHandler { public: virtual ~RequestHandler() { } virtual bool canHandle(HTTPMethod method, String uri) { return false; } virtual bool canUpload(String uri) { return false; } virtual bool handle(ESP8266WebServer& server, HTTPMethod requestMet...
Increase max kmalloc size for very large systems
#if (PAGE_SIZE == 4096) CACHE(32) #endif CACHE(64) #if L1_CACHE_BYTES < 64 CACHE(96) #endif CACHE(128) #if L1_CACHE_BYTES < 128 CACHE(192) #endif CACHE(256) CACHE(512) CACHE(1024) CACHE(2048) CACHE(4096) CACHE(8192) CACHE(16384) CACHE(32768) CACHE(65536) CACHE(131072) #ifndef CONFIG_MMU CACHE(262144) C...
#if (PAGE_SIZE == 4096) CACHE(32) #endif CACHE(64) #if L1_CACHE_BYTES < 64 CACHE(96) #endif CACHE(128) #if L1_CACHE_BYTES < 128 CACHE(192) #endif CACHE(256) CACHE(512) CACHE(1024) CACHE(2048) CACHE(4096) CACHE(8192) CACHE(16384) CACHE(32768) CACHE(65536) CACHE(131072) #if (NR_CPUS > 512) || (MAX_NUMNODES...
Update Skia milestone to 89
/* * 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 88 #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 89 #endif
Disable MD5, SHA1, SHA256 HW ACC for STM32F439xI
/* * mbedtls_device.h ******************************************************************************* * Copyright (c) 2017, STMicroelectronics * 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 Li...
/* * mbedtls_device.h ******************************************************************************* * Copyright (c) 2017, STMicroelectronics * 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 Li...
Make OpenSSL ECDSA and RSA request only until they can be tested
/* * Utils for calling OpenSSL * (C) 2015 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ #ifndef BOTAN_OPENSSL_H__ #define BOTAN_OPENSSL_H__ #include <botan/secmem.h> #include <botan/exceptn.h> #include <memory> #include <openssl/err.h> namespace Botan { class OpenSSL_Error ...
/* * Utils for calling OpenSSL * (C) 2015 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ #ifndef BOTAN_OPENSSL_H__ #define BOTAN_OPENSSL_H__ #include <botan/secmem.h> #include <botan/exceptn.h> #include <memory> #include <openssl/err.h> namespace Botan { class OpenSSL_Error ...
Fix bug - obviously, recursive template type is impossible.
//===- Slab.h -------------------------------------------------------------===// // // The Bold Project // // This file is distributed under the New BSD License. // See LICENSE for details. // //===----------------------------------------------------------------------===// #ifndef BOLD_SUPP...
//===- Slab.h -------------------------------------------------------------===// // // The Bold Project // // This file is distributed under the New BSD License. // See LICENSE for details. // //===----------------------------------------------------------------------===// #ifndef BOLD_SUPP...
Implement allocation and deallocation for c hamming window.
#include "ruby.h" #include "noyes.h" HammingWindow * new_hamming_window(int window_size) { HammingWindow *hw = malloc(sizeof(HammingWindow)); hw->buf = malloc(window_size * sizeof(double)); hw->buflen = window_size; return hw; } void free_hamming_window(HammingWindow *hw) { free(hw->buf); free(hw); } NDa...
Fix licensing errors in files
/* * Copyright (C) 2008, Nokia <ivan.frade@nokia.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. ...
/* * Copyright (C) 2008, Nokia <ivan.frade@nokia.com> * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) any later version. * * This...
Set API ver and disable CRT warnings on Win32.
/* StdAfx.h * * Copyright (C) 2013 Michael Imamura * * 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 ...
/* StdAfx.h * * Copyright (C) 2013 Michael Imamura * * 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 ...
Add comment for WIF functions.
#ifndef __BTC_WIF_H__ #define __BTC_WIF_H__ #include <string> #include <vector> namespace btc { namespace wif { std::string PrivateKeyToWif(const std::vector<uint8_t> &priv_key); std::vector<uint8_t> WifToPrivateKey(const std::string &priv_key_str); } // namespace wif } // namespace btc #endif
#ifndef __BTC_WIF_H__ #define __BTC_WIF_H__ #include <string> #include <vector> namespace btc { namespace wif { /** * Convert private key to string in WIF * * @param priv_key Private key data. * * @return WIF string. */ std::string PrivateKeyToWif(const std::vector<uint8_t> &priv_key); /** * Parse WIF privat...
Fix ICMPv4 dest addr set
#include "ethernet.h" #include "icmpv4.h" #include "ip.h" #include "utils.h" void icmpv4_incoming(struct sk_buff *skb) { struct iphdr *iphdr = ip_hdr(skb); struct icmp_v4 *icmp = (struct icmp_v4 *) iphdr->data; //TODO: Check csum switch (icmp->type) { case ICMP_V4_ECHO: icmpv4_re...
#include "ethernet.h" #include "icmpv4.h" #include "ip.h" #include "utils.h" void icmpv4_incoming(struct sk_buff *skb) { struct iphdr *iphdr = ip_hdr(skb); struct icmp_v4 *icmp = (struct icmp_v4 *) iphdr->data; //TODO: Check csum switch (icmp->type) { case ICMP_V4_ECHO: icmpv4_re...
Add BSTNode & BST struct declaration
#include <stdlib.h> #ifndef __BST_H__ #define __BST_H__ #endif
#include <stdlib.h> #ifndef __BST_H__ #define __BST_H__ struct BSTNode; struct BST; #endif
Add comment on what space the incoming ray should be in
#ifndef GEOMETRY_H #define GEOMETRY_H #include <vector> #include <string> #include <memory> #include "linalg/ray.h" #include "linalg/transform.h" class Geometry { public: virtual bool intersect(Ray &r) = 0; }; class Node { std::vector<std::shared_ptr<Node>> children; std::shared_ptr<Geometry> geometry; Transform...
#ifndef GEOMETRY_H #define GEOMETRY_H #include <vector> #include <string> #include <memory> #include "linalg/ray.h" #include "linalg/transform.h" class Geometry { public: /* * Test a ray for intersection with the geometry. * The ray should have been previously transformed into object space */ virtual bool int...
Increase node count to 3
#ifndef DISTRIBUTED_H_ #define DISTRIBUTED_H_ #include <pthread.h> #include "synch.h" #define N_WORKERS 2 /* The Nahanni device */ #define SHM_DEV "/dev/uio0" /* The size of the shared memory, in bytes */ #define SHM_SIZE (1024L * 1024L * 1024L) /* Where we should map the memory */ #define SHM_LOC ...
#ifndef DISTRIBUTED_H_ #define DISTRIBUTED_H_ #include <pthread.h> #include "synch.h" /* This is a misnomer - it's actually the number of processes (master + workers) */ #define N_WORKERS 3 /* The Nahanni device */ #define SHM_DEV "/dev/uio0" /* The size of the shared memory, in bytes */ #define SHM_SIZE ...
Add a triple, per Ben's suggestion.
// REQUIRES: x86-registered-target // RUN: %clang_cc1 %s -verify -fasm-blocks #define M __asm int 0x2c #define M2 int void t1(void) { M } void t2(void) { __asm int 0x2c } void t3(void) { __asm M2 0x2c } void t4(void) { __asm mov eax, fs:[0x10] } void t5() { __asm { int 0x2c ; } asm comments are fun! }{ } __...
// RUN: %clang_cc1 %s -triple i386-apple-darwin10 -verify -fasm-blocks #define M __asm int 0x2c #define M2 int void t1(void) { M } void t2(void) { __asm int 0x2c } void t3(void) { __asm M2 0x2c } void t4(void) { __asm mov eax, fs:[0x10] } void t5() { __asm { int 0x2c ; } asm comments are fun! }{ } __asm {} ...
Make master header platform neutral
// // UTAPIObjCAdapter-iOS.h // UTAPIObjCAdapter-iOS // // Created by Mark Woollard on 15/05/2016. // Copyright © 2016 UrbanThings. All rights reserved. // #import <UIKit/UIKit.h> //! Project version number for UTAPIObjCAdapter-iOS. FOUNDATION_EXPORT double UTAPIObjCAdapter_iOSVersionNumber; //! Project version ...
// // UTAPIObjCAdapter-iOS.h // UTAPIObjCAdapter-iOS // // Created by Mark Woollard on 15/05/2016. // Copyright © 2016 UrbanThings. All rights reserved. // //! Project version number for UTAPIObjCAdapter-iOS. FOUNDATION_EXPORT double UTAPIObjCAdapter_iOSVersionNumber; //! Project version string for UTAPIObjCAdapt...
Solve c problem to validate a string contains no repeated characters
#include <stdio.h> #include <stdlib.h> #include <string.h> int is_unique(char *str) { int c; int table[128]; for (int i = 0; i < 128; i++) { table[i] = 0; } for (int i = 0; i < strlen(str); i++) { if (str[i] != ' ') { c = (int) str[i]; table[c]++; ...
Update documentation for modification of mbc and new properties
// This file is part of RBDyn. // // RBDyn is free software: you can redistribute it and/or modify // it under the terms of the GNU Lesser General Public License as published by // the Free Software Foundation, either version 3 of the License, or // (at your option) any later version. // // RBDyn is distributed in the ...
Change UNKNOWN to UNKNOWN! in 37/03 + chars to signed chars
// PARAM: --enable ana.int.interval --enable ana.int.congruence --disable ana.int.def_exc // Overflow information should be passed from the interval domain to congruences #include <assert.h> #include <stdio.h> int main(){ char r; if (r) { r = -68; } else { r = -63; } char k = r - 80; assert (k ==...
// PARAM: --enable ana.int.interval --enable ana.int.congruence --disable ana.int.def_exc // Overflow information should be passed from the interval domain to congruences #include <assert.h> #include <stdio.h> int main(){ signed char r; if (r) { r = -68; } else { r = -63; } signed char k = r - 80; ...
Add a section which test if the removePoint function work
#include <polygon.h> int main(int argc, char* argv[]) { Polygon lol; lol=createPolygon(); lol=addPoint(lol, createPoint(12.6,-5.3)); lol=addPoint(lol, createPoint(-4.1,456.123)); printf("\n\ntaille : %d", lol.size); printf("\n\nx premier point : %f", lol.head->value.x); printf("\ny premier point : %f\n\n",...
#include <polygon.h> int main(int argc, char* argv[]) { Polygon lol; lol=createPolygon(); lol=addPoint(lol, createPoint(12.6,-5.3)); lol=addPoint(lol, createPoint(-4.1,456.123)); lol=addPoint(lol, createPoint(23.7,1)); printf("\n\ntaille : %d", lol.size); printf("\n\nx premier point : %f", lol.head->value....
Fix lack of _Noreturn support in Clang 3.0.
/* * Copyright (c) 2011-2013 Graham Edgecombe <graham@grahamedgecombe.com> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS ...
/* * Copyright (c) 2011-2013 Graham Edgecombe <graham@grahamedgecombe.com> * * Permission to use, copy, modify, and/or distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * * THE SOFTWARE IS ...
Fix header guard for amalgamation
/* * RFC 6979 Deterministic Nonce Generator * (C) 2014 Jack Lloyd * * Distributed under the terms of the Botan license */ #ifndef BOTAN_RFC6979_GENERATOR__ #define BOTAN_RFC6979_GENERATOR__ #include <botan/bigint.h> #include <string> namespace Botan { /** * @param x the secret (EC)DSA key * @param q the group order...
/* * RFC 6979 Deterministic Nonce Generator * (C) 2014 Jack Lloyd * * Distributed under the terms of the Botan license */ #ifndef BOTAN_RFC6979_GENERATOR_H__ #define BOTAN_RFC6979_GENERATOR_H__ #include <botan/bigint.h> #include <string> namespace Botan { /** * @param x the secret (EC)DSA key * @param q the group o...
Create a macro for pipeline debugging
#ifndef __KMS_UTILS_H__ #define __KMS_UTILS_H__ #include <gst/gst.h> GstElement* kms_get_pipeline(); void kms_dynamic_connection(GstElement *orig, GstElement *dest, const gchar *name); GstElement* kms_utils_get_element_for_caps(GstElementFactoryListType type, GstRank rank, const GstCaps *caps, GstPadDirecti...
#ifndef __KMS_UTILS_H__ #define __KMS_UTILS_H__ #include <gst/gst.h> #define KMS_DEBUG_PIPE(name) GST_DEBUG_BIN_TO_DOT_FILE_WITH_TS( \ GST_BIN(kms_get_pipeline()), \ GST_DEBUG_GRAPH_SHOW_ALL, name); \ GstElement* kms_get_pipeline(); void kms_dynamic_connection(GstElement *orig, GstElement *dest, const gch...
Add RSA byte length constant
#ifndef _RSA_SIGN_CONSTANTS_H_ #define _RSA_SIGN_CONSTANTS_H_ /* * RSA Block length. Used to determine the modulo's size. */ #define RSA_SIGN_BLOCK_LEN (1024) #define RSA_SIGN_HASH_METHOD_SHA_1 ("sha1") #define RSA_SIGN_HASH_METHOD_SHA_256 ("sha256") /* * Supported Hashing methods for RSA signature validation *...
#ifndef _RSA_SIGN_CONSTANTS_H_ #define _RSA_SIGN_CONSTANTS_H_ /* * RSA Block length. Used to determine the modulo's size. */ #define RSA_SIGN_BLOCK_LEN (RSA_SIGN_KEY_BITSIZE/8) #define RSA_SIGN_KEY_BITSIZE (1024) #define RSA_SIGN_HASH_METHOD_SHA_1 ("sha1") #define RSA_SIGN_HASH_METHOD_SHA_256 ("sha256") /* * Sup...
Add some color for console output
#ifndef KAI_PLATFORM_GAME_CONTROLLER_H #define KAI_PLATFORM_GAME_CONTROLLER_H #include KAI_PLATFORM_INCLUDE(GameController.h) #endif // SHATTER_PLATFORM_GAME_CONTROLLER_H //EOF
#ifndef KAI_PLATFORM_GAME_CONTROLLER_H #define KAI_PLATFORM_GAME_CONTROLLER_H #include KAI_PLATFORM_INCLUDE(GameController.h) #endif //EOF
Fix mismatch in function signature and implementation.
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
// Copyright 2020 Google LLC // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // https://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in...
Add generic perf counter definitions.
#ifndef TUVOK_PERF_COUNTER_H #define TUVOK_PERF_COUNTER_H /// Valid performance counters the system should track. /// When adding a new counter, please add a (units) clause so we know how to /// interpret the value! enum PerfCounter { PERF_DISK_READ=0, // reading bricks from disk (seconds) PERF_DECOMPRESSION, ...
Add declaration header file for token space.
/** @file GUID for PcAtChipsetPkg PCD Token Space Copyright (c) 2009, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license ...
Fix casing for relatively included header to fix Linux builds
//------------------------------------------------------------------------------------------------------- // 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. //---------------------------------------------------------...
Make mesh loader actually read stdin
#include "../src/mesh_obj.h" #include <stdio.h> #include <stdlib.h> int main(int argc, char *args[]) { if(argc < 2) { printf("test_mesh test-mesh-name.obj\n"); return 0; } // read mesh from standard input, push into obj parser Mesh *mesh = meshReadOBJ(args[1]); if(!mesh) { r...
#include "../src/mesh_obj.h" #include <stdio.h> #include <stdlib.h> #include <string.h> int main(int argc, char *args[]) { if(argc < 2) { printf("usage: test_mesh filename.obj\n"); printf(" pass - (a dash character) as filename to read from stdin\n"); return 0; } Mesh *mesh; //...
Add the missing PNaCl atomicops support.
// Protocol Buffers - Google's data interchange format // Copyright 2012 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistri...
Read from tun buffer and print hexdump in loop
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <errno.h> #include "basic.h" #include "tuntap_if.h" #include "utils.h" int main(int argc, char** argv) { int tun_fd; char buf[100]; char *dev = calloc(10, 1); CLEAR(buf); tun_fd = tun_alloc(dev); if (set_i...
#include <stdlib.h> #include <stdio.h> #include <unistd.h> #include <string.h> #include <errno.h> #include "basic.h" #include "tuntap_if.h" #include "utils.h" int main(int argc, char** argv) { int tun_fd; char buf[100]; char *dev = calloc(10, 1); CLEAR(buf); tun_fd = tun_alloc(dev); if (set_i...
Add the timezone to the data model.
// // SRDataModel.h // Sensorama // // Created by Wojciech Adam Koszek (h) on 19/04/2016. // Copyright © 2016 Wojciech Adam Koszek. All rights reserved. // #import <Foundation/Foundation.h> #import "Realm/Realm.h" @interface SRDataPoint : RLMObject @property NSNumber<RLMInt> *accX; @property NSNumber<RLMInt> *ac...
// // SRDataModel.h // Sensorama // // Created by Wojciech Adam Koszek (h) on 19/04/2016. // Copyright © 2016 Wojciech Adam Koszek. All rights reserved. // #import <Foundation/Foundation.h> #import "Realm/Realm.h" @interface SRDataPoint : RLMObject @property NSNumber<RLMInt> *accX; @property NSNumber<RLMInt> *ac...
Add missing include for getpagesize, and fix a typo.
//===-- enable_execute_stack.c - Implement __enable_execute_stack ---------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===-- enable_execute_stack.c - Implement __enable_execute_stack ---------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Remove debugging changes from 36/17
// SKIP PARAM: --sets ana.activated[+] octApron #include <pthread.h> #include <assert.h> int g = 42; // matches write in t_fun pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { // pthread_mutex_lock(&A); // pthread_mutex_lock(&B); // g = 42; ...
// SKIP PARAM: --sets ana.activated[+] octApron #include <pthread.h> #include <assert.h> int g = 42; // matches write in t_fun pthread_mutex_t A = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_t B = PTHREAD_MUTEX_INITIALIZER; void *t_fun(void *arg) { pthread_mutex_lock(&A); pthread_mutex_lock(&B); g = 42; pthread_...
Support inhert constructors from BaseType
#ifndef __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C #define __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C #include <RTypes.h> class REvent { public: REvent(); virtual ~REvent(); void accept(); void ignore(); bool isAccepted() const; void setAccepted(bool accepted); virtual rcount type() ...
#ifndef __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C #define __INCLUDED_6FCA43F2953F11E6AA6EA088B4D1658C #include <RTypes.h> class REvent { public: REvent(); virtual ~REvent(); void accept(); void ignore(); bool isAccepted() const; void setAccepted(bool accepted); virtual rcount type() ...
Allow user to indicate filepaths of taskfiles
#include <stdio.h> #include <stdlib.h> #include "src/headers.h" int main() { char* taskfilepath = "D:\\zz_exp\\testinggrounds\\tasks.txt"; task_list* list = gettasks(taskfilepath); task_list* traveller = list; while ( traveller != NULL ) { task_t* task = traveller -> task; result_t* r...
#include <stdio.h> #include <stdlib.h> #include "src/headers.h" int main(int argc, char** argv) { for ( int x = 0; x < argc; x++ ) { char* taskfilepath = argv[x]; task_list* list = gettasks(taskfilepath); task_list* traveller = list; while ( traveller != NULL ) { task_...
Create q6: lower by recursion
#include <stdio.h> int _findLower(int *vector, int lastIndex, int lowerUntilNow){ if (lastIndex == 0) { return lowerUntilNow; } else{ int current = vector[--lastIndex]; lowerUntilNow = (lowerUntilNow < current) ? lowerUntilNow : current; return _findLower(vector, lastIndex, lowerUntilNow); } } int findLo...
Fix license header in the export header.
/* This file is part of the Grantlee template system. Copyright (c) 2010 Stephen Kelly <steveire@gmail.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License version 3 only, as published by the Free Software Foundation. This l...
/* This file is part of the Grantlee template system. Copyright (c) 2010 Stephen Kelly <steveire@gmail.com> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of t...
Fix missing C++ mode comment
//===-- AMDGPUCodeEmitter.h - AMDGPU Code Emitter interface -----------------===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-----------------------------------------------------...
//===-- AMDGPUCodeEmitter.h - AMDGPU Code Emitter interface -----*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Implement buffer attachment in Stream_New() and Stream_Free() compatibility functions.
/* * 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 ...
/* * 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 ...
Add minimized bench ipmi_devintf fixpoint error test
// PARAM: --enable kernel #include <linux/module.h> #include <linux/mutex.h> #include <linux/init.h> #include <linux/device.h> #include <linux/compat.h> struct ipmi_file_private { struct file *file; }; static DEFINE_MUTEX(ipmi_mutex); static int ipmi_open(struct inode *inode, struct file *file) { struct ipmi...
Reset motor encoders in pre_auton
/* ====================================================================================================== ___________________________________________________________________________________________________ | __ __ ________ __ __ __ ______ __ __ _________ ________ | | \ ...
/* ====================================================================================================== ___________________________________________________________________________________________________ | __ __ ________ __ __ __ ______ __ __ _________ ________ | | \ ...
Update is an abstract base function.
#ifndef ENGINE_RENDER_RENDERSYSTEM_H #define ENGINE_RENDER_RENDERSYSTEM_H #include "engine/scene/SceneSystem.h" #include "engine/UI/UISystem.h" #include "engine/math/vec3.h" namespace engine { namespace render { /** * RenderSystem is a parent class for the actual rendering systems. * * RenderSystem gets poin...
#ifndef ENGINE_RENDER_RENDERSYSTEM_H #define ENGINE_RENDER_RENDERSYSTEM_H #include "engine/scene/SceneSystem.h" #include "engine/UI/UISystem.h" #include "engine/math/vec3.h" namespace engine { namespace render { /** * RenderSystem is a parent class for the actual rendering systems. * * RenderSystem gets poin...
Reset FREEZE to 1 to avoid confusion
/*==================================================================* | dfltsys.h | Copyright (c) 1995, Applied Logic Systems, Inc. | | -- Default system settings for property tags | | Author: Ken Bowen | Date: 04/10/95 *==================================================================*/ #define BCINTER 1 ...
/*==================================================================* | dfltsys.h | Copyright (c) 1995, Applied Logic Systems, Inc. | | -- Default system settings for property tags | | Author: Ken Bowen | Date: 04/10/95 *==================================================================*/ #define BCINTER 1 ...
Extend test-case as requested by Eli
// RUN: %clang_cc1 -std=c11 %s -verify typedef int type; typedef type type; typedef int type; void f(int N) { typedef int type2; typedef type type2; typedef int type2; typedef int vla[N]; // expected-note{{previous definition is here}} typedef int vla[N]; // expected-error{{redefinition of typedef for vari...
// RUN: %clang_cc1 -std=c11 %s -verify typedef int type; typedef type type; typedef int type; void f(int N) { typedef int type2; typedef type type2; typedef int type2; typedef int vla[N]; // expected-note{{previous definition is here}} typedef int vla[N]; // expected-error{{redefinition of typedef for vari...
Update tests/unboxed-primitive-args: bigarray.h is now in caml/
/**************************************************************************/ /* */ /* OCaml */ /* */ /* ...
/**************************************************************************/ /* */ /* OCaml */ /* */ /* ...
Add in some logs for the MCP9700A
#include "legato.h" #include "interfaces.h" #include "mcp970x.h" static int WpAdcFunction(int32_t *valueUv) { return le_adc_ReadValue("EXT_ADC0", valueUv); } le_result_t mangOH_ambientTemperature_Read(double *temperature) { int32_t tempInt; int res = mcp970x_read_temperature(MCP970X_CHIP_9700A, WpAdcFunct...
#include "legato.h" #include "interfaces.h" #include "mcp970x.h" static int WpAdcFunction(int32_t *valueUv) { int32_t valueMv; le_result_t res = le_adc_ReadValue("EXT_ADC0", &valueMv); if (res == LE_OK) { *valueUv = valueMv * 1000; } LE_DEBUG("Read %d uV from the ADC during ambient tem...
Add file that was missing from the last change
/* * Copyright (C) 2009 Apple 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 conditions a...
Add missing declaration for start_playlist_scan()
#ifndef _JAPLAY_H_ #define _JAPLAY_H_ #include <stdbool.h> /* bool */ struct song; struct playlist_entry; struct playlist; struct playlist_entry *get_cursor(void); extern struct playlist *japlay_queue, *japlay_history; int get_song_info(struct song *song); struct playlist_entry *add_file_playlist(struct playlist ...
#ifndef _JAPLAY_H_ #define _JAPLAY_H_ #include <stdbool.h> /* bool */ struct song; struct playlist_entry; struct playlist; struct playlist_entry *get_cursor(void); extern struct playlist *japlay_queue, *japlay_history; int get_song_info(struct song *song); struct playlist_entry *add_file_playlist(struct playlist ...
Change to new name atStr.h.
#ifndef AT_OS_DEFS_H #define AT_OS_DEFS_H // Include the window files if this is the windows version. #ifdef _MSC_VER #include <windows.h> #endif // Include other files to give OS-independent interfaces #include "atSleep.h" #include "atStrCaseCmp.h" #include "atSymbols.h" #include "atTime.h" #endif
#ifndef AT_OS_DEFS_H #define AT_OS_DEFS_H // Include the window files if this is the windows version. #ifdef _MSC_VER #include <windows.h> #endif // Include other files to give OS-independent interfaces #include "atSleep.h" #include "atStr.h" #include "atSymbols.h" #include "atTime.h" #endif
Update expect_never -> never_expect in doc
#include <cgreen/cgreen.h> #include <cgreen/mocks.h> static int reader(void *stream) { return (int)mock(stream); } static void writer(void *stream, char *paragraph) { mock(stream, paragraph); } char *read_paragraph(int (*read)(void *), void *stream); void by_paragraph(int (*read)(void *), void *in, void (*w...
#include <cgreen/cgreen.h> #include <cgreen/mocks.h> static int reader(void *stream) { return (int)mock(stream); } static void writer(void *stream, char *paragraph) { mock(stream, paragraph); } char *read_paragraph(int (*read)(void *), void *stream); void by_paragraph(int (*read)(void *), void *in, void (*w...
Mark ContiguousMemoryRange::size as const. am: f2c28cd765 am: 1b5ab79b0b am: 69614c4761 am: e447d8a1c2 am: b0149a850e
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
/* * Copyright (C) 2017 The Android Open Source Project * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by app...
Add header for importing entire library
/** @file @brief Import the entire library Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. */ #include "core/basis.h" #include "core/evaluate.h" #include "core/check.h" #include "core/modify.h" #include "geometry/curve.h" #include "geometry/surface.h" #include "io/ob...
Add text to 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...
Change the variable name for more meaningful.
#include "sys/select.h" #include "bits/mac_esp8266.h" #include <stdio.h> #include "usart.h" int select(SOCKET nfds, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, struct timeval *__timeout) { SOCKET i; int c; c = 0; /* Go through interested sockets. */ for(i = SOCKET_BASE; i < nfds; i++) { if(...
#include "sys/select.h" #include "bits/mac_esp8266.h" #include <stdio.h> #include "usart.h" int select(SOCKET nfds, fd_set *__readfds, fd_set *__writefds, fd_set *__exceptfds, struct timeval *__timeout) { SOCKET i; /* Count the ready socket. */ int count; count = 0; /* Go through interested sockets. */ for(...
Add missing file from previous commit.
/* * libopensync - A synchronization framework * Copyright (C) 2008 Daniel Gollub <dgollub@suse.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 ...
Fix typo in data structure
/**@file Setup Variable data structure for Unix platform. Copyright (c) 2009, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of th...
/**@file Setup Variable data structure for Unix platform. Copyright (c) 2009, Intel Corporation All rights reserved. This program and the accompanying materials are licensed and made available under the terms and conditions of th...
Return the sorted object as well as sort it in-place
#include <iostream> #include <vector> #include <stdlib.h> template <typename T> void swap(T& a, T& b) { T tmp = b; b = a; a = tmp; } template <typename T> void bubblesort(T& vec) { auto f = vec.begin(); auto s = vec.begin(); ++s; bool swapped = false; while (s != vec.end()) { if (...
#include <iostream> #include <vector> #include <stdlib.h> template <typename T> void swap(T& a, T& b) { T tmp = b; b = a; a = tmp; } template <typename T> T bubblesort(T& vec) { auto f = vec.begin(); auto s = vec.begin(); ++s; bool swapped = false; while (s != vec.end()) { if (*f ...
Add graphics module and drawable interface
#pragma once #include <SFML/Graphics.hpp> class DrawableInterface { public: virtual ~DrawableInterface() {} virtual void draw(sf::RenderWindow *window) = 0; };
Allow methods called inside MakeAlObjsArray to modify data members
#ifndef ALI_MISALIGNER_H #define ALI_MISALIGNER_H #include "TObject.h" #include "TString.h" #include "AliCDBMetaData.h" class TClonesArray; class AliCDBManager; // Base class for creating a TClonesArray of simulated misalignment objects // for a given subdetector of type ideal,residual or full // class AliMisAligne...
#ifndef ALI_MISALIGNER_H #define ALI_MISALIGNER_H #include "TObject.h" #include "TString.h" #include "AliCDBMetaData.h" class TClonesArray; class AliCDBManager; // Base class for creating a TClonesArray of simulated misalignment objects // for a given subdetector of type ideal,residual or full // class AliMisAligne...
Use tlog for MSG reports.
#ifndef __DEBUG_H #define __DEBUG_H #ifdef DEBUG extern bool debug; extern bool debug_z; #define DBG if (debug) #define MSG(x) DBG msg x #else #define DBG if (0) #define MSG(x) #endif #if defined(DEBUG) || defined(PRECON) #define PRECONDITION(x) if (x); else precondition( #x , __FILE__, __LINE__) #else #define PRECO...
#ifndef __DEBUG_H #define __DEBUG_H #ifdef DEBUG extern bool debug; extern bool debug_z; #define DBG if (debug) #define MSG(x) DBG tlog x #else #define DBG if (0) #define MSG(x) #endif #if defined(DEBUG) || defined(PRECON) #define PRECONDITION(x) if (x); else precondition( #x , __FILE__, __LINE__) #else #define PREC...
Fix an "conversion, loss of data" compiler warning
#ifndef INCLUDE_revwalk_h__ #define INCLUDE_revwalk_h__ #include "git/common.h" #include "git/revwalk.h" struct git_revpool { git_odb *db; git_commit_list iterator; git_commit *(*next_commit)(git_commit_list *); git_commit_list roots; git_revpool_table *commits; unsigned walking:1; unsigned char sorting; };...
#ifndef INCLUDE_revwalk_h__ #define INCLUDE_revwalk_h__ #include "git/common.h" #include "git/revwalk.h" struct git_revpool { git_odb *db; git_commit_list iterator; git_commit *(*next_commit)(git_commit_list *); git_commit_list roots; git_revpool_table *commits; unsigned walking:1; unsigned int sorting; }; ...
Fix skip grammar of query parser.
#ifndef VAST_QUERY_PARSER_SKIPPER_H #define VAST_QUERY_PARSER_SKIPPER_H #include <boost/spirit/include/qi.hpp> namespace vast { namespace query { namespace parser { namespace qi = boost::spirit::qi; namespace ascii = boost::spirit::ascii; template <typename Iterator> struct skipper : qi::grammar<Iterator> { ski...
#ifndef VAST_QUERY_PARSER_SKIPPER_H #define VAST_QUERY_PARSER_SKIPPER_H #include <boost/spirit/include/qi.hpp> namespace vast { namespace query { namespace parser { namespace qi = boost::spirit::qi; namespace ascii = boost::spirit::ascii; template <typename Iterator> struct skipper : qi::grammar<Iterator> { ski...
Add coil variables to type definitions
#define _SLAVETYPES #include <inttypes.h> //Declarations for slave types typedef struct { uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready uint8_t *Frame; //Response frame content } MODBUSResponseStatus; //Type containing information about frame that is set up at slave side typedef struct...
#define _SLAVETYPES #include <inttypes.h> //Declarations for slave types typedef struct { uint8_t Length; //Length of frame, if it's equal to 0, frame is not ready uint8_t *Frame; //Response frame content } MODBUSResponseStatus; //Type containing information about frame that is set up at slave side typedef struct...
Fix up the header names as several are not correct
#ifndef MIT_Mobile_MITAdditions_h #define MIT_Mobile_MITAdditions_h #import "Foundations+MITAdditions.h" #import "UIKit+MITAdditions.h" #import "CoreLocation+MITAdditions.h" #import "UIImage+Resize.h" #import "NSDateFormatter+RelativeString.h" #import "MFMailComposeController+RFC2368.h" #import "NSData+MGTwitterBase64...
#ifndef MIT_Mobile_MITAdditions_h #define MIT_Mobile_MITAdditions_h #import "Foundation+MITAdditions.h" #import "UIKit+MITAdditions.h" #import "CoreLocation+MITAdditions.h" #import "UIImage+Resize.h" #import "NSDateFormatter+RelativeString.h" #import "MFMailComposeViewController+RFC2368.h" #import "NSData+MGTwitterBas...
Add Task 01 for Homework 01
#include <stdio.h> #include <string.h> long hash(char*); int main() { char word[200]; fgets(word, 201, stdin); printf("%ld", hash(word)); return 0; } long hash(char *word) { long result = 42; int length = strlen(word); for (int i = 0; i < length; i++) { re...
Add some interpretations to ausearch for syscall parameters
/* socktypetab.h -- * Copyright 2012 Red Hat Inc., Durham, North Carolina. * All Rights Reserved. * * 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 Lic...
Fix trier -> def_exc in observer test comment
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...
Add test for function declarations
int f(int a), g(int a), a; int main() { return f(1) - g(1); } int f(int a) { return a; } int g(int a) { return a; }
Add vector to keep track of controls
#pragma once #include <Windows.h> #include <vector> class UIContext; /// <summary> /// Abstract class that encapsulates functionality for dealing with /// property sheet pages (tabs). /// </summary> class Tab { public: Tab(); ~Tab(); /// <summary>Processes messages sent to the tab page.</summary> vir...
#pragma once #include <Windows.h> #include <vector> #include "Control.h" class UIContext; /// <summary> /// Abstract class that encapsulates functionality for dealing with /// property sheet pages (tabs). /// </summary> class Tab { public: Tab(); ~Tab(); /// <summary>Processes messages sent to the tab p...
Add timeout handling with Glib support
/* * * BlueZ - Bluetooth protocol stack for Linux * * Copyright (C) 2014 Intel Corporation. All rights reserved. * * * 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 ...
Update SPI flash config for cache change.
#include "storage.h" // External SPI flash uses standard SPI interface const mp_soft_spi_obj_t soft_spi_bus = { .delay_half = MICROPY_HW_SOFTSPI_MIN_DELAY, .polarity = 0, .phase = 0, .sck = MICROPY_HW_SPIFLASH_SCK, .mosi = MICROPY_HW_SPIFLASH_MOSI, .miso = MICROPY_HW_SPIFLASH_MISO, }; const m...
#include "storage.h" // External SPI flash uses standard SPI interface STATIC const mp_soft_spi_obj_t soft_spi_bus = { .delay_half = MICROPY_HW_SOFTSPI_MIN_DELAY, .polarity = 0, .phase = 0, .sck = MICROPY_HW_SPIFLASH_SCK, .mosi = MICROPY_HW_SPIFLASH_MOSI, .miso = MICROPY_HW_SPIFLASH_MISO, }; ...
Disable mmap allocator when running under address sanitizer
/* Copyright (c) 2013-2014 Jeffrey Pfau * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <mgba-util/memory.h> #include <sys/mman.h> void* anonymousMem...
/* Copyright (c) 2013-2014 Jeffrey Pfau * * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include <mgba-util/memory.h> #ifndef DISABLE_ANON_MMAP #ifdef __SANITI...
Fix compile error: comma at end of enumerator list.
//===--- TypeTraits.h - C++ Type Traits Support Enumerations ----*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
//===--- TypeTraits.h - C++ Type Traits Support Enumerations ----*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open Source // License. See LICENSE.TXT for details. // //===-------------------------------------------------------...
Make a test compatible with r300508
// RUN: %clang_cc1 -fsanitize=null -emit-llvm %s -o - | FileCheck %s struct A { int a[2]; int b; }; // CHECK-LABEL: @f1 int *f1() { // CHECK-NOT: __ubsan_handle_type_mismatch // CHECK: ret // CHECK-SAME: getelementptr inbounds (%struct.A, %struct.A* null, i32 0, i32 1) return &((struct A *)0)->b; } // CHECK-LA...
// RUN: %clang_cc1 -fsanitize=null -emit-llvm %s -o - | FileCheck %s struct A { int a[2]; int b; }; // CHECK-LABEL: @f1 int *f1() { // CHECK-NOT: __ubsan_handle_type_mismatch // CHECK: ret // CHECK-SAME: getelementptr inbounds (%struct.A, %struct.A* null, i32 0, i32 1) return &((struct A *)0)->b; }
Rename actor/target to x/y to allow for shifting
#include <stdio.h> typedef struct { int hands[2][2]; int turn; } Sticks; void sticks_create(Sticks *sticks) { sticks->hands[0][0] = 1; sticks->hands[0][1] = 1; sticks->hands[1][0] = 1; sticks->hands[1][1] = 1; sticks->turn = 0; } void sticks_play(Sticks *sticks, int actor, int target) { ...
#include <stdio.h> typedef struct { int hands[2][2]; int turn; } Sticks; void sticks_create(Sticks *sticks) { sticks->hands[0][0] = 1; sticks->hands[0][1] = 1; sticks->hands[1][0] = 1; sticks->hands[1][1] = 1; sticks->turn = 0; } void sticks_play(Sticks *sticks, int x, int y) { sticks...
Add a private header file for libc/libc_r/libpthread to contain definitions for things like locking etc.
/* * Copyright (c) 1998 John Birrell <jb@cimlogic.com.au>. * 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...
Include config.h so it can define const away for K&R.
#include <stdio.h> #ifndef DATE #ifdef __DATE__ #define DATE __DATE__ #else #define DATE "xx/xx/xx" #endif #endif #ifndef TIME #ifdef __TIME__ #define TIME __TIME__ #else #define TIME "xx:xx:xx" #endif #endif #ifndef BUILD #define BUILD 0 #endif const char * Py_GetBuildInfo() { static char buildinfo[40]; sprintf...
#include "config.h" #include <stdio.h> #ifndef DATE #ifdef __DATE__ #define DATE __DATE__ #else #define DATE "xx/xx/xx" #endif #endif #ifndef TIME #ifdef __TIME__ #define TIME __TIME__ #else #define TIME "xx:xx:xx" #endif #endif #ifndef BUILD #define BUILD 0 #endif const char * Py_GetBuildInfo() { static char bu...
Add default constructors to vectors
#ifndef TE_TYPES_H #define TE_TYPES_H namespace te { struct Vector2f { float x; float y; Vector2f(float x, float y); Vector2f operator+(Vector2f o); Vector2f operator-(Vector2f o); }; struct Vector2i { int x; int y; Vector2i(int x, i...
#ifndef TE_TYPES_H #define TE_TYPES_H namespace te { struct Vector2f { float x; float y; Vector2f(float x = 0, float y = 0); Vector2f operator+(Vector2f o); Vector2f operator-(Vector2f o); }; struct Vector2i { int x; int y; Vector2i(...
Comment out this method, it does nothing right now
// // DCTOAuthAccount.h // DTOAuth // // Created by Daniel Tull on 09.07.2010. // Copyright 2010 Daniel Tull. All rights reserved. // #import <Foundation/Foundation.h> @interface DCTOAuthAccount : NSObject + (DCTOAuthAccount *)OAuthAccountWithType:(NSString *)type requestTokenURL:(NSURL *)requestTokenURL...
// // DCTOAuthAccount.h // DTOAuth // // Created by Daniel Tull on 09.07.2010. // Copyright 2010 Daniel Tull. All rights reserved. // #import <Foundation/Foundation.h> @interface DCTOAuthAccount : NSObject + (DCTOAuthAccount *)OAuthAccountWithType:(NSString *)type requestTokenURL:(NSURL *)requestTokenURL...
Fix typo MAKE_KLEO_LIB not MAKE_LIBKLEO_LIB and make it more coherent with other export files
/* This file is part of the KDE project Copyright (C) 2007 David Faure <faure@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or...
/* This file is part of the KDE project Copyright (C) 2007 David Faure <faure@kde.org> This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or...
Swap euid and uid in sudo helper
/* * A simple setuid binary that runs /usr/bin/phong.py */ #include <sys/types.h> #include <unistd.h> #ifndef PHONG_PATH #define PHONG_PATH "/usr/bin/phong.py" #endif int main(int argc, char** argv) { int i; char **newArgv; newArgv = calloc (sizeof (char*), argc+1); newArgv[0] = strdup (PHONG_PATH); newA...
/* * A simple setuid binary that runs /usr/bin/phong.py */ #include <sys/types.h> #include <unistd.h> #ifndef PHONG_PATH #define PHONG_PATH "/usr/bin/phong.py" #endif int main(int argc, char** argv) { int i; char **newArgv; newArgv = calloc (sizeof (char*), argc+1); newArgv[0] = strdup (PHONG_PATH); newA...
Define default SPI pins on kb2040
#define MICROPY_HW_BOARD_NAME "Adafruit KB2040" #define MICROPY_HW_MCU_NAME "rp2040" #define MICROPY_HW_NEOPIXEL (&pin_GPIO17) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO12) #define DEFAULT_I2C_BUS_SCL (&pin_GPIO13) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) #define DEFAULT_UART_BUS_RX (&pin_GPIO1)
#define MICROPY_HW_BOARD_NAME "Adafruit KB2040" #define MICROPY_HW_MCU_NAME "rp2040" #define MICROPY_HW_NEOPIXEL (&pin_GPIO17) #define DEFAULT_I2C_BUS_SDA (&pin_GPIO12) #define DEFAULT_I2C_BUS_SCL (&pin_GPIO13) #define DEFAULT_UART_BUS_TX (&pin_GPIO0) #define DEFAULT_UART_BUS_RX (&pin_GPIO1) #define DEFAULT_SPI_BUS...
Remove now useless runtime member from the results structure.
/* * StatZone 1.0.1 * Copyright (c) 2012-2020, Frederic Cambus * https://www.statdns.com * * Created: 2012-02-13 * Last Updated: 2019-01-03 * * StatZone is released under the BSD 2-Clause license * See LICENSE file for details. */ #ifndef CONFIG_H #define CONFIG_H #define VERSION "StatZone 1.0.1" #define L...
/* * StatZone 1.0.1 * Copyright (c) 2012-2020, Frederic Cambus * https://www.statdns.com * * Created: 2012-02-13 * Last Updated: 2019-01-03 * * StatZone is released under the BSD 2-Clause license * See LICENSE file for details. */ #ifndef CONFIG_H #define CONFIG_H #define VERSION "StatZone 1.0.1" #define L...
Define common MACROS in macros.h
#ifndef __MACROS_H #define __MACROS_H #define LINE_MAX_LEN 1024 #define SPC_ERR -1 #define SPC_OK 0 #endif
Use unordered_map rather than map
#ifndef BROKER_H_ #define BROKER_H_ #include <map> #include <string> #include <zmq.hpp> #include "client.h" #include "topic.h" #include "message.h" class Broker { public: Broker(std::string bind, std::string private_key) : bind_(bind), private_key_(private_key) {} void main_loop(); private: ...
#ifndef BROKER_H_ #define BROKER_H_ #include <unordered_map> #include <string> #include <zmq.hpp> #include "client.h" #include "topic.h" #include "message.h" class Broker { public: Broker(std::string bind, std::string private_key) : bind_(bind), private_key_(private_key) {} void main_loop(); pri...
Update driver version to 5.02.00-k17
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k16"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k17"
Update driver version to 5.02.00-k7
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k6"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2010 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.02.00-k7"
Fix implementation of '<' operator
#pragma once #include <map> #include <string> #include "ClassFile.h" using namespace std; struct SourceId { bool isMethod; // otherwise, field string className; string name; bool operator < (SourceId const& other) const { if(isMethod < other.isMethod) return true; if(className < other.class...
#pragma once #include <map> #include <string> #include "ClassFile.h" using namespace std; struct SourceId { bool isMethod; // otherwise, field string className; string name; bool operator < (SourceId const& other) const { if(isMethod < other.isMethod) return true; if(isMethod > other.isMeth...
Make pipeline work for CGImage processing (missed out the header file)
#import <Foundation/Foundation.h> #import "GPUImageFilter.h" @interface GPUImageFilterPipeline : NSObject @property (strong) NSMutableArray *filters; @property (strong) GPUImageOutput *input; @property (strong) id <GPUImageInput> output; - (id) initWithOrderedFilters:(NSArray*) filters input:(GPUImageOutput*)input ...
#import <Foundation/Foundation.h> #import "GPUImageFilter.h" @interface GPUImageFilterPipeline : NSObject @property (strong) NSMutableArray *filters; @property (strong) GPUImageOutput *input; @property (strong) id <GPUImageInput> output; - (id) initWithOrderedFilters:(NSArray*) filters input:(GPUImageOutput*)input ...
Fix store field for tapelev4 (rarely used).
#ifdef ALLOW_EXF CADJ STORE StoreForcing1 = tapelev4, key = ilev_4 CADJ STORE StoreForcing2 = tapelev4, key = ilev_4 CADJ STORE StoreCTRLS1 = tapelev4, key = ilev_4 # ifdef ALLOW_HFLUX_CONTROL CADJ STORE xx_hflux0 = tapelev4, key = ilev_4 CADJ STORE xx_hflux1 = tapelev4, key = ilev_4 # endif # ifde...
#ifdef ALLOW_EXF CADJ STORE StoreEXF1 = tapelev4, key = ilev_4 CADJ STORE StoreEXF2 = tapelev4, key = ilev_4 CADJ STORE StoreCTRLS1 = tapelev4, key = ilev_4 # ifdef ALLOW_HFLUX_CONTROL CADJ STORE xx_hflux0 = tapelev4, key = ilev_4 CADJ STORE xx_hflux1 = tapelev4, key = ilev_4 # endif # ifde...
Add some comments about expected purpose.
#ifndef __ENGINE_MESH_H__ #define __ENGINE_MESH_H__ #include "std/types.h" #include "gfx/vector3d.h" typedef struct Triangle { uint16_t p1, p2, p3; } TriangleT; typedef struct IndexArray { uint16_t count; uint16_t *index; } IndexArrayT; typedef struct IndexMap { IndexArrayT *vertex; uint16_t *indices; } I...
#ifndef __ENGINE_MESH_H__ #define __ENGINE_MESH_H__ #include "std/types.h" #include "gfx/vector3d.h" typedef struct Triangle { uint16_t p1, p2, p3; } TriangleT; typedef struct IndexArray { uint16_t count; uint16_t *index; } IndexArrayT; typedef struct IndexMap { IndexArrayT *vertex; uint16_t *indices; } I...
Fix the build on Win32 by making linkage of various symbols consistent again.
/* string_funcs.h * Copyright (C) 2001-2003, The Perl Foundation. * SVN Info * $Id$ * Overview: * This is the api header for the string subsystem * Data Structure and Algorithms: * History: * Notes: * References: */ #ifndef PARROT_STRING_PRIMITIVES_H_GUARD #define PARROT_STRING_PRIMITIVES_H_GU...
/* string_funcs.h * Copyright (C) 2001-2003, The Perl Foundation. * SVN Info * $Id$ * Overview: * This is the api header for the string subsystem * Data Structure and Algorithms: * History: * Notes: * References: */ #ifndef PARROT_STRING_PRIMITIVES_H_GUARD #define PARROT_STRING_PRIMITIVES_H_GU...
Add a test case for r81431.
// RUN: %llvmgcc -S %s -o - // rdar://7208839 extern inline int f1 (void) {return 1;} int f3 (void) {return f1();} int f1 (void) {return 0;}
Make the testcase more interesting
typedef struct { int op; } event_t; event_t test(int X) { event_t foo, bar; return X ? foo : bar; }
typedef struct { int op; } event_t; event_t test(int X) { event_t foo = { 1 }, bar = { 2 }; return X ? foo : bar; }