commit
stringlengths
40
40
old_file
stringlengths
4
237
new_file
stringlengths
4
237
old_contents
stringlengths
1
4.24k
new_contents
stringlengths
1
4.87k
subject
stringlengths
15
778
message
stringlengths
15
8.75k
lang
stringclasses
266 values
license
stringclasses
13 values
repos
stringlengths
5
127k
d3fabf05ee40f4a75d71aa7496819b75171d4c95
src/command1.c
src/command1.c
#include <stdio.h> #include <string.h> #include <stdbool.h> #include <unistd.h> #include "firebase.h" #include "serial.h" #include "gpio.h" #define _USE_SERIAL_ #ifdef _USE_SERIAL_ void (*send_command)(bool, int) = send_command_serial; void (*init_sender)() = init_sender_serial; #else void (*send_command)(bool, int) = send_command_gpio; void (*init_sender)() = init_sender_gpio; #endif void parse_event_string(char* event) { bool isOn = (strncmp(event, "on", 2) == 0); send_command(isOn, event[strlen(event)-1] - '0'); } int main(int argc, char *argv[]) { init_sender(); if(argc > 1) { printf("Commanding remote\n\n"); bool isOn = strcmp(argv[1], "on") == 0 ? true : false; send_command(isOn, argv[2][0] - '0'); } else { firebase_set_url("https://test.firebaseio.com/me.json"); firebase_set_callback("/event", parse_event_string); sleep(10); while (true) { firebase_subscribe(); sleep(30); } } return 0; }
#include <stdio.h> #include <string.h> #include <stdbool.h> #include <unistd.h> #include "firebase.h" #include "serial.h" #include "gpio.h" bool useSerial = true; void init_sender() { if (useSerial) { init_sender_serial(); } else { init_sender_gpio(); } } void send_command(bool isOn, int device) { if (useSerial) { send_command_serial(isOn, device); } else { send_command_gpio(isOn, device); } } void parse_event_string(char* event) { bool isOn = (strncmp(event, "on", 2) == 0); send_command(isOn, event[strlen(event)-1] - '0'); } int main(int argc, char *argv[]) { init_sender(); if(argc > 1) { printf("Commanding remote\n\n"); bool isOn = strcmp(argv[1], "on") == 0 ? true : false; send_command(isOn, argv[2][0] - '0'); } else { firebase_set_url("https://test.firebaseio.com/me.json"); firebase_set_callback("/event", parse_event_string); sleep(10); while (true) { firebase_subscribe(); sleep(30); } } return 0; }
Switch to runtime library choice instead of compile time.
Switch to runtime library choice instead of compile time.
C
mit
maciel310/command1-openwrt,maciel310/command1-openwrt
f536368be8729154db369cc785fd5477e42c950e
test/FrontendC/wchar-const.c
test/FrontendC/wchar-const.c
// RUN: %llvmgcc -S %s -o - | grep {constant \\\[18 x} | grep { 84, } // This should pass for any endianness combination of host and target. #include <ctype.h> extern void foo(const wchar_t* p); int main (int argc, const char * argv[]) { foo(L"This is some text"); return 0; }
// RUN: %llvmgcc -S %s -o - | grep {constant \\\[18 x} | grep { 84, } // This should pass for any endianness combination of host and target. #include <wchar.h> extern void foo(const wchar_t* p); int main (int argc, const char * argv[]) { foo(L"This is some text"); return 0; }
Use wchar.h to get wchar_t, not ctype.h.
Use wchar.h to get wchar_t, not ctype.h. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@78703 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm
6b57b159709dcb4d53e64738f2d1f73b36e41601
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * 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-k4"
/* * 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-k5"
Update driver version to 5.02.00-k5
[SCSI] qla4xxx: Update driver version to 5.02.00-k5 Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com> Signed-off-by: Ravi Anand <399b6871085291e2c1578e38a71f59e8d20fafc0@qlogic.com> Signed-off-by: James Bottomley <407b36959ca09543ccda8f8e06721c791bc53435@suse.de>
C
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
0eebf9b5d2da61f84cddd0ec2bb41be93f8fc82b
arch/powerpc/include/asm/swab.h
arch/powerpc/include/asm/swab.h
/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #ifndef _ASM_POWERPC_SWAB_H #define _ASM_POWERPC_SWAB_H #include <uapi/asm/swab.h> static __inline__ __u16 ld_le16(const volatile __u16 *addr) { __u16 val; __asm__ __volatile__ ("lhbrx %0,0,%1" : "=r" (val) : "r" (addr), "m" (*addr)); return val; } static __inline__ void st_le16(volatile __u16 *addr, const __u16 val) { __asm__ __volatile__ ("sthbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr)); } static __inline__ __u32 ld_le32(const volatile __u32 *addr) { __u32 val; __asm__ __volatile__ ("lwbrx %0,0,%1" : "=r" (val) : "r" (addr), "m" (*addr)); return val; } static __inline__ void st_le32(volatile __u32 *addr, const __u32 val) { __asm__ __volatile__ ("stwbrx %1,0,%2" : "=m" (*addr) : "r" (val), "r" (addr)); } #endif /* _ASM_POWERPC_SWAB_H */
/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #ifndef _ASM_POWERPC_SWAB_H #define _ASM_POWERPC_SWAB_H #include <uapi/asm/swab.h> #endif /* _ASM_POWERPC_SWAB_H */
Remove unused st_le*() and ld_le* functions
powerpc: Remove unused st_le*() and ld_le* functions The powerpc specific st_le*() and ld_le*() functions in arch/powerpc/asm/swab.h no longer have any users. They are also misleadingly named, since they always byteswap, even on a little-endian host. This patch removes them. Signed-off-by: David Gibson <aa743a0aaec8f7d7a1f01442503957f4d7a2d634@gibson.dropbear.id.au> Signed-off-by: Benjamin Herrenschmidt <a7089bb6e7e92505d88aaff006cbdd60cc9120b6@kernel.crashing.org>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
20fd5a0c28f49618218d3c8d43c742fbab68edf0
src/host/os_rmdir.c
src/host/os_rmdir.c
/** * \file os_rmdir.c * \brief Remove a subdirectory. * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project */ #include <stdlib.h> #include "premake.h" int os_rmdir(lua_State* L) { int z; const char* path = luaL_checkstring(L, 1); #if PLATFORM_WINDOWS z = RemoveDirectory(path); #else z = rmdir(path); #endif if (!z) { lua_pushnil(L); lua_pushfstring(L, "unable to remove directory '%s'", path); return 2; } else { lua_pushboolean(L, 1); return 1; } }
/** * \file os_rmdir.c * \brief Remove a subdirectory. * \author Copyright (c) 2002-2013 Jason Perkins and the Premake project */ #include <stdlib.h> #include "premake.h" int os_rmdir(lua_State* L) { int z; const char* path = luaL_checkstring(L, 1); #if PLATFORM_WINDOWS z = RemoveDirectory(path); #else z = (0 == rmdir(path)); #endif if (!z) { lua_pushnil(L); lua_pushfstring(L, "unable to remove directory '%s'", path); return 2; } else { lua_pushboolean(L, 1); return 1; } }
Fix error result handling in os.rmdir()
Fix error result handling in os.rmdir()
C
bsd-3-clause
premake/premake-4.x,soundsrc/premake-stable,ryanjmulder/premake-4.x,lizh06/premake-4.x,ryanjmulder/premake-4.x,soundsrc/premake-stable,premake/premake-4.x,lizh06/premake-4.x,premake/premake-4.x,soundsrc/premake-stable,ryanjmulder/premake-4.x,premake/premake-4.x,soundsrc/premake-stable,lizh06/premake-4.x,lizh06/premake-4.x,ryanjmulder/premake-4.x
98997692a6a8bf1ae6bbe15dd18ec4e27e0e6fcf
risky/risky.h
risky/risky.h
#ifndef SAXBOPHONE_RISKY_RISKY_H #define SAXBOPHONE_RISKY_RISKY_H #include <stdint.h> #ifdef __cplusplus extern "C"{ #endif typedef struct version_t { uint8_t major; uint8_t minor; uint8_t patch; } version_t; extern const version_t VERSION; #ifdef __cplusplus } // extern "C" #endif // end of header file #endif
#ifndef SAXBOPHONE_RISKY_RISKY_H #define SAXBOPHONE_RISKY_RISKY_H #include <stdint.h> #ifdef __cplusplus extern "C"{ #endif // struct for representing version of RISKY typedef struct version_t { uint8_t major; uint8_t minor; uint8_t patch; } version_t; // enum for storing information about the error status of a function typedef enum status_t { UNKNOWN = 0, MALLOC_REFUSED, IMPOSSIBLE_CONDITION, SUCCESS, } status_t; extern const version_t VERSION; #ifdef __cplusplus } // extern "C" #endif // end of header file #endif
Add a function return status enum
Add a function return status enum
C
mpl-2.0
saxbophone/risky
ed9f4938ae6215f20ff31d4b44545a8c0efe859f
KSPTableSection.h
KSPTableSection.h
// // KPTableSection.h // KSPFetchedResultsController // // Created by Konstantin Pavlikhin on 05.09.14. // Copyright (c) 2015 Konstantin Pavlikhin. All rights reserved. // #import <Foundation/Foundation.h> // * * *. @class NSManagedObject; // * * *. @interface KSPTableSection : NSObject - (nullable instancetype) initWithSectionName: (nonnull NSObject*) sectionName nestedObjects: (nullable NSArray<NSManagedObject*>*) nestedObjects; @property(readwrite, copy, nonatomic, nonnull) NSObject* sectionName; // Collection KVO-compatible property. @property(readonly, nullable) NSArray<__kindof NSManagedObject*>* nestedObjects; - (void) insertObject: (nonnull NSManagedObject*) object inNestedObjectsAtIndex: (NSUInteger) index; @end
// // KPTableSection.h // KSPFetchedResultsController // // Created by Konstantin Pavlikhin on 05.09.14. // Copyright (c) 2015 Konstantin Pavlikhin. All rights reserved. // #import <Foundation/Foundation.h> // * * *. @class NSManagedObject; // * * *. @interface KSPTableSection : NSObject - (nullable instancetype) initWithSectionName: (nonnull NSObject*) sectionName nestedObjects: (nullable NSArray<NSManagedObject*>*) nestedObjects; @property(readwrite, copy, nonatomic, nonnull) NSObject* sectionName; // Collection KVO-compatible property. @property(readonly, nonatomic, nullable) NSArray<__kindof NSManagedObject*>* nestedObjects; - (void) insertObject: (nonnull NSManagedObject*) object inNestedObjectsAtIndex: (NSUInteger) index; @end
Add a missing 'nonatomic' keyword in a property declaration.
Add a missing 'nonatomic' keyword in a property declaration.
C
mit
konstantinpavlikhin/KSPFetchedResultsController
bd0737eb713fae5ca536488b0b6c327f71cf6cf0
You-DataStore/datastore.h
You-DataStore/datastore.h
#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 void post(TaskId, SerializedTask&); void put(TaskId, SerializedTask&); void erase(TaskId); std::vector<SerializedTask> getAllTask(); void notify(); private: bool isServing = false; std::unique_ptr<Transaction> activeTransaction; }; } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_DATASTORE_H_
#pragma once #ifndef YOU_DATASTORE_DATASTORE_H_ #define YOU_DATASTORE_DATASTORE_H_ #include <stack> #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 void post(TaskId, SerializedTask&); void put(TaskId, SerializedTask&); void erase(TaskId); std::vector<SerializedTask> getAllTask(); void notify(); private: bool isServing = false; std::shared_ptr<Transaction> activeTransaction; std::stack<std::shared_ptr<Transaction> > transactionStack; }; } // namespace DataStore } // namespace You #endif // YOU_DATASTORE_DATASTORE_H_
Add member variable: transaction stack
Add member variable: transaction stack
C
mit
cs2103aug2014-w10-1c/main,cs2103aug2014-w10-1c/main
54fb750d8389febff3fa254c4dd5d815b7a60f69
Nimble/Nimble.h
Nimble/Nimble.h
#import <Foundation/Foundation.h> FOUNDATION_EXPORT double NimbleVersionNumber; FOUNDATION_EXPORT const unsigned char NimbleVersionString[];
#import <Foundation/Foundation.h> FOUNDATION_EXPORT double NimbleVersionNumber; FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; #import "DSL.h" #import "NMBExceptionCapture.h"
Add Objective-C headers to umbrella header to make project compile
Add Objective-C headers to umbrella header to make project compile
C
apache-2.0
DanielAsher/Nimble,AnthonyMDev/Nimble,abbeycode/Nimble,AnthonyMDev/Nimble,twobitlabs/Nimble,twobitlabs/Nimble,abbeycode/Nimble,feinstruktur/Nimble,phatblat/Nimble,AnthonyMDev/Nimble,Quick/Nimble,ashfurrow/Nimble,DanielAsher/Nimble,feinstruktur/Nimble,DanielAsher/Nimble,ashfurrow/Nimble,jeffh/Nimble,abbeycode/Nimble,mishimay/Nimble,dgdosen/Nimble,phatblat/Nimble,feinstruktur/Nimble,phatblat/Nimble,dgdosen/Nimble,Quick/Nimble,abbeycode/Nimble,jeffh/Nimble,mishimay/Nimble,dgdosen/Nimble,mishimay/Nimble,twobitlabs/Nimble,ashfurrow/Nimble,jeffh/Nimble,dgdosen/Nimble,Quick/Nimble,jeffh/Nimble
19b1e3ebe513855cae870da9a2133f99e1bb14b8
src/includepriv/xmmspriv/xmms_collsync.h
src/includepriv/xmmspriv/xmms_collsync.h
/* XMMS2 - X Music Multiplexer System * Copyright (C) 2003-2009 XMMS2 Team * * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!! * * 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. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ #ifndef __XMMS_COLLSYNC_H__ #define __XMMS_COLLSYNC_H__ #include "xmmspriv/xmms_collection.h" void xmms_coll_sync_init (xmms_coll_dag_t *dag); void xmms_coll_sync_shutdown (); void xmms_coll_sync_schedule_sync (); #endif
/* XMMS2 - X Music Multiplexer System * Copyright (C) 2003-2009 XMMS2 Team * * PLUGINS ARE NOT CONSIDERED TO BE DERIVED WORK !!! * * 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. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. */ #ifndef __XMMS_COLLSYNC_H__ #define __XMMS_COLLSYNC_H__ #include "xmmspriv/xmms_collection.h" void xmms_coll_sync_init (xmms_coll_dag_t *dag); void xmms_coll_sync_shutdown (void); void xmms_coll_sync_schedule_sync (void); #endif
Make function declarations proper prototypes in collsync.h
OTHER: Make function declarations proper prototypes in collsync.h
C
lgpl-2.1
theefer/xmms2,six600110/xmms2,six600110/xmms2,mantaraya36/xmms2-mantaraya36,mantaraya36/xmms2-mantaraya36,chrippa/xmms2,dreamerc/xmms2,six600110/xmms2,dreamerc/xmms2,theefer/xmms2,chrippa/xmms2,krad-radio/xmms2-krad,xmms2/xmms2-stable,krad-radio/xmms2-krad,dreamerc/xmms2,six600110/xmms2,xmms2/xmms2-stable,dreamerc/xmms2,oneman/xmms2-oneman,oneman/xmms2-oneman,krad-radio/xmms2-krad,theefer/xmms2,xmms2/xmms2-stable,theefer/xmms2,oneman/xmms2-oneman-old,theeternalsw0rd/xmms2,krad-radio/xmms2-krad,mantaraya36/xmms2-mantaraya36,xmms2/xmms2-stable,oneman/xmms2-oneman,oneman/xmms2-oneman,theeternalsw0rd/xmms2,dreamerc/xmms2,mantaraya36/xmms2-mantaraya36,krad-radio/xmms2-krad,theefer/xmms2,oneman/xmms2-oneman,theeternalsw0rd/xmms2,theefer/xmms2,chrippa/xmms2,chrippa/xmms2,xmms2/xmms2-stable,theeternalsw0rd/xmms2,oneman/xmms2-oneman-old,mantaraya36/xmms2-mantaraya36,oneman/xmms2-oneman,six600110/xmms2,theeternalsw0rd/xmms2,oneman/xmms2-oneman-old,six600110/xmms2,oneman/xmms2-oneman-old,chrippa/xmms2,oneman/xmms2-oneman-old,mantaraya36/xmms2-mantaraya36,mantaraya36/xmms2-mantaraya36,chrippa/xmms2,xmms2/xmms2-stable,krad-radio/xmms2-krad,theefer/xmms2,oneman/xmms2-oneman,theeternalsw0rd/xmms2
a615df7468af8315894a91bd5758699abbfcc97c
src/Mapper1.h
src/Mapper1.h
#ifndef MAPPER_1_H #define MAPPER_1_H #include <Mapper.h> enum PrgMode { PRG_32KB, FIX_FIRST_16KB, FIX_LAST_16KB, }; enum ChrMode { CHR_8KB, CHR_4KB, }; class Mapper1: public Mapper { public: uint8_t readPrg(uint16_t addr); void writePrg(uint16_t addr, uint8_t value); uint8_t readChr(uint16_t addr); void writeChr(uint16_t addr, uint8_t value); private: void loadRegister(uint16_t addr, uint8_t value); void updateBankAddresses(); int decodePrgRomAddress(uint16_t addr); int decodeChrRomAddress(uint16_t addr); int shiftRegister = 0x10; int prgRomBank = 0; bool prgRamDisable = false; int chrRomBank0 = 0; int chrRomBank1 = 0; PrgMode prgMode = PrgMode::PRG_32KB; ChrMode chrMode = ChrMode::CHR_8KB; int prg16kBankAddresses[2]; int chr4kBankAddresses[2]; }; #endif
#ifndef MAPPER_1_H #define MAPPER_1_H #include <Mapper.h> enum PrgMode { PRG_32KB, FIX_FIRST_16KB, FIX_LAST_16KB, }; enum ChrMode { CHR_8KB, CHR_4KB, }; class Mapper1: public Mapper { public: uint8_t readPrg(uint16_t addr); void writePrg(uint16_t addr, uint8_t value); uint8_t readChr(uint16_t addr); void writeChr(uint16_t addr, uint8_t value); private: void loadRegister(uint16_t addr, uint8_t value); void updateBankAddresses(); int decodePrgRomAddress(uint16_t addr); int decodeChrRomAddress(uint16_t addr); int shiftRegister = 0x10; int prgRomBank = 0; bool prgRamDisable = false; int chrRomBank0 = 0; int chrRomBank1 = 0; PrgMode prgMode = PrgMode::FIX_LAST_16KB; ChrMode chrMode = ChrMode::CHR_8KB; int prg16kBankAddresses[2]; int chr4kBankAddresses[2]; }; #endif
Update mapper 1 default mapping on boot
Update mapper 1 default mapping on boot
C
mit
scottjcrouch/ScootNES,scottjcrouch/ScootNES,scottjcrouch/ScootNES
63b675bb73dc94a45c6049795cebd34ae0c66185
ash/shell/example_factory.h
ash/shell/example_factory.h
// 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 ASH_SHELL_EXAMPLE_FACTORY_H_ #define ASH_SHELL_EXAMPLE_FACTORY_H_ #pragma once namespace app_list { class AppListModel; class AppListViewDelegate; } namespace views { class View; } namespace ash { namespace shell { void CreatePointyBubble(views::View* anchor_view); void CreateLockScreen(); // Creates a window showing samples of commonly used widgets. void CreateWidgetsWindow(); void BuildAppListModel(app_list::AppListModel* model); app_list::AppListViewDelegate* CreateAppListViewDelegate(); } // namespace shell } // namespace ash #endif // ASH_SHELL_EXAMPLE_FACTORY_H_
// 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 ASH_SHELL_EXAMPLE_FACTORY_H_ #define ASH_SHELL_EXAMPLE_FACTORY_H_ #pragma once namespace app_list { class AppListViewDelegate; } namespace views { class View; } namespace ash { namespace shell { void CreatePointyBubble(views::View* anchor_view); void CreateLockScreen(); // Creates a window showing samples of commonly used widgets. void CreateWidgetsWindow(); app_list::AppListViewDelegate* CreateAppListViewDelegate(); } // namespace shell } // namespace ash #endif // ASH_SHELL_EXAMPLE_FACTORY_H_
Remove unused declaration of BuildAppListModel() function.
ash: Remove unused declaration of BuildAppListModel() function. R=xiyuan@chromium.org TBR=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/10377097 git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@136437 0039d316-1c4b-4281-b951-d872f2087c98
C
bsd-3-clause
Jonekee/chromium.src,chuan9/chromium-crosswalk,ondra-novak/chromium.src,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,dednal/chromium.src,anirudhSK/chromium,Jonekee/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,robclark/chromium,nacl-webkit/chrome_deps,hujiajie/pa-chromium,mogoweb/chromium-crosswalk,littlstar/chromium.src,dushu1203/chromium.src,axinging/chromium-crosswalk,anirudhSK/chromium,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,Jonekee/chromium.src,dushu1203/chromium.src,timopulkkinen/BubbleFish,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,keishi/chromium,keishi/chromium,anirudhSK/chromium,Jonekee/chromium.src,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,jaruba/chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,anirudhSK/chromium,littlstar/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,patrickm/chromium.src,Chilledheart/chromium,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,robclark/chromium,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,fujunwei/chromium-crosswalk,keishi/chromium,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,ltilve/chromium,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,robclark/chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,dednal/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,keishi/chromium,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,markYoungH/chromium.src,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,robclark/chromium,ChromiumWebApps/chromium,axinging/chromium-crosswalk,Just-D/chromium-1,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,anirudhSK/chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,ltilve/chromium,zcbenz/cefode-chromium,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,keishi/chromium,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,ChromiumWebApps/chromium,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,dednal/chromium.src,Pluto-tv/chromium-crosswalk,robclark/chromium,M4sse/chromium.src,dednal/chromium.src,littlstar/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,Jonekee/chromium.src,markYoungH/chromium.src,keishi/chromium,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,Just-D/chromium-1,littlstar/chromium.src,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,dednal/chromium.src,anirudhSK/chromium,M4sse/chromium.src,keishi/chromium,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,Chilledheart/chromium,zcbenz/cefode-chromium,robclark/chromium,hujiajie/pa-chromium,M4sse/chromium.src,dushu1203/chromium.src,robclark/chromium,M4sse/chromium.src,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,dednal/chromium.src,axinging/chromium-crosswalk,keishi/chromium,littlstar/chromium.src,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,robclark/chromium,jaruba/chromium.src,M4sse/chromium.src,junmin-zhu/chromium-rivertrail,dednal/chromium.src,dushu1203/chromium.src,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,Fireblend/chromium-crosswalk,jaruba/chromium.src,timopulkkinen/BubbleFish,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,ltilve/chromium,littlstar/chromium.src,zcbenz/cefode-chromium,M4sse/chromium.src,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,anirudhSK/chromium,chuan9/chromium-crosswalk,ondra-novak/chromium.src,Chilledheart/chromium,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,Jonekee/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,krieger-od/nwjs_chromium.src,pozdnyakov/chromium-crosswalk,ondra-novak/chromium.src,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,M4sse/chromium.src,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,Just-D/chromium-1,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,robclark/chromium,PeterWangIntel/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,fujunwei/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,littlstar/chromium.src,ltilve/chromium,hujiajie/pa-chromium,ltilve/chromium,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,patrickm/chromium.src,keishi/chromium,dednal/chromium.src,Chilledheart/chromium,keishi/chromium,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,Just-D/chromium-1,ltilve/chromium,timopulkkinen/BubbleFish,Chilledheart/chromium,Fireblend/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,axinging/chromium-crosswalk,anirudhSK/chromium,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,dednal/chromium.src,patrickm/chromium.src,anirudhSK/chromium,keishi/chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,Chilledheart/chromium,bright-sparks/chromium-spacewalk,robclark/chromium,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk-efl,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,Chilledheart/chromium,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,junmin-zhu/chromium-rivertrail,dednal/chromium.src,Just-D/chromium-1,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,Jonekee/chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,zcbenz/cefode-chromium,axinging/chromium-crosswalk,hujiajie/pa-chromium,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,ltilve/chromium,jaruba/chromium.src,ondra-novak/chromium.src,patrickm/chromium.src,patrickm/chromium.src,patrickm/chromium.src,patrickm/chromium.src,dushu1203/chromium.src,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,junmin-zhu/chromium-rivertrail,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,ltilve/chromium,Fireblend/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,anirudhSK/chromium,mogoweb/chromium-crosswalk
053a858efa46c9ab86363b271374ec02ad2af753
arch/powerpc/lib/code-patching.c
arch/powerpc/lib/code-patching.c
/* * Copyright 2008 Michael Ellerman, IBM Corporation. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include <linux/kernel.h> #include <asm/code-patching.h> void patch_instruction(unsigned int *addr, unsigned int instr) { *addr = instr; asm ("dcbst 0, %0; sync; icbi 0,%0; sync; isync" : : "r" (addr)); } void patch_branch(unsigned int *addr, unsigned long target, int flags) { patch_instruction(addr, create_branch(addr, target, flags)); } unsigned int create_branch(const unsigned int *addr, unsigned long target, int flags) { unsigned int instruction; if (! (flags & BRANCH_ABSOLUTE)) target = target - (unsigned long)addr; /* Mask out the flags and target, so they don't step on each other. */ instruction = 0x48000000 | (flags & 0x3) | (target & 0x03FFFFFC); return instruction; }
/* * Copyright 2008 Michael Ellerman, IBM Corporation. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version * 2 of the License, or (at your option) any later version. */ #include <linux/kernel.h> #include <asm/code-patching.h> void patch_instruction(unsigned int *addr, unsigned int instr) { *addr = instr; asm ("dcbst 0, %0; sync; icbi 0,%0; sync; isync" : : "r" (addr)); } void patch_branch(unsigned int *addr, unsigned long target, int flags) { patch_instruction(addr, create_branch(addr, target, flags)); } unsigned int create_branch(const unsigned int *addr, unsigned long target, int flags) { unsigned int instruction; long offset; offset = target; if (! (flags & BRANCH_ABSOLUTE)) offset = offset - (unsigned long)addr; /* Check we can represent the target in the instruction format */ if (offset < -0x2000000 || offset > 0x1fffffc || offset & 0x3) return 0; /* Mask out the flags and target, so they don't step on each other. */ instruction = 0x48000000 | (flags & 0x3) | (offset & 0x03FFFFFC); return instruction; }
Make create_branch() return errors if the branch target is too large
powerpc: Make create_branch() return errors if the branch target is too large If you pass a target value to create_branch() which is more than 32MB - 4, or - 32MB away from the branch site, then it's impossible to create an immediate branch. The current code doesn't check, which will lead to us creating a branch to somewhere else - which is bad. For code that cares to check we return 0, which is easy to check for, and for code that doesn't at least we'll be creating an illegal instruction, rather than a branch to some random address. Signed-off-by: Michael Ellerman <17b9e1c64588c7fa6419b4d29dc1f4426279ba01@ellerman.id.au> Acked-by: Kumar Gala <383ef5577c6e1178b93f59ec8d0936f76d2a98c4@kernel.crashing.org> Signed-off-by: Paul Mackerras <19a0ba370c443ba08d20b5061586430ab449ee8c@samba.org>
C
mit
KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
0a203a4ce1787acb49db6df8f5c064e9243db130
arch/x86_64/kernel/bugs.c
arch/x86_64/kernel/bugs.c
/* * arch/x86_64/kernel/bugs.c * * Copyright (C) 1994 Linus Torvalds * Copyright (C) 2000 SuSE */ #include <linux/kernel.h> #include <linux/init.h> #include <asm/alternative.h> #include <asm/processor.h> void __init check_bugs(void) { identify_cpu(&boot_cpu_data); mtrr_bp_init(); #if !defined(CONFIG_SMP) printk("CPU: "); print_cpu_info(&boot_cpu_data); #endif alternative_instructions(); }
/* * arch/x86_64/kernel/bugs.c * * Copyright (C) 1994 Linus Torvalds * Copyright (C) 2000 SuSE */ #include <linux/kernel.h> #include <linux/init.h> #include <asm/alternative.h> #include <asm/processor.h> #include <asm/mtrr.h> void __init check_bugs(void) { identify_cpu(&boot_cpu_data); mtrr_bp_init(); #if !defined(CONFIG_SMP) printk("CPU: "); print_cpu_info(&boot_cpu_data); #endif alternative_instructions(); }
Add asm/mtrr.h include for some builds
x86_64: Add asm/mtrr.h include for some builds The earlier change to call the bp mtrr init from bugs.c broke on some configurations due to missing includes. Noticed by "Avuton Olrich" <avuton@gmail.com> Signed-off-by: Andi Kleen <0474aee45985f5ae829f53849df476200e876990@suse.de> Signed-off-by: Linus Torvalds <69652caca27c8b940640ad396ab71f93cacec34f@linux-foundation.org>
C
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
5f28897d2827a924b746c4d85e35cf85810b8951
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2012 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.03.00-k7"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2012 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.03.00-k8"
Update driver version to 5.03.00-k8
[SCSI] qla4xxx: Update driver version to 5.03.00-k8 Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com> Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>
C
apache-2.0
TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
5524470b2cc0a73bb3422b3bcb0749df8653f210
ann.c
ann.c
#include <stdio.h> #define INPUTS 3 #define HIDDEN 5 #define OUTPUTS 2 #define ROWS 5 typedef struct { double input[HIDDEN][INPUTS]; double hidden[ROWS - 3][HIDDEN][HIDDEN]; double output[OUTPUTS][HIDDEN]; } Links; typedef struct { int input[INPUTS]; int hidden[ROWS - 3][HIDDEN]; int output[OUTPUTS]; } Neurons; typedef struct { Links weights; Neurons values; } ANN; int main(void) { return 0; }
#include <stdio.h> #define INPUTS 3 #define HIDDEN 5 #define OUTPUTS 2 #define ROWS 5 typedef struct { double input[HIDDEN][INPUTS]; double hidden[ROWS - 3][HIDDEN][HIDDEN]; double output[OUTPUTS][HIDDEN]; } Links; typedef struct { int input[INPUTS]; int hidden[ROWS - 2][HIDDEN]; int output[OUTPUTS]; } Neurons; typedef struct { Links weights; Neurons values; } ANN; int main(void) { return 0; }
Fix number of hidden rows in Neurons struct
Fix number of hidden rows in Neurons struct
C
mit
tysonzero/c-ann
24e67da465596d90e2af1865631fc2736c385e14
mudlib/mud/home/Game/lib/action.c
mudlib/mud/home/Game/lib/action.c
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2013 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <kotaka/log.h> #include <kotaka/paths.h> #include <text/paths.h> #include <thing/paths.h> #include <type.h> inherit "emit";
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2013 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <kotaka/log.h> #include <kotaka/paths.h> #include <text/paths.h> #include <thing/paths.h> #include <type.h>
Make emit explicit inherit for now
Make emit explicit inherit for now
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
1ab47cc1ffa4acaf69f8f7e0ddb104874f74aaec
AutoPkgr/Utility/LGHTTPRequest.h
AutoPkgr/Utility/LGHTTPRequest.h
// // LGHTTPRequest.h // AutoPkgr // // Created by Eldon Ahrold on 8/9/14. // Copyright 2014-2015 The Linde Group, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #import <Foundation/Foundation.h> @class LGHTTPCredential; @interface LGHTTPRequest : NSObject - (void)retrieveDistributionPoints:(LGHTTPCredential *)credential reply:(void (^)(NSDictionary *distributionPoints, NSError *error))reply; - (void)retrieveDistributionPoints:(LGHTTPCredential *)credential redirect:(void (^)(NSString *redirect))redirect reply:(void (^)(NSDictionary *distributionPoints, NSError *error))reply; - (void)retrieveDistributionPoints2:(LGHTTPCredential *)credential reply:(void (^)(NSDictionary *distributionPoints, NSError *error))reply; @end
// // LGHTTPRequest.h // AutoPkgr // // Created by Eldon Ahrold on 8/9/14. // Copyright 2014-2015 The Linde Group, Inc. // // Licensed under the Apache License, Version 2.0 (the "License"); // you may not use this file except in compliance with the License. // You may obtain a copy of the License at // // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. // #import <Foundation/Foundation.h> @class LGHTTPCredential; @interface LGHTTPRequest : NSObject - (void)retrieveDistributionPoints:(LGHTTPCredential *)credential reply:(void (^)(NSDictionary *distributionPoints, NSError *error))reply; - (void)retrieveDistributionPoints2:(LGHTTPCredential *)credential reply:(void (^)(NSDictionary *distributionPoints, NSError *error))reply; @end
Remove unused method from header.
Remove unused method from header.
C
apache-2.0
ftiff/autopkgr,ftiff/autopkgr,lindegroup/autopkgr,lindegroup/autopkgr,ftiff/autopkgr,HyppHere/autopkgr,lindegroup/autopkgr,HyppHere/autopkgr,lindegroup/autopkgr,HyppHere/autopkgr,lindegroup/autopkgr
43d3a4627e2db021b0195c101f69d2f61836313a
libswfdec/swfdec_file_reference_list.c
libswfdec/swfdec_file_reference_list.c
/* Swfdec * Copyright (C) 2007 Pekka Lampila <pekka.lampila@iki.fi> * * 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. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "swfdec_as_internal.h" #include "swfdec_debug.h" SWFDEC_AS_NATIVE (2205, 0, swfdec_file_reference_list_browse) void swfdec_file_reference_list_browse (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { SWFDEC_STUB ("FileReference.browse"); }
/* Swfdec * Copyright (C) 2007 Pekka Lampila <pekka.lampila@iki.fi> * * 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. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, * Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include "config.h" #endif #include "swfdec_as_internal.h" #include "swfdec_debug.h" SWFDEC_AS_NATIVE (2205, 0, swfdec_file_reference_list_browse) void swfdec_file_reference_list_browse (SwfdecAsContext *cx, SwfdecAsObject *object, guint argc, SwfdecAsValue *argv, SwfdecAsValue *ret) { SWFDEC_STUB ("FileReferenceList.browse"); }
Fix stub message having a wrong name
Fix stub message having a wrong name
C
lgpl-2.1
freedesktop-unofficial-mirror/swfdec__swfdec,freedesktop-unofficial-mirror/swfdec__swfdec,freedesktop-unofficial-mirror/swfdec__swfdec,mltframework/swfdec,mltframework/swfdec
07d9b6ad059cc77b1e892cc6d992f9556a451362
interpreter/apply.h
interpreter/apply.h
/* * tré – Copyright (c) 2005–2007,2009,2012 Sven Michael Klose <pixel@copei.de> */ #ifndef TRE_APPLY_H #define TRE_APPLY_H extern treptr function_arguments (treptr); extern treptr trefuncall (treptr func, treptr args); extern treptr trebuiltin_call_compiled (void * fun, treptr args); extern bool trebuiltin_is_compiled_funcall (treptr); extern treptr trefuncall_compiled (treptr func, treptr args, bool do_eval); void treapply_init (); #endif /* #ifndef TRE_APPLY_H */
/* * tré – Copyright (c) 2005–2007,2009,2012 Sven Michael Klose <pixel@copei.de> */ #ifndef TRE_APPLY_H #define TRE_APPLY_H extern treptr function_arguments (treptr); extern treptr trefuncall (treptr func, treptr args); extern treptr trebuiltin_call_compiled (void * fun, treptr args); extern bool trebuiltin_is_compiled_funcall (treptr); extern bool trebuiltin_is_compiled_closure (treptr); extern treptr trefuncall_compiled (treptr func, treptr args, bool do_eval); void treapply_init (); #endif /* #ifndef TRE_APPLY_H */
Fix declarations for file-by-file compile.
Fix declarations for file-by-file compile.
C
mit
SvenMichaelKlose/tre,SvenMichaelKlose/tre,SvenMichaelKlose/tre
e63d952e927f0da8a29984f47a3c8d828f43d393
src/api-mock.h
src/api-mock.h
#ifndef APIMOCK_H #define APIMOCK_H #include "core/server.h" #include "core/exceptions.h" #include "http/requestdata.h" #endif
#ifndef APIMOCK_H #define APIMOCK_H #include "core/server.h" #include "core/exceptions.h" #include "http/requestdata.h" #include "http/requestdata.h" #include "http/statuscodes.h" #endif
Include request data and status codes
Include request data and status codes
C
mit
Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock,Lavesson/api-mock
c218da07d8d0178d66620c0778d846f439b85755
cvrp/customer.h
cvrp/customer.h
#ifndef VRPSOLVER_CUSTOMER_H #define VRPSOLVER_CUSTOMER_H #include <utility> namespace VrpSolver { class Customer { public: Customer(std::size_t id, std::size_t demand) : id_(id), demand_(demand), vertex_(std::make_pair(0, 0)) { } Customer(std::size_t id, std::size_t demand, std::pair<int, int> vertex) : id_(id), demand_(demand), vertex_(vertex) { } Customer(std::size_t id, std::size_t demand, int x, int y) : id_(id), demand_(demand), vertex_(std::make_pair(x, y)) { } std::size_t id() const { return id_; } std::size_t demand() const { return demand_; } void demand(std::size_t demand) { demand_ = demand; } int x() const { return vertex_.first; } void x(int x) { vertex_.first = x; } int y() const { return vertex_.second; } void y(int y) { vertex_.second = y; } private: std::size_t id_; std::size_t demand_; std::pair<int, int> vertex_; }; } // namespace VrpSolver #endif // VRPSOLVER_CUSTOMER_H
#ifndef VRPSOLVER_CUSTOMER_H #define VRPSOLVER_CUSTOMER_H #include <utility> namespace VrpSolver { class Customer { public: Customer(std::size_t id, std::size_t demand) : id_(id), demand_(demand), vertex_(std::make_pair(0, 0)) { } Customer(std::size_t id, std::size_t demand, std::pair<int, int> vertex) : id_(id), demand_(demand), vertex_(vertex) { } Customer(std::size_t id, std::size_t demand, int x, int y) : id_(id), demand_(demand), vertex_(std::make_pair(x, y)) { } std::size_t id() const { return id_; } std::size_t demand() const { return demand_; } void demand(std::size_t demand) { demand_ = demand; } int x() const { return vertex_.first; } void x(int x) { vertex_.first = x; } int y() const { return vertex_.second; } void y(int y) { vertex_.second = y; } bool operator==(const Customer &c) const { return id_ == c.id_; } bool operator!=(const Customer &c) const { return !(*this == c); } private: std::size_t id_; std::size_t demand_; std::pair<int, int> vertex_; }; } // namespace VrpSolver #endif // VRPSOLVER_CUSTOMER_H
Add operator== and != to Customer class
Add operator== and != to Customer class 顧客の同値性は顧客番号のみに依存するようにした 顧客番号は同じだが、需要や座標が異なる顧客は存在しないと 考えたからである.
C
mit
U-MA/cvrp,U-MA/cvrp
2ae3a03e0b8085434177658c7b880f2aa58e0368
grantlee_core_library/template.h
grantlee_core_library/template.h
/* Copyright (c) 2009 Stephen Kelly <steveire@gmail.com> */ #ifndef TEMPLATE_H #define TEMPLATE_H #include "context.h" #include "node.h" #include "grantlee_export.h" class GRANTLEE_EXPORT Template //: public QObject { // Q_OBJECT public: Template(const QString &templateString, QStringList dirs ); QString render( Context *c ); NodeList nodeList(); // TODO: Remove this. ?? void setNodeList(const NodeList &list); private: void parse(); NodeList compileString(const QString &str); QStringList m_pluginDirs; NodeList m_nodelist; }; class GRANTLEE_EXPORT TemplateLoader { public: static TemplateLoader* instance(); void setTemplateDirs(const QStringList &dirs); void setPluginDirs(const QStringList &dirs); void setTheme(const QString &themeName); void injectTemplate(const QString &name, const QString &content); Template loadFromString(const QString &content); Template loadByName(const QString &name); TemplateLoader(); private: Template loadFromFile(const QString &fileName); QString m_themeName; QStringList m_templateDirs; QStringList m_pluginDirs; static TemplateLoader* m_instance; QHash<QString, QString> m_namedTemplates; }; #endif
/* Copyright (c) 2009 Stephen Kelly <steveire@gmail.com> */ #ifndef TEMPLATE_H #define TEMPLATE_H #include "context.h" #include "node.h" #include "grantlee_export.h" class GRANTLEE_EXPORT Template //: public QObject { // Q_OBJECT public: Template(const QString &templateString, QStringList dirs ); QString render( Context *c ); NodeList nodeList(); // TODO: Remove this. ?? void setNodeList(const NodeList &list); private: void parse(); NodeList compileString(const QString &str); QStringList m_pluginDirs; NodeList m_nodelist; }; class GRANTLEE_EXPORT TemplateLoader { public: static TemplateLoader* instance(); void setTemplateDirs(const QStringList &dirs); void setPluginDirs(const QStringList &dirs); void setTheme(const QString &themeName); void injectTemplate(const QString &name, const QString &content); Template loadFromString(const QString &content); Template loadByName(const QString &name); private: TemplateLoader(); Template loadFromFile(const QString &fileName); QString m_themeName; QStringList m_templateDirs; QStringList m_pluginDirs; static TemplateLoader* m_instance; QHash<QString, QString> m_namedTemplates; }; #endif
Make the TemplateLoader constructor private for the Singleton pattern.
Make the TemplateLoader constructor private for the Singleton pattern.
C
lgpl-2.1
simonwagner/grantlee,simonwagner/grantlee,simonwagner/grantlee,simonwagner/grantlee,cutelyst/grantlee,cutelyst/grantlee,cutelyst/grantlee,cutelyst/grantlee,simonwagner/grantlee,cutelyst/grantlee,simonwagner/grantlee
a506cf5cc7fe032824c0f52fde755a497749f9aa
test/Driver/ios-version-min.c
test/Driver/ios-version-min.c
// REQUIRES: x86-registered-target // REQUIRES: arm-registered-target // RUN: %clang -target i386-apple-darwin10 -miphonesimulator-version-min=7.0 -arch i386 -S -o - %s | FileCheck %s // RUN: %clang -target i386-apple-darwin10 -miphoneos-version-min=7.0 -arch armv7s -S -o - %s | FileCheck %s int main() { return 0; } // CHECK: .ios_version_min 7, 0
// REQUIRES: x86-registered-target // REQUIRES: arm-registered-target // RUN: %clang -target i386-apple-darwin10 -miphonesimulator-version-min=7.0 -arch i386 -S -o - %s | FileCheck %s // RUN: %clang -target armv7s-apple-darwin10 -miphoneos-version-min=7.0 -arch armv7s -S -o - %s | FileCheck %s int main() { return 0; } // CHECK: .ios_version_min 7, 0
Fix the test added in r240710.
Fix the test added in r240710. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@240718 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang
f1dc24d53e9e91cf795f05751eeb7e220c7c15e1
include/asm-arm/arch-ebsa110/uncompress.h
include/asm-arm/arch-ebsa110/uncompress.h
/* * linux/include/asm-arm/arch-ebsa110/uncompress.h * * Copyright (C) 1996,1997,1998 Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/serial_reg.h> #define SERIAL_BASE ((unsigned char *)0xfe000be0) /* * This does not append a newline */ static inline void putc(int c) { unsigned char v, *base = SERIAL_BASE; do { v = base[UART_LSR << 2]; barrier(); } while (!(v & UART_LSR_THRE)); base[UART_TX << 2] = c; } static inline void flush(void) { unsigned char v, *base = SERIAL_BASE; do { v = base[UART_LSR << 2]; barrier(); } while ((v & (UART_LSR_TEMT|UART_LSR_THRE)) != (UART_LSR_TEMT|UART_LSR_THRE)); } /* * nothing to do */ #define arch_decomp_setup() #define arch_decomp_wdog()
/* * linux/include/asm-arm/arch-ebsa110/uncompress.h * * Copyright (C) 1996,1997,1998 Russell King * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */ #include <linux/serial_reg.h> #define SERIAL_BASE ((unsigned char *)0xf0000be0) /* * This does not append a newline */ static inline void putc(int c) { unsigned char v, *base = SERIAL_BASE; do { v = base[UART_LSR << 2]; barrier(); } while (!(v & UART_LSR_THRE)); base[UART_TX << 2] = c; } static inline void flush(void) { unsigned char v, *base = SERIAL_BASE; do { v = base[UART_LSR << 2]; barrier(); } while ((v & (UART_LSR_TEMT|UART_LSR_THRE)) != (UART_LSR_TEMT|UART_LSR_THRE)); } /* * nothing to do */ #define arch_decomp_setup() #define arch_decomp_wdog()
Fix incorrect serial port address
[ARM] ebsa110: Fix incorrect serial port address Signed-off-by: Russell King <f6aa0246ff943bfa8602cdf60d40c481b38ed232@arm.linux.org.uk>
C
mit
KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
fe82904d985794cb4e3b2704ffe472fe503c6ea4
testmud/mud/home/Test/initd.c
testmud/mud/home/Test/initd.c
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2012 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <kotaka/log.h> #include <kotaka/paths.h> inherit LIB_INITD; static void create() { LOGD->post_message("test", LOG_DEBUG, "Test subsystem loaded"); }
/* * This file is part of Kotaka, a mud library for DGD * http://github.com/shentino/kotaka * * Copyright (C) 2012 Raymond Jennings * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see <http://www.gnu.org/licenses/>. */ #include <kotaka/log.h> #include <kotaka/paths.h> inherit LIB_INITD; inherit UTILITY_COMPILE; static void create() { LOGD->post_message("test", LOG_DEBUG, "Test subsystem loading..."); load_dir("obj", 1); load_dir("sys", 1); LOGD->post_message("test", LOG_DEBUG, "Test subsystem loaded"); }
Make test subsystem load itself properly
Make test subsystem load itself properly
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
a17484601e97ba856c8130d2d98a7055c0fd5f8c
src/Core/Command/CommandFactory.h
src/Core/Command/CommandFactory.h
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2012 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef CORE_COMMAND_COMMANDFACTORY_H #define CORE_COMMAND_COMMANDFACTORY_H #include <Core/Command/Share.h> namespace SCIRun { namespace Core { namespace GlobalCommands { class GlobalCommand; enum Commands; class SCISHARE CommandFactory { public: virtual ~CommandFactory(); virtual GlobalCommand* create(Commands command) = 0; }; } } } #endif
/* For more information, please see: http://software.sci.utah.edu The MIT License Copyright (c) 2012 Scientific Computing and Imaging Institute, University of Utah. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ #ifndef CORE_COMMAND_COMMANDFACTORY_H #define CORE_COMMAND_COMMANDFACTORY_H #include <Core/Command/Command.h> #include <Core/Command/Share.h> namespace SCIRun { namespace Core { namespace GlobalCommands { class GlobalCommand; class SCISHARE CommandFactory { public: virtual ~CommandFactory(); virtual GlobalCommand* create(Commands command) = 0; }; } } } #endif
Remove nonstandard enum forward decl.
Remove nonstandard enum forward decl.
C
mit
moritzdannhauer/SCIRunGUIPrototype,jcollfont/SCIRun,collint8/SCIRun,ajanson/SCIRun,jessdtate/SCIRun,collint8/SCIRun,jcollfont/SCIRun,jcollfont/SCIRun,collint8/SCIRun,ajanson/SCIRun,jessdtate/SCIRun,jessdtate/SCIRun,jcollfont/SCIRun,jcollfont/SCIRun,moritzdannhauer/SCIRunGUIPrototype,moritzdannhauer/SCIRunGUIPrototype,collint8/SCIRun,collint8/SCIRun,moritzdannhauer/SCIRunGUIPrototype,ajanson/SCIRun,ajanson/SCIRun,jessdtate/SCIRun,ajanson/SCIRun,ajanson/SCIRun,jessdtate/SCIRun,collint8/SCIRun,jessdtate/SCIRun,moritzdannhauer/SCIRunGUIPrototype,collint8/SCIRun,jessdtate/SCIRun,jcollfont/SCIRun,moritzdannhauer/SCIRunGUIPrototype,jcollfont/SCIRun,moritzdannhauer/SCIRunGUIPrototype,ajanson/SCIRun,collint8/SCIRun,jessdtate/SCIRun
f57b70c85808c0946e63d87f7947fb12d60fe23a
ext/pdfium_ruby/pdfium_ruby.h
ext/pdfium_ruby/pdfium_ruby.h
extern "C" { #include "ruby.h" } void Define_Document(); void Define_Page(); void Define_PageSet();
#ifndef __PDFIUM_RUBY_H__ #define __PDFIUM_RUBY_H__ extern "C" { #include "ruby.h" } // Inspired by https://github.com/jasonroelofs/rice/blob/1740a6d12c99fce8c21eda3c5385738318ab9172/rice/detail/ruby.hpp#L33-L37 // Casts C functions into a type that C++ is happy calling extern "C" typedef VALUE (*CPP_RUBY_METHOD_FUNC)(ANYARGS); void Define_Document(); void Define_Page(); void Define_PageSet(); #endif
Create a type to cast Ruby's C functions to a thing C++ is happy with.
Create a type to cast Ruby's C functions to a thing C++ is happy with.
C
mit
documentcloud/pdfshaver,documentcloud/pdfshaver,documentcloud/pdfshaver
9d0b2a96595333aef5c4dd7ab0f15d9c663aee2a
test2/casts/rm_qual.c
test2/casts/rm_qual.c
// RUN: %check %s struct A { int i; }; int f(const void *p) { struct A *a = p; // CHECK: warning: implicit cast removes qualifiers (const) struct A *b = (struct A *)p; // CHECK: !/warning:.*cast removes qualifiers/ (void)a; (void)b; }
// RUN: %check %s struct A { int i; }; void take(void *); int f(const void *p) { struct A *a = p; // CHECK: warning: implicit cast removes qualifiers (const) struct A *b = (struct A *)p; // CHECK: !/warning:.*cast removes qualifiers/ (void)a; (void)b; const char c = 5; take(&c); // CHECK: warning: implicit cast removes qualifiers (const) }
Add another case to qualifier-removal test
Add another case to qualifier-removal test
C
mit
bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler,bobrippling/ucc-c-compiler
1de801a7120e0e8a2c7614265880452a20a38a29
test/Driver/clang-g-opts.c
test/Driver/clang-g-opts.c
// RUN: %clang -S -v -o %t %s 2>&1 | not grep -w -- -g // RUN: %clang -S -v -o %t %s -g 2>&1 | grep -w -- -g // RUN: %clang -S -v -o %t %s -g0 2>&1 | not grep -w -- -g // RUN: %clang -S -v -o %t %s -g -g0 2>&1 | not grep -w -- -g // RUN: %clang -S -v -o %t %s -g0 -g 2>&1 | grep -w -- -g
// RUN: %clang -S -v -o %t %s 2>&1 | FileCheck %s // CHECK-NOT: -g // RUN: %clang -S -v -o %t %s -g 2>&1 | FileCheck %s // CHECK: -g // RUN: %clang -S -v -o %t %s -g0 2>&1 | FileCheck %s // CHECK-NOT: -g // RUN: %clang -S -v -o %t %s -g -g0 2>&1 | FileCheck %s // CHECK-NOT: -g // RUN: %clang -S -v -o %t %s -g0 -g 2>&1 | FileCheck %s // CHECK: -g
Move a non portable test to FileCheck, from Jonathan Gray!
Move a non portable test to FileCheck, from Jonathan Gray! git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@155874 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
183498dc7eee80c5bc80262588e7675959400a26
include/slang/util/Enum.h
include/slang/util/Enum.h
//------------------------------------------------------------------------------ // Enum.h // Various enum utilities. // // File is under the MIT license; see LICENSE for details. //------------------------------------------------------------------------------ #pragma once #define UTIL_ENUM_ELEMENT(x) x, #define UTIL_ENUM_STRING(x) #x, #define ENUM(name, elements) \ enum class name { elements(UTIL_ENUM_ELEMENT) }; \ inline string_view toString(name e) { \ static const char* strings[] = { elements(UTIL_ENUM_STRING) }; \ return strings[static_cast<std::underlying_type_t<name>>(e)]; \ } \ inline std::ostream& operator<<(std::ostream& os, name e) { return os << toString(e); } #define ENUM_MEMBER(name, elements) \ enum name { elements(UTIL_ENUM_ELEMENT) }; \ friend string_view toString(name e) { \ static const char* strings[] = { elements(UTIL_ENUM_STRING) }; \ return strings[static_cast<std::underlying_type_t<name>>(e)]; \ }
//------------------------------------------------------------------------------ // Enum.h // Various enum utilities. // // File is under the MIT license; see LICENSE for details. //------------------------------------------------------------------------------ #pragma once #define UTIL_ENUM_ELEMENT(x) x, #define UTIL_ENUM_STRING(x) #x, #define ENUM(name, elements) \ enum class name { elements(UTIL_ENUM_ELEMENT) }; \ inline string_view toString(name e) { \ static const char* strings[] = { elements(UTIL_ENUM_STRING) }; \ return strings[static_cast<std::underlying_type_t<name>>(e)]; \ } \ inline std::ostream& operator<<(std::ostream& os, name e) { return os << toString(e); } #define ENUM_MEMBER(name, elements) \ enum name { elements(UTIL_ENUM_ELEMENT) }; \ friend string_view toString(name e) { \ static const char* strings[] = { elements(UTIL_ENUM_STRING) }; \ return strings[static_cast<std::underlying_type_t<name>>(e)]; \ }
Work around more GCC nonsense
Work around more GCC nonsense
C
mit
MikePopoloski/slang,MikePopoloski/slang
281bb6d66dd267368ce2bcb235b8aae24dfc17df
include/gpu/gl/SkMesaGLContext.h
include/gpu/gl/SkMesaGLContext.h
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkMesaGLContext_DEFINED #define SkMesaGLContext_DEFINED #include "SkGLContext.h" #if SK_MESA class SkMesaGLContext : public SkGLContext { private: typedef intptr_t Context; public: SkMesaGLContext(); virtual ~SkMesaGLContext(); virtual void makeCurrent() const SK_OVERRIDE; class AutoContextRestore { public: AutoContextRestore(); ~AutoContextRestore(); private: Context fOldContext; GLint fOldWidth; GLint fOldHeight; GLint fOldFormat; void* fOldImage; }; protected: virtual const GrGLInterface* createGLContext() SK_OVERRIDE; virtual void destroyGLContext() SK_OVERRIDE; private: Context fContext; GrGLubyte *fImage; }; #endif #endif
/* * Copyright 2011 Google Inc. * * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #ifndef SkMesaGLContext_DEFINED #define SkMesaGLContext_DEFINED #include "SkGLContext.h" #if SK_MESA class SkMesaGLContext : public SkGLContext { private: typedef intptr_t Context; public: SkMesaGLContext(); virtual ~SkMesaGLContext(); virtual void makeCurrent() const SK_OVERRIDE; class AutoContextRestore { public: AutoContextRestore(); ~AutoContextRestore(); private: Context fOldContext; GrGLint fOldWidth; GrGLint fOldHeight; GrGLint fOldFormat; void* fOldImage; }; protected: virtual const GrGLInterface* createGLContext() SK_OVERRIDE; virtual void destroyGLContext() SK_OVERRIDE; private: Context fContext; GrGLubyte *fImage; }; #endif #endif
Fix undefined GLint in Mac builds
Fix undefined GLint in Mac builds git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@3736 2bbb7eff-a529-9590-31e7-b0007b416f81
C
bsd-3-clause
metajack/skia,Cue/skia,Cue/skia,Cue/skia,Cue/skia,metajack/skia,mrobinson/skia,metajack/skia,metajack/skia,mrobinson/skia,mrobinson/skia,mrobinson/skia,mrobinson/skia
d2a0f73278eca431ec8af9e28ebf3f534c325b8e
include/error.h
include/error.h
#ifndef CPR_ERROR_H #define CPR_ERROR_H #include <string> #include "cprtypes.h" #include "defines.h" namespace cpr { enum class ErrorCode { OK = 0, CONNECTION_FAILURE, EMPTY_RESPONSE, HOST_RESOLUTION_FAILURE, INTERNAL_ERROR, INVALID_URL_FORMAT, NETWORK_RECEIVE_ERROR, NETWORK_SEND_FAILURE, OPERATION_TIMEDOUT, PROXY_RESOLUTION_FAILURE, SSL_CONNECT_ERROR, SSL_LOCAL_CERTIFICATE_ERROR, SSL_REMOTE_CERTIFICATE_ERROR, SSL_CACERT_ERROR, GENERIC_SSL_ERROR, UNSUPPORTED_PROTOCOL, UNKNOWN_ERROR = 1000, }; class Error { public: Error() : code{ErrorCode::OK} {} template <typename TextType> Error(const ErrorCode& p_error_code, TextType&& p_error_message) : code{p_error_code}, message{CPR_FWD(p_error_message)} {} explicit operator bool() const { return code != ErrorCode::OK; } ErrorCode code; std::string message; static ErrorCode getErrorCodeForCurlError(int curl_code); }; } // namespace cpr #endif
#ifndef CPR_ERROR_H #define CPR_ERROR_H #include <string> #include "cprtypes.h" #include "defines.h" namespace cpr { enum class ErrorCode { OK = 0, CONNECTION_FAILURE, EMPTY_RESPONSE, HOST_RESOLUTION_FAILURE, INTERNAL_ERROR, INVALID_URL_FORMAT, NETWORK_RECEIVE_ERROR, NETWORK_SEND_FAILURE, OPERATION_TIMEDOUT, PROXY_RESOLUTION_FAILURE, SSL_CONNECT_ERROR, SSL_LOCAL_CERTIFICATE_ERROR, SSL_REMOTE_CERTIFICATE_ERROR, SSL_CACERT_ERROR, GENERIC_SSL_ERROR, UNSUPPORTED_PROTOCOL, UNKNOWN_ERROR = 1000, }; class Error { public: Error() : code{ErrorCode::OK} {} template <typename TextType> Error(const ErrorCode& p_error_code, TextType&& p_error_message) : code{p_error_code}, message{CPR_FWD(p_error_message)} {} explicit operator bool() const { return code != ErrorCode::OK; } ErrorCode code; std::string message; private: static ErrorCode getErrorCodeForCurlError(int curl_code); }; } // namespace cpr #endif
Make static member method private
Make static member method private
C
mit
msuvajac/cpr,whoshuu/cpr,whoshuu/cpr,msuvajac/cpr,SuperV1234/cpr,SuperV1234/cpr,msuvajac/cpr,whoshuu/cpr,SuperV1234/cpr
35568f5347922fbd26b25b9a3c13b4a1dbfda1f5
ios/RNInstabugSDK.h
ios/RNInstabugSDK.h
// // RNInstabugSDK.h // RNInstabugSDK // // Created by Mark Miyashita on 10/11/16. // Copyright © 2016 Mark Miyashita. All rights reserved. // #import "RCTBridgeModule.h" #import "RCTConvert.h" #import "RCTUtils.h" @interface RNInstabugSDK : NSObject <RCTBridgeModule> @end
// // RNInstabugSDK.h // RNInstabugSDK // // Created by Mark Miyashita on 10/11/16. // Copyright © 2016 Mark Miyashita. All rights reserved. // #if __has_include("RCTBridgeModule.h") #import "RCTBridgeModule.h" #import "RCTConvert.h" #import "RCTUtils.h" #else #import "React/RCTBridgeModule.h" #import "React/RCTConvert.h" #import "React/RCTUtils.h" #endif @interface RNInstabugSDK : NSObject <RCTBridgeModule> @end
Update import style to add RN 40.0+ compatibility
Update import style to add RN 40.0+ compatibility
C
mit
negativetwelve/react-native-instabug-sdk,negativetwelve/react-native-instabug-sdk,negativetwelve/react-native-instabug-sdk
402993af266c289f2003b2c02f74a25a9375d48b
cmd/built_in.c
cmd/built_in.c
#include <stdlib.h> #include <stdbool.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include "cmd.h" void sh_exit() { exit(0); } void sh_pid() { printf("%d\n", getpid()); } void sh_ppid() { printf("%d\n", getppid()); } void sh_cd(cmd_args_t args) { char* dir; if (args.size == 1) { dir = getenv("HOME"); } else { dir = args.args[1]; } chdir(dir); } void sh_pwd() { char* cwd = getcwd(NULL, 0); printf("%s\n", cwd); free(cwd); } void sh_set(cmd_args_t args) { setenv(args.args[0], args.args[1], true); } void sh_get(cmd_args_t args) { char* val = getenv(args.args[0]); if (val == NULL) { printf("(NULL)\n"); } else { printf("%s\n", val); } }
#include <stdlib.h> #include <stdbool.h> #include <stdio.h> #include <string.h> #include <unistd.h> #include "cmd.h" void sh_exit() { exit(0); } void sh_pid() { printf("%d\n", getpid()); } void sh_ppid() { printf("%d\n", getppid()); } void sh_cd(cmd_args_t args) { char* dir; if (args.size == 1) { dir = getenv("HOME"); } else { dir = args.args[1]; } chdir(dir); } void sh_pwd() { char* cwd = getcwd(NULL, 0); printf("%s\n", cwd); free(cwd); } void sh_set(cmd_args_t args) { setenv(args.args[1], args.args[2], true); } void sh_get(cmd_args_t args) { char* val = getenv(args.args[1]); if (val == NULL) { printf("(NULL)\n"); } else { printf("%s\n", val); } }
Fix issue in options index.
Fix issue in options index.
C
mit
dgriffen/308-shell
e2ca3c802f97b5ee52f1d15d0e43097a5bef6187
src/OVAL/probes/unix/linux/rpm-helper.c
src/OVAL/probes/unix/linux/rpm-helper.c
/* * Copyright 2016 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 License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "rpm-helper.h" #ifdef HAVE_CONFIG_H #include <config.h> #endif int rpmErrorCb (rpmlogRec rec, rpmlogCallbackData data) { dE("RPM: %s", rpmlogRecMessage(rec)); return RPMLOG_EXIT; // don't perform default logging void rpmLibsPreload() { rpmReadConfigFiles(NULL, NULL); }
/* * Copyright 2016 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 License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ #include "rpm-helper.h" #ifdef HAVE_CONFIG_H #include <config.h> #endif int rpmErrorCb (rpmlogRec rec, rpmlogCallbackData data) { dE("RPM: %s", rpmlogRecMessage(rec)); return RPMLOG_DEFAULT; } void rpmLibsPreload() { rpmReadConfigFiles(NULL, NULL); }
Fix erro cb return value
probes/rpm: Fix erro cb return value We have to use RPMLOG_DEFAULT, because RPMLOG_EXIT cause exit of whole probe.
C
lgpl-2.1
redhatrises/openscap,OpenSCAP/openscap,mpreisler/openscap,jan-cerny/openscap,mpreisler/openscap,jan-cerny/openscap,ybznek/openscap,jan-cerny/openscap,ybznek/openscap,jan-cerny/openscap,OpenSCAP/openscap,Hexadorsimal/openscap,jan-cerny/openscap,OpenSCAP/openscap,ybznek/openscap,jan-cerny/openscap,Hexadorsimal/openscap,mpreisler/openscap,OpenSCAP/openscap,mpreisler/openscap,mpreisler/openscap,redhatrises/openscap,OpenSCAP/openscap,Hexadorsimal/openscap,Hexadorsimal/openscap,ybznek/openscap,Hexadorsimal/openscap,redhatrises/openscap,redhatrises/openscap,ybznek/openscap,OpenSCAP/openscap,Hexadorsimal/openscap,redhatrises/openscap,mpreisler/openscap,redhatrises/openscap,ybznek/openscap
1f32a4a1cc5942bcc8d99f006ee20e54ca67e220
include/utils.h
include/utils.h
/** * utils.h * * Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com> */ #ifndef GIT_STASHD_UTILS_H #define GIT_STASHD_UTILS_H #include <dirent.h> #include <sys/stat.h> #include <sys/types.h> #include "common.h" #include "signals.h" #ifdef __APPLE__ #include <limits.h> #else #include <linux/limits.h> #endif /** * String utilities */ int compare(char *one, char *two); char *concat(char *buf, char *str); char *copy(char *buf, char *str); /** * Filesystem utilities */ DIR *get_dir(const char *path); FILE *get_file(const char *filename, const char *filemode); int is_dir(const char *path); int is_file(const char *path); int is_link(const char *path); int is_sock(const char *path); int is_fifo(const char *path); int is_block(const char *path); int is_char(const char *path); /** * Type utilities */ int is_null(void *ptr); #endif /* GIT_STASHD_UTILS_H */
/** * utils.h * * Copyright (C) 2017 Nickolas Burr <nickolasburr@gmail.com> */ #ifndef GIT_STASHD_UTILS_H #define GIT_STASHD_UTILS_H #include <dirent.h> #include <sys/stat.h> #include <sys/types.h> #include "common.h" #include "signals.h" #ifdef __APPLE__ #include <limits.h> #else #include <linux/limits.h> #endif /** * String utilities */ int compare(char *one, char *two); char *concat(char *buf, char *str); char *copy(char *buf, char *str); /** * Filesystem utilities */ DIR *get_dir(const char *path, int *error); FILE *get_file(const char *filename, const char *filemode, int *error); FILE *get_pipe(char *command, char *mode, int *error); int is_dir(const char *path); int is_file(const char *path); int is_link(const char *path); int is_sock(const char *path); int is_fifo(const char *path); int is_block(const char *path); int is_char(const char *path); /** * Type utilities */ int is_null(void *ptr); #endif /* GIT_STASHD_UTILS_H */
Update get_dir, get_file decls, add get_pipe decl
Update get_dir, get_file decls, add get_pipe decl
C
mit
nickolasburr/git-stashd,nickolasburr/git-stashd,nickolasburr/git-stashd
fdf89bc553c5fe5f9900658e8526cd398165d2f3
src/condor_includes/_condor_fix_types.h
src/condor_includes/_condor_fix_types.h
#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 on sys/types.h will need these extra definitions... */ typedef unsigned int u_int; #if defined(AIX32) typedef unsigned short ushort; #endif #if defined(ULTRIX42) || defined(ULTRIX43) typedef char * caddr_t; #endif #if defined(AIX32) typedef unsigned long rlim_t; #endif #endif
#ifndef FIX_TYPES_H #define FIX_TYPES_H // OSF/1 has this as an "unsigned long", but this is incorrect. It // is used by lseek(), and must be able to hold negative values. #if defined(OSF1) #define off_t _hide_off_t #endif #include <sys/types.h> #if defined(OSF1) #undef off_t typedef long off_t; #endif /* 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 on sys/types.h will need these extra definitions... */ typedef unsigned int u_int; #if defined(AIX32) typedef unsigned short ushort; #endif #if defined(ULTRIX42) || defined(ULTRIX43) typedef char * caddr_t; #endif #if defined(AIX32) typedef unsigned long rlim_t; #endif #endif
Fix up definition of off_t for DecAlpha OSF/1 v1.3.
Fix up definition of off_t for DecAlpha OSF/1 v1.3.
C
apache-2.0
bbockelm/condor-network-accounting,htcondor/htcondor,zhangzhehust/htcondor,djw8605/condor,htcondor/htcondor,neurodebian/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,mambelli/osg-bosco-marco,clalancette/condor-dcloud,mambelli/osg-bosco-marco,djw8605/htcondor,neurodebian/htcondor,zhangzhehust/htcondor,clalancette/condor-dcloud,djw8605/htcondor,clalancette/condor-dcloud,bbockelm/condor-network-accounting,djw8605/htcondor,zhangzhehust/htcondor,bbockelm/condor-network-accounting,bbockelm/condor-network-accounting,zhangzhehust/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,djw8605/condor,clalancette/condor-dcloud,neurodebian/htcondor,htcondor/htcondor,htcondor/htcondor,djw8605/condor,htcondor/htcondor,mambelli/osg-bosco-marco,mambelli/osg-bosco-marco,neurodebian/htcondor,htcondor/htcondor,djw8605/condor,djw8605/condor,zhangzhehust/htcondor,htcondor/htcondor,neurodebian/htcondor,djw8605/htcondor,neurodebian/htcondor,htcondor/htcondor,mambelli/osg-bosco-marco,bbockelm/condor-network-accounting,zhangzhehust/htcondor,bbockelm/condor-network-accounting,mambelli/osg-bosco-marco,djw8605/htcondor,djw8605/htcondor,djw8605/htcondor,clalancette/condor-dcloud,neurodebian/htcondor,neurodebian/htcondor,bbockelm/condor-network-accounting,djw8605/condor,djw8605/htcondor,zhangzhehust/htcondor,clalancette/condor-dcloud,djw8605/condor,zhangzhehust/htcondor,mambelli/osg-bosco-marco,djw8605/condor,djw8605/htcondor,zhangzhehust/htcondor
ba541d36f6891892efc3f17773ff2395bb97df44
test/CodeGen/x86_32-inline-asm.c
test/CodeGen/x86_32-inline-asm.c
// RUN: %clang_cc1 -triple i386-apple-darwin9 -verify %s // <rdar://problem/12415959> typedef unsigned int u_int32_t; typedef u_int32_t uint32_t; typedef unsigned long long u_int64_t; typedef u_int64_t uint64_t; int main () { uint32_t msr = 0x8b; uint64_t val = 0; __asm__ volatile("wrmsr" : : "c" (msr), "a" ((val & 0xFFFFFFFFUL)), // expected-error {{invalid input size for constraint 'a'}} "d" (((val >> 32) & 0xFFFFFFFFUL))); }
// RUN: %clang_cc1 -triple i386-apple-darwin9 -verify %s // <rdar://problem/12415959> typedef unsigned int u_int32_t; typedef u_int32_t uint32_t; typedef unsigned long long u_int64_t; typedef u_int64_t uint64_t; int main () { // Error out if size is > 32-bits. uint32_t msr = 0x8b; uint64_t val = 0; __asm__ volatile("wrmsr" : : "c" (msr), "a" ((val & 0xFFFFFFFFUL)), // expected-error {{invalid input size for constraint 'a'}} "d" (((val >> 32) & 0xFFFFFFFFUL))); // Don't error out if the size of the destination is <= 32 bits. unsigned char data; unsigned int port; __asm__ volatile("outb %0, %w1" : : "a" (data), "Nd" (port)); // No error expected. }
Update testcase to show that we don't emit an error for sizes <= 32-bits.
Update testcase to show that we don't emit an error for sizes <= 32-bits. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@167748 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
3c62ef3d6cd198b345da0d0381b1145dfdb05cf1
mod_uuid.c
mod_uuid.c
#include <uuid/uuid.h> #include "httpd.h" #include "http_config.h" static int generate_uuid(request_rec *r) { char *uuid_str; uuid_t uuid; uuid_generate_random(uuid); uuid_str = (char *)apr_palloc(r->pool, sizeof(char)*37); uuid_unparse_lower(uuid, uuid_str); apr_table_setn(r->subprocess_env, "UUID", uuid_str); return DECLINED; } static void register_hooks(apr_pool_t *p) { ap_hook_post_read_request(generate_uuid, NULL, NULL, APR_HOOK_MIDDLE); } module AP_MODULE_DECLARE_DATA uuid_module = { STANDARD20_MODULE_STUFF, NULL, /* dir config creater */ NULL, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server configs */ NULL, /* command apr_table_t */ register_hooks /* register hooks */ };
#include <uuid/uuid.h> #include "httpd.h" #include "http_config.h" #include "http_protocol.h" static int generate_uuid(request_rec *r) { char *uuid_str; uuid_t uuid; uuid_generate_random(uuid); uuid_str = (char *)apr_palloc(r->pool, sizeof(char)*37); uuid_unparse_lower(uuid, uuid_str); apr_table_setn(r->subprocess_env, "UUID", uuid_str); return DECLINED; } static void register_hooks(apr_pool_t *p) { ap_hook_post_read_request(generate_uuid, NULL, NULL, APR_HOOK_MIDDLE); } module AP_MODULE_DECLARE_DATA uuid_module = { STANDARD20_MODULE_STUFF, NULL, /* dir config creater */ NULL, /* dir merger --- default is to override */ NULL, /* server config */ NULL, /* merge server configs */ NULL, /* command apr_table_t */ register_hooks /* register hooks */ };
Add header file for ap_hook_post_read_request to suppress compiler warnings
Add header file for ap_hook_post_read_request to suppress compiler warnings
C
apache-2.0
tomg/mod_uuid
8348847ba77a85167f591e7c97db6d205b0a3f62
sassc.c
sassc.c
#include <stdio.h> #include "libsass/sass_interface.h" int main(int argc, char** argv) { int ret; if (argc < 2) { printf("Usage: sassc [INPUT FILE]\n"); return 0; } struct sass_file_context* ctx = sass_new_file_context(); ctx->options.include_paths = ""; ctx->options.image_path = "images"; ctx->options.output_style = SASS_STYLE_NESTED; ctx->input_path = argv[1]; sass_compile_file(ctx); if (ctx->error_status) { if (ctx->error_message) printf("%s", ctx->error_message); else printf("An error occured; no error message available.\n"); ret = 1; } else if (ctx->output_string) { printf("%s", ctx->output_string); ret = 0; } else { printf("Unknown internal error.\n"); ret = 2; } sass_free_file_context(ctx); return ret; }
#include <stdio.h> #include "libsass/sass_interface.h" int main(int argc, char** argv) { int ret; if (argc < 2) { printf("Usage: sassc [INPUT FILE]\n"); return 0; } struct sass_file_context* ctx = sass_new_file_context(); ctx->options.include_paths = ""; ctx->options.image_path = "images"; ctx->options.output_style = SASS_STYLE_NESTED; ctx->input_path = argv[1]; sass_compile_file(ctx); if (ctx->error_status) { if (ctx->error_message) fprintf(stderr, "%s", ctx->error_message); else fprintf(stderr, "An error occured; no error message available.\n"); ret = 1; } else if (ctx->output_string) { printf("%s", ctx->output_string); ret = 0; } else { fprintf(stderr, "Unknown internal error.\n"); ret = 2; } sass_free_file_context(ctx); return ret; }
Print error messages to stderr.
Print error messages to stderr.
C
mit
saper/sassc,am11/sassc,am11/sassc,djam90/sassc,rightisleft/sassc,saper/sassc,am11/sassc,saper/sassc,rightisleft/sassc,djam90/sassc,rightisleft/sassc,djam90/sassc
8a886e7b508f52754ef1dcd49208903ba9e54040
rgmanager/src/clulib/gettid.c
rgmanager/src/clulib/gettid.c
#include <sys/types.h> #include <linux/unistd.h> #include <gettid.h> #include <errno.h> /* Patch from Adam Conrad / Ubuntu: Don't use _syscall macro */ #ifdef __NR_gettid pid_t gettid (void) { return syscall(__NR_gettid); } #else #warn "gettid not available -- substituting with pthread_self()" #include <pthread.h> pid_t gettid (void) { return (pid_t)pthread_self(); } #endif
#include <sys/types.h> #include <sys/syscall.h> #include <linux/unistd.h> #include <gettid.h> #include <errno.h> #include <unistd.h> /* Patch from Adam Conrad / Ubuntu: Don't use _syscall macro */ #ifdef __NR_gettid pid_t gettid (void) { return syscall(__NR_gettid); } #else #warn "gettid not available -- substituting with pthread_self()" #include <pthread.h> pid_t gettid (void) { return (pid_t)pthread_self(); } #endif
Patch from Fabio Massimo Di Nitto: Fix includes
Patch from Fabio Massimo Di Nitto: Fix includes
C
lgpl-2.1
stevenraspudic/resource-agents,asp24/resource-agents,stevenraspudic/resource-agents,asp24/resource-agents,asp24/resource-agents,stevenraspudic/resource-agents
661bc252516e229e3f3769956b1b16c8d40a95eb
tests/execute/0110-typedefcast.c
tests/execute/0110-typedefcast.c
typedef int myint; myint x = (myint)1;
typedef int myint; myint x = (myint)1; int main(void) { return x-1; }
Fix test added in 6fe29dd
[tests] Fix test added in 6fe29dd Tests must have a main function which returns 0.
C
isc
k0gaMSX/scc,k0gaMSX/scc,k0gaMSX/scc
250473c59441260055fa47fb04a2f2dd911d7cf6
rov_simulator/src/simulator.h
rov_simulator/src/simulator.h
#ifndef SIMULATOR_H #define SIMULATOR_H #include "ros/ros.h" #include "dynamics.h" #include "sensor_msgs/Imu.h" #include "sensor_msgs/FluidPressure.h" #include "nav_msgs/Odometry.h" #include "geometry_msgs/Wrench.h" #include "geometry_msgs/Pose.h" #include "vortex_msgs/Float64ArrayStamped.h" #include </usr/include/armadillo> typedef std::vector<double> stdvec; class Simulator { public: Simulator(unsigned int f, ros::NodeHandle nh); void thrustCallback(const vortex_msgs::Float64ArrayStamped &msg); void spin(); private: void poseArmaToMsg(const arma::vec &e, geometry_msgs::Pose &m); void twistArmaToMsg(const arma::vec &e, geometry_msgs::Twist &m); unsigned int frequency; ros::NodeHandle nh; ros::Subscriber wrenchSub; ros::Publisher posePub; ros::Publisher twistPub; ros::Publisher imuPub; ros::Publisher pressurePub; Dynamics *dynamics; arma::vec u; }; #endif
#ifndef SIMULATOR_H #define SIMULATOR_H #include "ros/ros.h" #include "dynamics.h" #include "sensor_msgs/Imu.h" #include "sensor_msgs/FluidPressure.h" #include "nav_msgs/Odometry.h" #include "geometry_msgs/Wrench.h" #include "geometry_msgs/Pose.h" #include "vortex_msgs/Float64ArrayStamped.h" #include </usr/include/armadillo> typedef std::vector<double> stdvec; class Simulator { public: Simulator(unsigned int f, ros::NodeHandle nh); void thrustCallback(const vortex_msgs::Float64ArrayStamped &msg); void spin(); private: void poseArmaToMsg(const arma::vec &e, geometry_msgs::Pose &m); void twistArmaToMsg(const arma::vec &e, geometry_msgs::Twist &m); unsigned int frequency; ros::NodeHandle nh; ros::Subscriber wrenchSub; ros::Publisher posePub; ros::Publisher twistPub; ros::Publisher imuPub; ros::Publisher pressurePub; Dynamics *dynamics; arma::vec u; }; #endif
Change any tabs to spaces
Change any tabs to spaces
C
mit
vortexntnu/simulator
047fa49e35d9dda7a987468b86d60ec8bca4b33a
tests/infiniteTranslationLoop.c
tests/infiniteTranslationLoop.c
/* liblouis Braille Translation and Back-Translation Library Copyright (C) 2014 Mesar Hameed <mesar.hameed@gmail.com> Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include "liblouis.h" #include "brl_checks.h" /* Demonstrates infinite translation loop. * Originally reported at: http://www.freelists.org/post/liblouis-liblouisxml/Translating-com-with-UEBCg2ctb-causes-infinite-loop */ int main(int argc, char **argv) { int result = 0; const char *text = "---.com"; const char *expected = ""; result |= check_translation("UEBC-g2.ctb", text, NULL, expected); lou_free(); return result; }
/* liblouis Braille Translation and Back-Translation Library Copyright (C) 2014 Mesar Hameed <mesar.hameed@gmail.com> Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty. */ #include <stdio.h> #include <string.h> #include <stdlib.h> #include "liblouis.h" #include "brl_checks.h" /* Demonstrates infinite translation loop. * Originally reported at: http://www.freelists.org/post/liblouis-liblouisxml/Translating-com-with-UEBCg2ctb-causes-infinite-loop */ int main(int argc, char **argv) { int result = 0; const char *text = "---.com"; const char *expected = ""; result |= check_translation("tables/UEBC-g2.ctb", text, NULL, expected); lou_free(); return result; }
Fix a path in the translation loop test
Fix a path in the translation loop test
C
lgpl-2.1
vsmontalvao/liblouis,vsmontalvao/liblouis,hammera/liblouis,liblouis/liblouis,hammera/liblouis,BueVest/liblouis,BueVest/liblouis,BueVest/liblouis,hammera/liblouis,IndexBraille/liblouis,IndexBraille/liblouis,liblouis/liblouis,IndexBraille/liblouis,BueVest/liblouis,hammera/liblouis,BueVest/liblouis,vsmontalvao/liblouis,liblouis/liblouis,IndexBraille/liblouis,liblouis/liblouis,liblouis/liblouis,hammera/liblouis,hammera/liblouis,BueVest/liblouis,liblouis/liblouis,vsmontalvao/liblouis,vsmontalvao/liblouis,IndexBraille/liblouis
7dbdf1bce8b4948d979a847315b8b9308c943e4c
examples/example_01.c
examples/example_01.c
#include <stdio.h> #include <datastructs.h> int main(){ typedef struct user_data { char name[100]; char email[100]; } user_data; user_data a = {"John Doe", "john.doe@mail_server.com"}; user_data b = {"Jack Smith", "jack.smith@mail_server.com"}; user_data c = {"Jane Plain", "jane.plain@mail_server.com"}; user_data d = {"Mary Merry", "mary.merry@mail_server.com"}; user_data* data = NULL; // list creation: ds_linked_list* list = ds_linked_list_create(); ds_linked_list_insert_at(list, &a, 0); ds_linked_list_add(list, &b); ds_linked_list_add(list, &c); ds_linked_list_add(list, &d); int i; for (i = 0; i < list->size; i ++){ data = ds_linked_list_get(list, i); printf("Name: %s, Email: %s\n", data->name, data->email ); } ds_linked_list_delete(&list); }
#include <stdio.h> #include <datastructs.h> int main(){ typedef struct user_data { char name[100]; char email[100]; } user_data; user_data a = {"John Doe", "john.doe@mail_server.com"}; user_data b = {"Jack Smith", "jack.smith@mail_server.com"}; user_data c = {"Jane Plain", "jane.plain@mail_server.com"}; user_data d = {"Mary Merry", "mary.merry@mail_server.com"}; user_data* data = NULL; // list creation: ds_linked_list* list = ds_linked_list_create(); ds_linked_list_insert_at(list, &a, 0); ds_linked_list_add(list, &b); ds_linked_list_add(list, &c); ds_linked_list_add(list, &d); int i; for (i = 0; i < ds_linked_list_length(list); i ++){ data = ds_linked_list_get(list, i); printf("Name: %s, Email: %s\n", data->name, data->email ); } ds_linked_list_delete(&list); }
Use ds_linked_list_length() instead of the size struct member.
Examples: Use ds_linked_list_length() instead of the size struct member.
C
bsd-3-clause
cyberpython/datastructs,cyberpython/datastructs
59c8aaac3425108e3137677863cc8cee6c84e20b
src/compat.h
src/compat.h
#ifndef COMPAT_H #define COMPAT_H #include "lua.h" #include "lauxlib.h" #if LUA_VERSION_NUM==501 void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup); void *luaL_testudata ( lua_State *L, int arg, const char *tname); #endif #endif
#ifndef COMPAT_H #define COMPAT_H #include "lua.h" #include "lauxlib.h" #if LUA_VERSION_NUM==501 #define luaL_setfuncs socket_setfuncs #define luaL_testudata socket_testudata void luaL_setfuncs (lua_State *L, const luaL_Reg *l, int nup); void *luaL_testudata ( lua_State *L, int arg, const char *tname); #endif #endif
Fix static linking problem with LuaJIT
Fix static linking problem with LuaJIT LuaJIT and LuaSocket both define new Lua APIs from Lua 5.2 (in particular `luaL_setfuncs` and `luaL_testudata`). When linking both statically, the one definition rule strikes and linking fails. This commit fixes the issue by renaming the LuaSocket versions of those functions behind the scenes using the C preprocessor. Closes #214
C
mit
diegonehab/LuaSocket,diegonehab/LuaSocket,diegonehab/LuaSocket
3f6405a7ebcb804e88aba4be5a68c767690c4a72
test/test_app.c
test/test_app.c
#include "test.h" #include "app.h" TEST(app_new) { app_t * app = app_new(); assert(app->running == 0); assert(app->io == 0); app_free(app); } TEST(current_app_set_to) { app_t * app = app_new(); assert(current_app == 0); current_app_set_to(app); assert(current_app == app); app_free(app); current_app_set_to(0); } static test_t app_test_suite[] = { TEST_REF(app_new), 0 };
#include <string.h> #include "test.h" #include "io.h" #include "app.h" TEST(app_new) { app_t * app = app_new(); assert(app->running == 0); assert(app->io == 0); app_free(app); } TEST(current_app_set_to) { app_t * app = app_new(); assert(current_app == 0); current_app_set_to(app); assert(current_app == app); app_free(app); current_app_set_to(0); } TEST(app_parse_command_line) { app_t * app = app_new(); int argc = 3; char * argv[] = {"chip8", "--io", "terminal"}; app_parse_command_line(app, argc, argv); assert(app->io && strcmp(app->io->name, "terminal") == 0); app_free(app); } static test_t app_test_suite[] = { TEST_REF(app_new), TEST_REF(app_parse_command_line), 0 };
Add a failing test for app_parse_command_line
Add a failing test for app_parse_command_line
C
mit
gsamokovarov/chip8.c,gsamokovarov/chip8.c
bf8777dc307e2938a7d7e02ff761580b9917f529
src/core/lib/gprpp/optional.h
src/core/lib/gprpp/optional.h
/* * * Copyright 2019 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef GRPC_CORE_LIB_GPRPP_OPTIONAL_H #define GRPC_CORE_LIB_GPRPP_OPTIONAL_H namespace grpc_core { /* A make-shift alternative for absl::Optional. This can be removed in favor of * that once absl dependencies can be introduced. */ template <typename T> class Optional { public: void set(const T& val) { value_ = val; set_ = true; } bool has_value() { return set_; } void reset() { set_ = false; } T value() { return value_; } private: T value_; bool set_ = false; }; } /* namespace grpc_core */ #endif /* GRPC_CORE_LIB_GPRPP_OPTIONAL_H */
/* * * Copyright 2019 gRPC authors. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * */ #ifndef GRPC_CORE_LIB_GPRPP_OPTIONAL_H #define GRPC_CORE_LIB_GPRPP_OPTIONAL_H namespace grpc_core { /* A make-shift alternative for absl::Optional. This can be removed in favor of * that once absl dependencies can be introduced. */ template <typename T> class Optional { public: void set(const T& val) { value_ = val; set_ = true; } bool has_value() const { return set_; } void reset() { set_ = false; } T value() const { return value_; } private: T value_; bool set_ = false; }; } /* namespace grpc_core */ #endif /* GRPC_CORE_LIB_GPRPP_OPTIONAL_H */
Add const qualifiers to member methods in Optional
Add const qualifiers to member methods in Optional
C
apache-2.0
jboeuf/grpc,ejona86/grpc,stanley-cheung/grpc,ctiller/grpc,sreecha/grpc,ctiller/grpc,nicolasnoble/grpc,sreecha/grpc,ctiller/grpc,donnadionne/grpc,donnadionne/grpc,sreecha/grpc,ctiller/grpc,ctiller/grpc,pszemus/grpc,muxi/grpc,jtattermusch/grpc,vjpai/grpc,jboeuf/grpc,vjpai/grpc,grpc/grpc,firebase/grpc,sreecha/grpc,jtattermusch/grpc,firebase/grpc,ctiller/grpc,ejona86/grpc,sreecha/grpc,firebase/grpc,muxi/grpc,grpc/grpc,jboeuf/grpc,firebase/grpc,carl-mastrangelo/grpc,grpc/grpc,donnadionne/grpc,vjpai/grpc,sreecha/grpc,ejona86/grpc,muxi/grpc,carl-mastrangelo/grpc,sreecha/grpc,jtattermusch/grpc,ctiller/grpc,firebase/grpc,stanley-cheung/grpc,muxi/grpc,muxi/grpc,muxi/grpc,firebase/grpc,jtattermusch/grpc,ejona86/grpc,pszemus/grpc,stanley-cheung/grpc,donnadionne/grpc,vjpai/grpc,firebase/grpc,jtattermusch/grpc,nicolasnoble/grpc,jboeuf/grpc,stanley-cheung/grpc,jtattermusch/grpc,donnadionne/grpc,ejona86/grpc,stanley-cheung/grpc,carl-mastrangelo/grpc,muxi/grpc,carl-mastrangelo/grpc,vjpai/grpc,ejona86/grpc,vjpai/grpc,pszemus/grpc,carl-mastrangelo/grpc,ctiller/grpc,pszemus/grpc,muxi/grpc,jboeuf/grpc,jtattermusch/grpc,sreecha/grpc,nicolasnoble/grpc,ejona86/grpc,vjpai/grpc,grpc/grpc,nicolasnoble/grpc,jboeuf/grpc,nicolasnoble/grpc,vjpai/grpc,ctiller/grpc,muxi/grpc,pszemus/grpc,grpc/grpc,donnadionne/grpc,donnadionne/grpc,ctiller/grpc,sreecha/grpc,grpc/grpc,nicolasnoble/grpc,firebase/grpc,stanley-cheung/grpc,jboeuf/grpc,stanley-cheung/grpc,carl-mastrangelo/grpc,nicolasnoble/grpc,pszemus/grpc,pszemus/grpc,vjpai/grpc,donnadionne/grpc,donnadionne/grpc,firebase/grpc,ejona86/grpc,ctiller/grpc,carl-mastrangelo/grpc,stanley-cheung/grpc,jtattermusch/grpc,firebase/grpc,grpc/grpc,jboeuf/grpc,stanley-cheung/grpc,nicolasnoble/grpc,nicolasnoble/grpc,donnadionne/grpc,ejona86/grpc,jboeuf/grpc,vjpai/grpc,pszemus/grpc,nicolasnoble/grpc,ejona86/grpc,stanley-cheung/grpc,firebase/grpc,stanley-cheung/grpc,grpc/grpc,vjpai/grpc,sreecha/grpc,carl-mastrangelo/grpc,jtattermusch/grpc,sreecha/grpc,stanley-cheung/grpc,nicolasnoble/grpc,jtattermusch/grpc,muxi/grpc,nicolasnoble/grpc,pszemus/grpc,vjpai/grpc,jboeuf/grpc,pszemus/grpc,carl-mastrangelo/grpc,muxi/grpc,carl-mastrangelo/grpc,pszemus/grpc,carl-mastrangelo/grpc,grpc/grpc,ejona86/grpc,grpc/grpc,grpc/grpc,jboeuf/grpc,jtattermusch/grpc,muxi/grpc,jtattermusch/grpc,donnadionne/grpc,grpc/grpc,jboeuf/grpc,donnadionne/grpc,carl-mastrangelo/grpc,firebase/grpc,sreecha/grpc,ctiller/grpc,pszemus/grpc,ejona86/grpc
669ec93efe7eafc246bccb0b0768ad0952b3b8c4
include/myr/compiler.h
include/myr/compiler.h
/* * Myr C Utils library * * Written 2015 by Rickard Närström <rickard@narstrom.se> * * To the extent possible under law, the author(s) have dedicated all copyright * and related and neighboring rights to this software to the public domain worldwide. * This software is distributed without any warranty. * * You should have received a copy of the CC0 Public Domain Dedication along * with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. */ #ifndef MYR_COMPILER_H #define MYR_COMPILER_H #ifndef __has_attribute # define __has_attribute(x) 0 #endif #if defined(__GNUC__) || __has_attribute(noreturn) # define NORETURN __attribute__((noreturn)) #else # define NORETURN #endif #if defined(__GNUC__) || __has_attribute(format) # define FORMAT(archtype, string_index, first_to_check) __attribute__((format(archtype, string_index, first_to_check))) #else # define FORMAT(archtype, string_index, first_to_check) #endif #endif
/* * Myr C Utils library * * Written 2015 by Rickard Närström <rickard@narstrom.se> * * To the extent possible under law, the author(s) have dedicated all copyright * and related and neighboring rights to this software to the public domain worldwide. * This software is distributed without any warranty. * * You should have received a copy of the CC0 Public Domain Dedication along * with this software. If not, see <http://creativecommons.org/publicdomain/zero/1.0/>. */ #ifndef MYR_COMPILER_H #define MYR_COMPILER_H #ifndef __has_attribute # define __has_attribute(x) 0 #endif #if __STDC_VERSION__ >= 201112L # include <stdnoreturn.h> # define NORETURN noreturn #elif defined(__GNUC__) || __has_attribute(noreturn) # define NORETURN __attribute__((noreturn)) #else # define NORETURN #endif #if defined(__GNUC__) || __has_attribute(format) # define FORMAT(archtype, string_index, first_to_check) __attribute__((format(archtype, string_index, first_to_check))) #else # define FORMAT(archtype, string_index, first_to_check) #endif #endif
Use standard C11 noreturn if avaiable.
Use standard C11 noreturn if avaiable.
C
unlicense
riccetn/myr-cutils
5e6b1eab679452b24578e6f6c9594ac3b88b3b64
ObjectDoc/ObjectDoc.h
ObjectDoc/ObjectDoc.h
/* * Author: Landon Fuller <landonf@plausible.coop> * * Copyright (c) 2013 Plausible Labs Cooperative, Inc. * All rights reserved. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ #import <Foundation/Foundation.h> #import "PLClangSourceIndex.h" #import "PLClangTranslationUnit.h"
/* * Author: Landon Fuller <landonf@plausible.coop> * * Copyright (c) 2013 Plausible Labs Cooperative, Inc. * All rights reserved. * * Permission is hereby granted, free of charge, to any person * obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without * restriction, including without limitation the rights to use, * copy, modify, merge, publish, distribute, sublicense, and/or sell * copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following * conditions: * * The above copyright notice and this permission notice shall be * included in all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. */ #import <Foundation/Foundation.h> #import "PLClang.h"
Use PLClang.h in umbrella header
Use PLClang.h in umbrella header This includes the error codes and error domain.
C
mit
landonf/objectdoc,landonf/objectdoc
48eda9d8410404db35d51a3807ae8ac8a52d7261
Source/UnrealCV/Private/libs/cnpy.h
Source/UnrealCV/Private/libs/cnpy.h
// Copyright (C) 2011 Carl Rogers // Released under MIT License // Simplied by Weichao Qiu (qiuwch@gmail.com) from https://github.com/rogersce/cnpy #pragma once #include <vector> namespace cnpy { template<typename T> std::vector<char> create_npy_header(const T* data, const std::vector<int> shape); template<typename T> std::vector<char>& operator+=(std::vector<char>& lhs, const T rhs) { //write in little endian for (char byte = 0; byte < sizeof(T); byte++) { char val = *((char*)&rhs + byte); lhs.push_back(val); } return lhs; } template<> std::vector<char>& operator+=(std::vector<char>& lhs, const std::string rhs); template<> std::vector<char>& operator+=(std::vector<char>& lhs, const char* rhs); }
// Copyright (C) 2011 Carl Rogers // Released under MIT License // Simplied by Weichao Qiu (qiuwch@gmail.com) from https://github.com/rogersce/cnpy #pragma once #include <vector> #include <string> namespace cnpy { template<typename T> std::vector<char> create_npy_header(const T* data, const std::vector<int> shape); template<typename T> std::vector<char>& operator+=(std::vector<char>& lhs, const T rhs) { //write in little endian for (char byte = 0; byte < sizeof(T); byte++) { char val = *((char*)&rhs + byte); lhs.push_back(val); } return lhs; } template<> std::vector<char>& operator+=(std::vector<char>& lhs, const std::string rhs); template<> std::vector<char>& operator+=(std::vector<char>& lhs, const char* rhs); }
Include <string> to fix a compile issue in 4.12 and 4.13.
Include <string> to fix a compile issue in 4.12 and 4.13.
C
mit
unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv,unrealcv/unrealcv
248c9fb0418e071786b2b91992b5fe711d79f021
drivers/scsi/qla4xxx/ql4_version.h
drivers/scsi/qla4xxx/ql4_version.h
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.04.00-k5"
/* * QLogic iSCSI HBA Driver * Copyright (c) 2003-2013 QLogic Corporation * * See LICENSE.qla4xxx for copyright and licensing details. */ #define QLA4XXX_DRIVER_VERSION "5.04.00-k6"
Update driver version to 5.04.00-k6
qla4xxx: Update driver version to 5.04.00-k6 Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com> Reviewed-by: Mike Christie <6fe105eefab41990d7ec714c6c25ade3095cdb48@cs.wisc.edu> Signed-off-by: Christoph Hellwig <923f7720577207a44b32e59bbfbea59d27f1ae8e@lst.de>
C
mit
KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs
e36d31edd6020989bdb39f82dea54ef0e747e994
test/Driver/systemz-march.c
test/Driver/systemz-march.c
// Check that -march works for all supported targets. // RUN: not %clang -target s390x -S -emit-llvm -march=z9 %s -o - 2>&1 | FileCheck --check-prefix=CHECK-Z9 %s // RUN: %clang -target s390x -S -emit-llvm -march=z10 %s // RUN: %clang -target s390x -S -emit-llvm -march=z196 %s // RUN: %clang -target s390x -S -emit-llvm -march=zEC12 %s // CHECK-Z9: error: unknown target CPU 'z9' // CHECK-Z10: "-target-cpu" "z10" // CHECK-Z196: "-target-cpu" "z196" // CHECK-ZEC12: "-target-cpu" "zEC12" int x;
// Check that -march works for all supported targets. // RUN: not %clang -target s390x -S -emit-llvm -march=z9 %s -o - 2>&1 | FileCheck --check-prefix=CHECK-Z9 %s // RUN: %clang -target s390x -### -S -emit-llvm -march=z10 %s 2>&1 | FileCheck --check-prefix=CHECK-Z10 %s // RUN: %clang -target s390x -### -S -emit-llvm -march=z196 %s 2>&1 | FileCheck --check-prefix=CHECK-Z196 %s // RUN: %clang -target s390x -### -S -emit-llvm -march=zEC12 %s 2>&1 | FileCheck --check-prefix=CHECK-ZEC12 %s // CHECK-Z9: error: unknown target CPU 'z9' // CHECK-Z10: "-target-cpu" "z10" // CHECK-Z196: "-target-cpu" "z196" // CHECK-ZEC12: "-target-cpu" "zEC12" int x;
Fix test to actually check things.
Fix test to actually check things. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@186701 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
659d917acd2f5da137e506784acc3862225e7dad
Classes/NAPlaybackIndicatorView.h
Classes/NAPlaybackIndicatorView.h
// // NAPlaybackIndicatorView.h // PlaybackIndicator // // Created by Yuji Nakayama on 1/27/14. // Copyright (c) 2014 Yuji Nakayama. All rights reserved. // #import <UIKit/UIKit.h> @interface NAPlaybackIndicatorView : UIView - (void)startAnimating; - (void)stopAnimating; @property (nonatomic, readonly, getter=isAnimating) BOOL animating; @end
// // NAPlaybackIndicatorView.h // PlaybackIndicator // // Created by Yuji Nakayama on 1/27/14. // Copyright (c) 2014 Yuji Nakayama. All rights reserved. // #import <UIKit/UIKit.h> @interface NAPlaybackIndicatorView : UIView /** Starts the oscillating animation of the bars. */ - (void)startAnimating; /** Stop the oscillating animation of the bars. */ - (void)stopAnimating; /** Whether the receiver is animating. */ @property (nonatomic, readonly, getter=isAnimating) BOOL animating; @end
Add documentation comments for method
Add documentation comments for method
C
mit
yujinakayama/NAKPlaybackIndicatorView
ddb5650f2820329f818cc57859610db1ccc45434
src/hid2hci.c
src/hid2hci.c
#include <stdio.h> #include <libusb-1.0/libusb.h> int main (int argc, char ** argv) { char data[] = { 0x01, 0x05, 0, 0, 0, 0, 0, 0, 0 }; libusb_init(NULL); libusb_device_handle* h = libusb_open_device_with_vid_pid(NULL, 0x0a12, 0x100b); if (!h) { printf("No device in HID mode found\n"); } else { libusb_detach_kernel_driver(h, 0); printf("%d\n", libusb_claim_interface(h, 0)); libusb_control_transfer(h, LIBUSB_ENDPOINT_OUT|LIBUSB_REQUEST_TYPE_CLASS|LIBUSB_RECIPIENT_INTERFACE, LIBUSB_REQUEST_GET_CONFIGURATION, 0x0301, 0, data, 9, 10000); libusb_release_interface(h, 0); libusb_close(h); } libusb_exit(NULL); return 0; }
#include <stdio.h> #include <libusb-1.0/libusb.h> int main (int argc, char ** argv) { char data[] = { 0x01, 0x05, 0, 0, 0, 0, 0, 0, 0 }; libusb_init(NULL); /* using the default pskeys, devices from the factory are a12:100d in HID mode */ libusb_device_handle* h = libusb_open_device_with_vid_pid(NULL, 0x0a12, 0x100b); if (!h) /* Alternatively, a12:100c can be set by the dongler to prevent CSR's software stack from auto-switching to HCI mode */ h = libusb_open_device_with_vid_pid(NULL, 0x0a12, 0x100c); if (!h) { printf("No device in HID mode found\n"); } else { libusb_detach_kernel_driver(h, 0); printf("This should say 0: %d\n", libusb_claim_interface(h, 0)); libusb_control_transfer(h, LIBUSB_ENDPOINT_OUT|LIBUSB_REQUEST_TYPE_CLASS|LIBUSB_RECIPIENT_INTERFACE, LIBUSB_REQUEST_SET_CONFIGURATION, 0x0301, 0, data, 9, 10000); libusb_release_interface(h, 0); libusb_close(h); } libusb_exit(NULL); return 0; }
Fix the constants so it will work correctly. Also add the possibility of a different Product ID so the dongles can be set to a mode that Windows machines with the CSR drivers won't switch them to HCI mode.
Fix the constants so it will work correctly. Also add the possibility of a different Product ID so the dongles can be set to a mode that Windows machines with the CSR drivers won't switch them to HCI mode.
C
mit
wmertens/textblade-dongler,wmertens/textblade-dongler
a5091550c09ca51c39ea0f51fc3bc519ca45afac
test/test_c_bindings/test_c_bindings.c
test/test_c_bindings/test_c_bindings.c
/* ** Author(s): ** - Cedric GESTES <gestes@aldebaran-robotics.com> ** ** Copyright (C) 2010 Aldebaran Robotics */ #include <qi/qi.h> #include <stdio.h> int main(int argc, char **argv) { qi_client_t *client = qi_client_create("simplecli", argv[1]); qi_message_t *message = qi_message_create(); qi_message_t *ret = qi_message_create(); qi_message_write_string(message, "master.locateService::s:s"); qi_message_write_string(message, "master.listServices::{ss}:"); qi_client_call(client, "master.locateService::s:s", message, ret); char *result = qi_message_read_string(ret); printf("locate returned: %s\n", result); return 0; }
/* ** Author(s): ** - Cedric GESTES <gestes@aldebaran-robotics.com> ** ** Copyright (C) 2010 Aldebaran Robotics */ #include <qi/qi.h> #include <stdio.h> int main(int argc, char **argv) { char *result; qi_client_t *client = qi_client_create("simplecli", argv[1]); qi_message_t *message = qi_message_create(); qi_message_t *ret = qi_message_create(); qi_message_write_string(message, "master.locateService::s:s"); qi_message_write_string(message, "master.listServices::{ss}:"); qi_client_call(client, "master.locateService::s:s", message, ret); result = qi_message_read_string(ret); printf("locate returned: %s\n", result); return 0; }
Make c bindings compile on strict compilers
Make c bindings compile on strict compilers
C
bsd-3-clause
aldebaran/libqi,aldebaran/libqi,aldebaran/libqi-java,vbarbaresi/libqi,bsautron/libqi,aldebaran/libqi-java,aldebaran/libqi,aldebaran/libqi-java
f3cfdda7d9e7e0421189713262283d8bc379695f
Classes/SloppySwiperViewControllerProtocol.h
Classes/SloppySwiperViewControllerProtocol.h
// // SloppySwiperViewControllerProtocol.h // Pods // // Created by Yu Sugawara on 7/8/15. // // #import <UIKit/UIKit.h> @protocol SloppySwiperViewControllerProtocol <NSObject> - (UIBarStyle)ssw_navigationBarStyle; - (UIColor *)ssw_navigationBarColor; - (UIColor *)ssw_navigationBarItemColor; - (UIImage *)ssw_navigationBarShadowImage; @end
// // SloppySwiperViewControllerProtocol.h // Pods // // Created by Yu Sugawara on 7/8/15. // // #import <UIKit/UIKit.h> @protocol SloppySwiperViewControllerProtocol <NSObject> - (UIBarStyle)ssw_navigationBarStyle; - (UIColor *)ssw_navigationBarColor; - (UIColor *)ssw_navigationBarItemColor; @optional - (UIImage *)ssw_navigationBarShadowImage; @end
Change the ssw_navigationBarShadowImage to the @optional
Change the ssw_navigationBarShadowImage to the @optional
C
mit
yusuga/SloppySwiper
050be884232cb5f96248ff753b5b4e321f5a8e94
lib/Common/ChakraCoreVersion.h
lib/Common/ChakraCoreVersion.h
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- #pragma once #define CHAKRA_CORE_MAJOR_VERSION 1 #define CHAKRA_CORE_MINOR_VERSION 2 #define CHAKRA_CORE_VERSION_RELEASE 0 #define CHAKRA_CORE_VERSION_PRERELEASE 0 #define CHAKRA_CORE_VERSION_RELEASE_QFE 0 #define CHAKRA_VERSION_RELEASE 0 // NOTE: need to update the GUID in ByteCodeCacheReleaseFileVersion.h as well
//------------------------------------------------------------------------------------------------------- // Copyright (C) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE.txt file in the project root for full license information. //------------------------------------------------------------------------------------------------------- #pragma once #define CHAKRA_CORE_MAJOR_VERSION 1 #define CHAKRA_CORE_MINOR_VERSION 3 #define CHAKRA_CORE_VERSION_RELEASE 0 #define CHAKRA_CORE_VERSION_PRERELEASE 0 #define CHAKRA_CORE_VERSION_RELEASE_QFE 0 #define CHAKRA_VERSION_RELEASE 0 // NOTE: need to update the GUID in ByteCodeCacheReleaseFileVersion.h as well
Update master branch version to 1.3
Update master branch version to 1.3
C
mit
Microsoft/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore,Microsoft/ChakraCore,mrkmarron/ChakraCore,Microsoft/ChakraCore
b662250670d69e6b1a45aae8de67f6eb48d37b61
src/worker/windows/subscription.h
src/worker/windows/subscription.h
#ifndef SUBSCRIPTION_H #define SUBSCRIPTION_H #include <memory> #include <sstream> #include <string> #include "../../message.h" #include "../../result.h" class WindowsWorkerPlatform; class Subscription { public: Subscription(ChannelID channel, HANDLE root, const std::wstring &path, bool recursive, WindowsWorkerPlatform *platform); ~Subscription(); Result<bool> schedule(LPOVERLAPPED_COMPLETION_ROUTINE fn); Result<> use_network_size(); BYTE *get_written(DWORD written_size); Result<std::string> get_root_path(); std::wstring make_absolute(const std::wstring &sub_path); Result<> stop(const CommandID command); CommandID get_command_id() const { return command; } ChannelID get_channel() const { return channel; } WindowsWorkerPlatform *get_platform() const { return platform; } bool is_terminating() const { return terminating; } private: CommandID command; ChannelID channel; WindowsWorkerPlatform *platform; std::wstring path; HANDLE root; OVERLAPPED overlapped; bool recursive; bool terminating; DWORD buffer_size; std::unique_ptr<BYTE[]> buffer; std::unique_ptr<BYTE[]> written; }; #endif
#ifndef SUBSCRIPTION_H #define SUBSCRIPTION_H #include <memory> #include <sstream> #include <string> #include "../../message.h" #include "../../result.h" class WindowsWorkerPlatform; class Subscription { public: Subscription(ChannelID channel, HANDLE root, const std::wstring &path, bool recursive, WindowsWorkerPlatform *platform); ~Subscription(); Result<bool> schedule(LPOVERLAPPED_COMPLETION_ROUTINE fn); Result<> use_network_size(); BYTE *get_written(DWORD written_size); Result<std::string> get_root_path(); std::wstring make_absolute(const std::wstring &sub_path); Result<> stop(const CommandID command); const CommandID &get_command_id() const { return command; } const ChannelID &get_channel() const { return channel; } WindowsWorkerPlatform *get_platform() const { return platform; } const bool &is_recursive() const { return recursive; } const bool &is_terminating() const { return terminating; } private: CommandID command; ChannelID channel; WindowsWorkerPlatform *platform; std::wstring path; HANDLE root; OVERLAPPED overlapped; bool recursive; bool terminating; DWORD buffer_size; std::unique_ptr<BYTE[]> buffer; std::unique_ptr<BYTE[]> written; }; #endif
Return const & from getters
Return const & from getters
C
mit
atom/watcher,atom/watcher,atom/watcher,atom/watcher,atom/watcher
622c8f06325d89bdda593499323b4c056c699914
7segments.c
7segments.c
#define L for(char*c=a[1],y;*c;)printf("%c%c%c%c",(y="w$]m.k{%\177o"[*c++-48])&u/4?33:32,y&u?95:32,y&u/2?33:32,*c?32:10);u*=8; main(int u,char**a){u=1;L;L;L}
#define L for(char*c=a[1],y;*c;)printf("%c%c%c%c",(y="w$]m.k{%o"[*c++-48])&u/4?33:32,y&u?95:32,y&u/2?33:32,*c?32:10);u*=8; main(int u,char**a){u=1;L;L;L}
Use version with replaced \177
Use version with replaced \177
C
mit
McZonk/7segements,McZonk/7segements
ecefcf452f3941ca117f52da61f8a8cc79a1b573
7segments.c
7segments.c
main(int u,char**a){for(;u<129;u*=8){for(char*c=a[1],y;*c;)printf("%c%c%c ",(y="$ֶ<&"[*c++-48])&u/2?33:32,y&u?95:32,y&u/4?33:32);puts("");}}
main(int u,char**a){for(;u<129;u*=8)for(char*c=a[1],y;*c;)printf("%c%c%c%c",(y="$ֶ<&"[*c++-48])&u/2?33:32,y&u?95:32,y&u/4?33:32,*c?32:10);}
Use printf without puts again to save one more byte
Use printf without puts again to save one more byte
C
mit
McZonk/7segements,McZonk/7segements
af63433f531926143f4dfce63f25ee3b09e81cc3
FreshAir/RZFReleaseNotes.h
FreshAir/RZFReleaseNotes.h
// // RZFReleaseNotes.h // FreshAir // // Created by Brian King on 1/26/16. // Copyright © 2016 Raizlabs. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @class RZFRelease, RZFFeature; @interface RZFReleaseNotes : NSObject + (instancetype)releaseNotesWithURL:(NSURL *)URL error:(NSError **)error; + (instancetype)releaseNotesWithData:(NSData *)data error:(NSError **)error; @property (strong, nonatomic) NSArray<RZFRelease *> *releases; @property (strong, nonatomic) NSURL *upgradeURL; @property (strong, nonatomic) NSString * __nullable minimumVersion; @property (strong, nonatomic, readonly) NSArray<RZFFeature *> *features; - (BOOL)isUpgradeRequiredForVersion:(NSString *)version; - (NSArray<RZFRelease *> *)releasesSupportingSystemVersion:(NSString *)systemVersion; - (NSArray<RZFFeature *> *)featuresFromVersion:(NSString *)lastVersion toVersion:(NSString *)currentVersion; @end NS_ASSUME_NONNULL_END
// // RZFReleaseNotes.h // FreshAir // // Created by Brian King on 1/26/16. // Copyright © 2016 Raizlabs. All rights reserved. // #import <Foundation/Foundation.h> NS_ASSUME_NONNULL_BEGIN @class RZFRelease, RZFFeature; @interface RZFReleaseNotes : NSObject + (instancetype)releaseNotesWithURL:(NSURL *)URL error:(NSError **)error; + (instancetype)releaseNotesWithData:(NSData *)data error:(NSError **)error; @property (strong, nonatomic) NSArray<RZFRelease *> *releases; @property (strong, nonatomic) NSURL *upgradeURL; @property (strong, nonatomic, nullable) NSString *minimumVersion; @property (strong, nonatomic, readonly) NSArray<RZFFeature *> *features; - (BOOL)isUpgradeRequiredForVersion:(NSString *)version; - (NSArray<RZFRelease *> *)releasesSupportingSystemVersion:(NSString *)systemVersion; - (NSArray<RZFFeature *> *)featuresFromVersion:(NSString *)lastVersion toVersion:(NSString *)currentVersion; @end NS_ASSUME_NONNULL_END
Move nullable to the property attributes
Move nullable to the property attributes
C
mit
Raizlabs/FreshAir,Raizlabs/FreshAir
b35873a38c56dad6c5ff2d982e5ad0ad3532253b
pt_error.c
pt_error.c
#include <assert.h> #include <string.h> #include <errno.h> #include "pt_error.h" static struct { const enum pt_error err; const char* const str; } pt_error_map[PT_LAST] = { { PT_SUCCESS, "Success" }, }; static char* pt_strncpy(char* dst, const char* src, size_t n) { if(n > 0) { int len = strnlen(src, n); (void) memcpy(dst, src, len - 1); dst[len] = '\0'; } return dst; } int pt_strerror_r(enum pt_error err, char* buf, size_t len) { int ret = 0; if(len > 0) { if(err < PT_LAST && err >= PT_SUCCESS) { assert(err == pt_error_map[err].err); (void) pt_strncpy(buf, pt_error_map[err].str, len); if(strlen(pt_error_map[err].str) >= len) { errno = EOVERFLOW; ret = 1; } } else { errno = EINVAL; ret = 1; } } return ret; }
#include <assert.h> #include <string.h> #include <errno.h> #include "pt_error.h" static struct { const enum pt_error err; const char* const str; } pt_error_map[PT_LAST] = { { PT_SUCCESS, "Success" }, }; static char* pt_strncpy(char* dst, const char* src, size_t n) { if(n > 0) { int len = strnlen(src, n); (void) memcpy(dst, src, len - 1); dst[len] = '\0'; } return dst; } int pt_strerror_r(enum pt_error err, char* buf, size_t len) { int ret = 0; if(len > 0) { if(err < PT_LAST && err >= PT_SUCCESS) { assert(err == pt_error_map[err].err); (void) pt_strncpy(buf, pt_error_map[err].str, len); if(strlen(pt_error_map[err].str) >= len) { errno = ERANGE; ret = 1; } } else { errno = EINVAL; ret = 1; } } return ret; }
Change to a more standard errno in pt_strerror_r()
Change to a more standard errno in pt_strerror_r() Reformat pt_error.c
C
apache-2.0
byannoni/qthreads
a2620cb6d12c43535149bf2976c3d6c54f1c7e38
file4.c
file4.c
file4.c - r1 Test checkin in master1-updated Test checkin in master2
file4.c - r1 Test checkin in master1-updated - updated2 Test checkin in master2 Test checkin in master3
Test commit in feature branch
Test commit in feature branch
C
apache-2.0
shahedmolla/test
35947b1d45a735b3fc4ed110302ea31e7850e625
Pod/Classes/BFTaskCenter.h
Pod/Classes/BFTaskCenter.h
// // BFTaskCenter.h // Pods // // Created by Superbil on 2015/8/22. // // #import "Bolts.h" @interface BFTaskCenter : NSObject /*! A block that can act as a continuation for a task. */ typedef void (^BFTaskCenterBlock)(BFTask * _Nonnull task); + (nonnull instancetype)defaultCenter; - (instancetype)initWithExecutor:(BFExecutor *)executor; - (nullable id)addTaskBlockToCallbacks:(nonnull BFTaskCenterBlock)taskBlock forKey:(nonnull NSString *)key; - (void)removeTaskBlock:(nonnull id)taskBlock forKey:(nonnull NSString *)key; - (void)clearAllCallbacksForKey:(nonnull NSString *)key; - (void)sendToCallbacksWithKey:(nonnull NSString *)key result:(nullable id)result; - (void)sendToCallbacksWithKey:(nonnull NSString *)key error:(nonnull NSError *)error; - (nullable BFTaskCompletionSource *)sourceOfSendToCallbacksForKey:(nonnull NSString *)key executor:(nonnull BFExecutor *)executor cancellationToken:(nullable BFCancellationToken *)cancellationToken; @end
// // BFTaskCenter.h // Pods // // Created by Superbil on 2015/8/22. // // #import "Bolts.h" @interface BFTaskCenter : NSObject /*! A block that can act as a continuation for a task. */ typedef void (^BFTaskCenterBlock)(BFTask * _Nonnull task); + (nullable instancetype)defaultCenter; - (nullable instancetype)initWithExecutor:(nonnull BFExecutor *)executor; - (nullable id)addTaskBlockToCallbacks:(nonnull BFTaskCenterBlock)taskBlock forKey:(nonnull NSString *)key; - (void)removeTaskBlock:(nonnull id)taskBlock forKey:(nonnull NSString *)key; - (void)clearAllCallbacksForKey:(nonnull NSString *)key; - (void)sendToCallbacksWithKey:(nonnull NSString *)key result:(nullable id)result; - (void)sendToCallbacksWithKey:(nonnull NSString *)key error:(nonnull NSError *)error; - (nullable BFTaskCompletionSource *)sourceOfSendToCallbacksForKey:(nonnull NSString *)key executor:(nonnull BFExecutor *)executor cancellationToken:(nullable BFCancellationToken *)cancellationToken; @end
Fix compiler warning for nullable check
Fix compiler warning for nullable check
C
mit
Superbil/BFTaskCenter,Superbil/BFTaskCenter
3df46ce3e3b10cd37565184b8c78de882194da56
cpp/turbodbc/Library/turbodbc/type_code.h
cpp/turbodbc/Library/turbodbc/type_code.h
#pragma once namespace turbodbc { /** * This enumeration assigns integer values to certain database types */ enum class type_code : int { boolean = 0, ///< boolean type integer = 10, ///< integer types floating_point = 20, ///< floating point types string = 30, ///< string types timestamp = 40, ///< timestamp types date = 41 ///< date type }; }
#pragma once namespace turbodbc { /** * This enumeration assigns integer values to certain database types */ enum class type_code : int { boolean = 0, ///< boolean type integer = 10, ///< integer types floating_point = 20, ///< floating point types string = 30, ///< string types unicode = 31, ///< unicode types timestamp = 40, ///< timestamp types date = 41 ///< date type }; }
Add unicode to supported type codes
Add unicode to supported type codes
C
mit
blue-yonder/turbodbc,blue-yonder/turbodbc,blue-yonder/turbodbc,blue-yonder/turbodbc
d82bf2d86f3e4185b3815e56f23ca0e07c15541d
test/CodeGen/stdcall-fastcall.c
test/CodeGen/stdcall-fastcall.c
// RUN: %clang_cc1 -emit-llvm < %s | grep 'fastcallcc' | count 6 // RUN: %clang_cc1 -emit-llvm < %s | grep 'stdcallcc' | count 6 void __attribute__((fastcall)) f1(void); void __attribute__((stdcall)) f2(void); void __attribute__((fastcall)) f3(void) { f1(); } void __attribute__((stdcall)) f4(void) { f2(); } // PR5280 void (__attribute__((fastcall)) *pf1)(void) = f1; void (__attribute__((stdcall)) *pf2)(void) = f2; void (__attribute__((fastcall)) *pf3)(void) = f3; void (__attribute__((stdcall)) *pf4)(void) = f4; int main(void) { f3(); f4(); pf1(); pf2(); pf3(); pf4(); return 0; }
// RUN: %clang_cc1 -emit-llvm < %s | FileCheck %s void __attribute__((fastcall)) f1(void); void __attribute__((stdcall)) f2(void); void __attribute__((fastcall)) f3(void) { // CHECK: define x86_fastcallcc void @f3() f1(); // CHECK: call x86_fastcallcc void @f1() } void __attribute__((stdcall)) f4(void) { // CHECK: define x86_stdcallcc void @f4() f2(); // CHECK: call x86_stdcallcc void @f2() } // PR5280 void (__attribute__((fastcall)) *pf1)(void) = f1; void (__attribute__((stdcall)) *pf2)(void) = f2; void (__attribute__((fastcall)) *pf3)(void) = f3; void (__attribute__((stdcall)) *pf4)(void) = f4; int main(void) { f3(); f4(); // CHECK: call x86_fastcallcc void @f3() // CHECK: call x86_stdcallcc void @f4() pf1(); pf2(); pf3(); pf4(); // CHECK: call x86_fastcallcc void %tmp() // CHECK: call x86_stdcallcc void %tmp1() // CHECK: call x86_fastcallcc void %tmp2() // CHECK: call x86_stdcallcc void %tmp3() return 0; }
Convert this test to FileCheck instead of grepping LLVM IR.
Convert this test to FileCheck instead of grepping LLVM IR. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@95428 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
738a7cc75fe112630f29ed08ce68546ac1939728
server/packet/packet_entity_equipment.c
server/packet/packet_entity_equipment.c
#include "server/client.h" #include "server/packet.h" #include "blocks/items.h" void packet_send_entity_equipment(struct client *client, struct client *c, uint16_t slot, struct item *item, uint16_t damage) { bedrock_packet packet; struct item_stack stack; stack.id = item->id; stack.count = 1; stack.metadata = damage; packet_init(&packet, SERVER_ENTITY_EQUIPMENT); packet_pack_int(&packet, &c->id, sizeof(c->id)); packet_pack_int(&packet, &slot, sizeof(slot)); packet_pack_slot(&packet, &stack); client_send_packet(client, &packet); }
#include "server/client.h" #include "server/packet.h" #include "blocks/items.h" void packet_send_entity_equipment(struct client *client, struct client *c, uint16_t slot, struct item *item, uint16_t damage) { bedrock_packet packet; struct item_stack stack; stack.id = item->id ? item->id : -1; stack.count = 1; stack.metadata = damage; packet_init(&packet, SERVER_ENTITY_EQUIPMENT); packet_pack_int(&packet, &c->id, sizeof(c->id)); packet_pack_int(&packet, &slot, sizeof(slot)); packet_pack_slot(&packet, &stack); client_send_packet(client, &packet); }
Fix client crash from changing item to nothing
Fix client crash from changing item to nothing
C
bsd-2-clause
Adam-/bedrock,Adam-/bedrock
b28077d75ac2c1d016ed0be4be02d9dd3ea05fda
Apptentive/Apptentive/Misc/ApptentiveJSONSerialization.h
Apptentive/Apptentive/Misc/ApptentiveJSONSerialization.h
// // ApptentiveJSONSerialization.h // Apptentive // // Created by Andrew Wooster on 6/22/13. // Copyright (c) 2013 Apptentive, Inc. All rights reserved. // #import <Foundation/Foundation.h> extern NSInteger ApptentiveJSONDeserializationErrorCode; @interface ApptentiveJSONSerialization : NSObject + (NSData *)dataWithJSONObject:(id)obj options:(NSJSONWritingOptions)opt error:(NSError **)error; + (id)JSONObjectWithData:(NSData *)data error:(NSError **)error; @end
// // ApptentiveJSONSerialization.h // Apptentive // // Created by Andrew Wooster on 6/22/13. // Copyright (c) 2013 Apptentive, Inc. All rights reserved. // #import <Foundation/Foundation.h> extern NSInteger ApptentiveJSONDeserializationErrorCode; extern NSInteger ApptentiveJSONSerializationErrorCode; @interface ApptentiveJSONSerialization : NSObject + (NSData *)dataWithJSONObject:(id)obj options:(NSJSONWritingOptions)opt error:(NSError **)error; + (id)JSONObjectWithData:(NSData *)data error:(NSError **)error; @end
Add serialization error code extern
Add serialization error code extern
C
bsd-3-clause
apptentive/apptentive-ios,apptentive/apptentive-ios,apptentive/apptentive-ios
6991c2dd84060f8e7375966d4e488a359b42d43a
src/AllocationPool.h
src/AllocationPool.h
#pragma once template<class T, size_t BufferSize, class StarvationCallbacks> class AllocationPool { public: ~AllocationPool() { while (!m_FreeList.empty()) { delete m_FreeList.front(); m_FreeList.pop_front(); } } T* Allocate() { if (m_FreeList.Size() <= BufferSize) { try { return new T; } catch (std::bad_alloc& ex) { if (m_FreeList.size() == BufferSize) { StarvationCallbacks.OnStartingUsingBuffer(); } else if (m_FreeList.empty()) { StarvationCallbacks.OnBufferEmpty(); // Try again until the memory is avalable return Allocate(); } } } T* ret = m_FreeList.front(); m_FreeList.pop_front(); return ret; } void Free(T* ptr) { m_FreeList.push_front(ptr); if (m_FreeList.size() == BufferSize) { StarvationCallbacks.OnStopUsingBuffer(); } } private: std::list<T*> m_FreeList; }
#pragma once template<class T, size_t BufferSize, class StarvationCallbacks> class AllocationPool { public: ~AllocationPool() { while (!m_FreeList.empty()) { delete m_FreeList.front(); m_FreeList.pop_front(); } } T* Allocate() { if (m_FreeList.Size() <= BufferSize) { try { return new T; } catch (std::bad_alloc& ex) { if (m_FreeList.size() == BufferSize) { StarvationCallbacks.OnStartingUsingBuffer(); } else if (m_FreeList.empty()) { StarvationCallbacks.OnBufferEmpty(); // Try again until the memory is avalable return Allocate(); } } } // placement new, used to initalize the object T* ret = new (m_FreeList.front()) T; m_FreeList.pop_front(); return ret; } void Free(T* ptr) { // placement destruct. ptr->~T(); m_FreeList.push_front(ptr); if (m_FreeList.size() == BufferSize) { StarvationCallbacks.OnStopUsingBuffer(); } } private: std::list<void *> m_FreeList; }
Use placement new to initalise objects
Use placement new to initalise objects
C
apache-2.0
Tri125/MCServer,kevinr/cuberite,bendl/cuberite,Fighter19/cuberite,Fighter19/cuberite,Altenius/cuberite,electromatter/cuberite,Altenius/cuberite,zackp30/cuberite,birkett/MCServer,Howaner/MCServer,SamOatesPlugins/cuberite,ionux/MCServer,zackp30/cuberite,johnsoch/cuberite,zackp30/cuberite,nounoursheureux/MCServer,birkett/cuberite,birkett/MCServer,thetaeo/cuberite,thetaeo/cuberite,johnsoch/cuberite,nicodinh/cuberite,mmdk95/cuberite,mjssw/cuberite,Haxi52/cuberite,ionux/MCServer,QUSpilPrgm/cuberite,mjssw/cuberite,birkett/cuberite,Fighter19/cuberite,mmdk95/cuberite,linnemannr/MCServer,linnemannr/MCServer,tonibm19/cuberite,SamOatesPlugins/cuberite,nichwall/cuberite,guijun/MCServer,thetaeo/cuberite,Schwertspize/cuberite,Tri125/MCServer,guijun/MCServer,Haxi52/cuberite,mmdk95/cuberite,Howaner/MCServer,bendl/cuberite,Tri125/MCServer,guijun/MCServer,bendl/cuberite,nounoursheureux/MCServer,ionux/MCServer,HelenaKitty/EbooMC,HelenaKitty/EbooMC,SamOatesPlugins/cuberite,ionux/MCServer,Altenius/cuberite,marvinkopf/cuberite,QUSpilPrgm/cuberite,thetaeo/cuberite,nichwall/cuberite,nevercast/cuberite,tonibm19/cuberite,linnemannr/MCServer,kevinr/cuberite,Tri125/MCServer,Tri125/MCServer,zackp30/cuberite,nichwall/cuberite,electromatter/cuberite,mc-server/MCServer,birkett/MCServer,electromatter/cuberite,jammet/MCServer,HelenaKitty/EbooMC,nicodinh/cuberite,linnemannr/MCServer,mmdk95/cuberite,Altenius/cuberite,nicodinh/cuberite,Haxi52/cuberite,tonibm19/cuberite,birkett/MCServer,guijun/MCServer,Haxi52/cuberite,nichwall/cuberite,thetaeo/cuberite,thetaeo/cuberite,bendl/cuberite,marvinkopf/cuberite,jammet/MCServer,mc-server/MCServer,mjssw/cuberite,QUSpilPrgm/cuberite,nicodinh/cuberite,HelenaKitty/EbooMC,Fighter19/cuberite,Schwertspize/cuberite,Schwertspize/cuberite,birkett/cuberite,Haxi52/cuberite,tonibm19/cuberite,QUSpilPrgm/cuberite,tonibm19/cuberite,Howaner/MCServer,guijun/MCServer,Frownigami1/cuberite,mjssw/cuberite,marvinkopf/cuberite,tonibm19/cuberite,nichwall/cuberite,jammet/MCServer,mc-server/MCServer,johnsoch/cuberite,Howaner/MCServer,ionux/MCServer,nicodinh/cuberite,SamOatesPlugins/cuberite,mjssw/cuberite,Altenius/cuberite,marvinkopf/cuberite,mc-server/MCServer,kevinr/cuberite,kevinr/cuberite,zackp30/cuberite,mmdk95/cuberite,electromatter/cuberite,nounoursheureux/MCServer,nounoursheureux/MCServer,Tri125/MCServer,mjssw/cuberite,jammet/MCServer,bendl/cuberite,Frownigami1/cuberite,kevinr/cuberite,nicodinh/cuberite,birkett/cuberite,marvinkopf/cuberite,nichwall/cuberite,Howaner/MCServer,mc-server/MCServer,Schwertspize/cuberite,johnsoch/cuberite,nevercast/cuberite,birkett/MCServer,jammet/MCServer,johnsoch/cuberite,QUSpilPrgm/cuberite,birkett/cuberite,HelenaKitty/EbooMC,ionux/MCServer,linnemannr/MCServer,kevinr/cuberite,birkett/cuberite,nounoursheureux/MCServer,Howaner/MCServer,mmdk95/cuberite,QUSpilPrgm/cuberite,nevercast/cuberite,electromatter/cuberite,birkett/MCServer,Fighter19/cuberite,jammet/MCServer,Schwertspize/cuberite,nevercast/cuberite,guijun/MCServer,linnemannr/MCServer,Frownigami1/cuberite,Frownigami1/cuberite,Haxi52/cuberite,nounoursheureux/MCServer,zackp30/cuberite,nevercast/cuberite,electromatter/cuberite,marvinkopf/cuberite,nevercast/cuberite,Frownigami1/cuberite,SamOatesPlugins/cuberite,mc-server/MCServer,Fighter19/cuberite
3c3a26b636db7c29db9746b34493bc8f389583d3
corrcheck.h
corrcheck.h
#ifndef CORRCHECK_H #define CORRCHECK_H #include <cassert> #include <cstdio> #include <cstdlib> #include <dirent.h> #include <iostream> #include <map> #include <openssl/ssl.h> #include <string> #include <sys/stat.h> #include <vector> #include "corrcheck_defines.h" #include "File.h" int create_database(const std::string& directory); int update_database(); int verify_database(const std::string& directory); int write_database(const std::string& directory, const File* file_list); #endif
#ifndef CORRCHECK_H #define CORRCHECK_H #include <cassert> #include <cstdio> #include <cstdlib> #include <dirent.h> #include <iostream> #include <map> #include <openssl/ssl.h> #include <string> #include <sys/stat.h> #include <vector> #include "corrcheck_defines.h" #include "File.h" /* Create a .corrcheckdb of the files in a directory given by 'directory'. Returns SUCCESS (0) if no errors occur; returns FAILURE (1) otherwise. */ int create_database(const std::string& directory); /* ---NOT IMPLEMENTED--- Rewrite the .corrcheckdb of the files in a directory while notifying of apparent changes since creation or last update. */ int update_database(); /* Check the .corrcheckdb of the files in a directory given by 'directory' and notify of apparent changes since creation or last update. This function does not modify the .corrcheckdb file. */ int verify_database(const std::string& directory); /* Write a .corrcheckdb in the directory given by 'directory' based on the list of files given as 'file_list', overwriting any that may already be present. */ int write_database(const std::string& directory, const File* file_list); #endif
Write more brief function descriptions.
Write more brief function descriptions.
C
mit
mdclyburn/corrcheck,mdclyburn/corrcheck
d537d6c355be1a51bbb808e9da214f5595d75f3d
ios/web/public/browser_state.h
ios/web/public/browser_state.h
// Copyright 2013 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 IOS_WEB_PUBLIC_BROWSER_STATE_H_ #define IOS_WEB_PUBLIC_BROWSER_STATE_H_ #include "base/supports_user_data.h" namespace net { class URLRequestContextGetter; } namespace web { // This class holds the context needed for a browsing session. // It lives on the UI thread. All these methods must only be called on the UI // thread. class BrowserState : public base::SupportsUserData { public: ~BrowserState() override; // Return whether this BrowserState is incognito. Default is false. virtual bool IsOffTheRecord() const = 0; // Returns the request context information associated with this // BrowserState. virtual net::URLRequestContextGetter* GetRequestContext() = 0; protected: BrowserState(); }; } // namespace web #endif // IOS_WEB_PUBLIC_BROWSER_STATE_H_
// Copyright 2013 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 IOS_WEB_PUBLIC_BROWSER_STATE_H_ #define IOS_WEB_PUBLIC_BROWSER_STATE_H_ #include "base/supports_user_data.h" namespace base { class FilePath; } namespace net { class URLRequestContextGetter; } namespace web { // This class holds the context needed for a browsing session. // It lives on the UI thread. All these methods must only be called on the UI // thread. class BrowserState : public base::SupportsUserData { public: ~BrowserState() override; // Return whether this BrowserState is incognito. Default is false. virtual bool IsOffTheRecord() const = 0; // Retrieves the path where the BrowserState data is stored. virtual base::FilePath GetPath() const = 0; // Returns the request context information associated with this // BrowserState. virtual net::URLRequestContextGetter* GetRequestContext() = 0; protected: BrowserState(); }; } // namespace web #endif // IOS_WEB_PUBLIC_BROWSER_STATE_H_
Expand web::BrowserState to add GetPath() method
Expand web::BrowserState to add GetPath() method Add a method to web::BrowserState returning the path where the BrowserState data is stored. BUG=429756 Review URL: https://codereview.chromium.org/740353002 Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#305191}
C
bsd-3-clause
krieger-od/nwjs_chromium.src,dednal/chromium.src,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ltilve/chromium,krieger-od/nwjs_chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,Fireblend/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Pluto-tv/chromium-crosswalk,dednal/chromium.src,fujunwei/chromium-crosswalk,ltilve/chromium,Chilledheart/chromium,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,ltilve/chromium,M4sse/chromium.src,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dednal/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,jaruba/chromium.src,axinging/chromium-crosswalk,Fireblend/chromium-crosswalk,ltilve/chromium,dushu1203/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,Just-D/chromium-1,Jonekee/chromium.src,dednal/chromium.src,Chilledheart/chromium,ltilve/chromium,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,ltilve/chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,Jonekee/chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,Just-D/chromium-1,Just-D/chromium-1,M4sse/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,ltilve/chromium,dushu1203/chromium.src,jaruba/chromium.src,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk,dednal/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,Chilledheart/chromium,markYoungH/chromium.src,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,M4sse/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,dushu1203/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,chuan9/chromium-crosswalk,Chilledheart/chromium,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,TheTypoMaster/chromium-crosswalk,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,fujunwei/chromium-crosswalk,Jonekee/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,jaruba/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,chuan9/chromium-crosswalk,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,chuan9/chromium-crosswalk,ltilve/chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,Just-D/chromium-1,dednal/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,Just-D/chromium-1,Pluto-tv/chromium-crosswalk
410ca053a96733f7ce48010c50c91f7104967f57
includes/score.h
includes/score.h
#ifndef SCORE_H_INCLUDED #define SCORE_H_INCLUDED #define FOOD1_SCORE 15 //Titik #define FOOD2_SCORE 100 //Sedap Malam #define FOOD3_SCORE 300 //Menyan #define FOOD4_SCORE 500 //Melati #define FOOD5_SCORE 700 //Kopi Hitam typedef struct{ char *name; int score; int lives; int foodCount; pacmanController peciman; ghostController ghost1; ghostController ghost2; ghostController ghost3; ghostController ghost4; } playerControl; void initScore(playerControl *player); void initLives(playerControl *player); void incScore(int food, playerControl *player); void eatFood(playerControl *player); void incLives(playerControl *player, int *liveGiven); int randomise(int min, int max); int foodType(int x); void spawnFood(MapController *map, int posX, int posY); void despawnFood(MapController *map, int posX, int posY); void randFoodPos(); void drawNumber(int x, int posX, int posY, int posisi); void printScore(int score, int posX, int posY); void printLives(int lives, int posX, int posY); #endif // SCORE_H_INCLUDED
#ifndef SCORE_H_INCLUDED #define SCORE_H_INCLUDED #define FOOD1_SCORE 15 //Titik #define FOOD2_SCORE 100 //Sedap Malam #define FOOD3_SCORE 300 //Menyan #define FOOD4_SCORE 500 //Melati #define FOOD5_SCORE 700 //Kopi Hitam typedef struct{ char *name; int score; int lives; int foodCount; int level; pacmanController peciman; ghostController ghost1; ghostController ghost2; ghostController ghost3; ghostController ghost4; } playerControl; void initScore(playerControl *player); void initLives(playerControl *player); void incScore(int food, playerControl *player); void eatFood(playerControl *player); void incLives(playerControl *player, int *liveGiven); int randomise(int min, int max); int foodType(int x); void spawnFood(MapController *map, int posX, int posY); void despawnFood(MapController *map, int posX, int posY); void randFoodPos(); void drawNumber(int x, int posX, int posY, int posisi); void printScore(int score, int posX, int posY); void printLives(int lives, int posX, int posY); #endif // SCORE_H_INCLUDED
Add level field in playercontroller
Add level field in playercontroller
C
mit
syamcode/PecimenGame,syamcode/PecimenGame
0ae863aa45b829a1030a0917e7e4f8dc8274aac6
src/bitwise.h
src/bitwise.h
#pragma once #include <cstdint> inline uint16_t compose_bytes(const uint8_t low, const uint8_t high) { return (high << 8) + low; }; inline bool check_bit(const uint8_t value, int bit) { return (value & (1 << bit)) != 0; }; inline uint8_t set_bit(const uint8_t value, int bit) { return static_cast<uint8_t>(value | (1 << bit)); }
#pragma once #include <cstdint> inline uint16_t compose_bytes(const uint8_t low, const uint8_t high) { return (high << 8) + low; } inline bool check_bit(const uint8_t value, int bit) { return (value & (1 << bit)) != 0; } inline uint8_t set_bit(const uint8_t value, int bit) { return static_cast<uint8_t>(value | (1 << bit)); }
Remove extraneous ; on function definition
Remove extraneous ; on function definition
C
bsd-3-clause
jgilchrist/emulator,jgilchrist/emulator,jgilchrist/emulator
a64aac47da8b3bf66b2fd3cf973508a8ce7d23a8
test/CodeGen/ms-inline-asm-EVEN.c
test/CodeGen/ms-inline-asm-EVEN.c
// RUN: %clang_cc1 %s -triple i386-unknown-unknown -fasm-blocks -emit-llvm -o - | FileCheck %s // CHECK: .byte 64 // CHECK: .byte 64 // CHECK: .byte 64 // CHECK: .even void t1() { __asm { .byte 64 .byte 64 .byte 64 EVEN mov eax, ebx } }
// REQUIRES: x86-registered-target // RUN: %clang_cc1 %s -triple i386-apple-darwin10 -fasm-blocks -emit-llvm -o - | FileCheck %s // CHECK: .byte 64 // CHECK: .byte 64 // CHECK: .byte 64 // CHECK: .even void t1() { __asm { .byte 64 .byte 64 .byte 64 EVEN mov eax, ebx } }
Add support for MS 'EVEN' directive
[fixup][X86][inline-asm] Add support for MS 'EVEN' directive refining tested targets resolution, to amend failures caused by rL299454 git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@299459 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
5db7606fc0cc7b83c145f4d861efb0ba0ad4c2d0
src/gethost.c
src/gethost.c
#include <stdio.h> #ifdef WIN32 #include <io.h> #include <fcntl.h> #endif int gethost_main() { extern char *sccs_gethost(); char *host; #ifdef WIN32 setmode(1, _O_BINARY); #endif host = sccs_gethost(); if ((host == NULL) || (*host == '\0')) return (1); printf("%s\n", host); return (0); }
#include <stdio.h> #ifdef WIN32 #include <io.h> #include <fcntl.h> #endif int gethost_main() { extern char *sccs_gethost(); char *host; #ifdef WIN32 setmode(1, _O_BINARY); #endif host = sccs_gethost(); if ((host == NULL) || (*host == '\0')) return (1); printf("%s\n", host); /* make isure we have a good domain name */ if (strchr(host, '.') == NULL) return (1); return (0); }
Add two more check to x.chk_env a) make sure host name have at least one dot b) add a http test
Add two more check to x.chk_env a) make sure host name have at least one dot b) add a http test bk: 39466063LfKperUt13MbGKJrzx5juA
C
apache-2.0
bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper,bitkeeper-scm/bitkeeper
f0e79447ff7242b7da56bb5c1322c83c6abce641
include/shmlog_tags.h
include/shmlog_tags.h
/* * $Id$ * * Define the tags in the shared memory in a reusable format. * Whoever includes this get to define what the SLTM macro does. * */ SLTM(Debug) SLTM(Error) SLTM(CLI) SLTM(SessionOpen) SLTM(SessionReuse) SLTM(SessionClose) SLTM(BackendOpen) SLTM(BackendXID) SLTM(BackendReuse) SLTM(BackendClose) SLTM(HttpError) SLTM(ClientAddr) SLTM(Backend) SLTM(Request) SLTM(Response) SLTM(Length) SLTM(Status) SLTM(URL) SLTM(Protocol) SLTM(Header) SLTM(BldHdr) SLTM(LostHeader) SLTM(VCL_call) SLTM(VCL_trace) SLTM(VCL_return) SLTM(XID) SLTM(ExpBan) SLTM(ExpPick) SLTM(ExpKill)
/* * $Id$ * * Define the tags in the shared memory in a reusable format. * Whoever includes this get to define what the SLTM macro does. * */ SLTM(Debug) SLTM(Error) SLTM(CLI) SLTM(SessionOpen) SLTM(SessionReuse) SLTM(SessionClose) SLTM(BackendOpen) SLTM(BackendXID) SLTM(BackendReuse) SLTM(BackendClose) SLTM(HttpError) SLTM(ClientAddr) SLTM(Backend) SLTM(Request) SLTM(Response) SLTM(Length) SLTM(Status) SLTM(URL) SLTM(Protocol) SLTM(Header) SLTM(BldHdr) SLTM(LostHeader) SLTM(VCL_call) SLTM(VCL_trace) SLTM(VCL_return) SLTM(XID) SLTM(Hit) SLTM(ExpBan) SLTM(ExpPick) SLTM(ExpKill)
Add shmem tag for Hits
Add shmem tag for Hits git-svn-id: 2c9807fa3ff65b17195bd55dc8a6c4261e10127b@361 d4fa192b-c00b-0410-8231-f00ffab90ce4
C
bsd-2-clause
alarky/varnish-cache-doc-ja,ajasty-cavium/Varnish-Cache,chrismoulton/Varnish-Cache,alarky/varnish-cache-doc-ja,chrismoulton/Varnish-Cache,mrhmouse/Varnish-Cache,ssm/pkg-varnish,franciscovg/Varnish-Cache,franciscovg/Varnish-Cache,1HLtd/Varnish-Cache,1HLtd/Varnish-Cache,drwilco/varnish-cache-drwilco,ambernetas/varnish-cache,ajasty-cavium/Varnish-Cache,alarky/varnish-cache-doc-ja,feld/Varnish-Cache,ajasty-cavium/Varnish-Cache,alarky/varnish-cache-doc-ja,gquintard/Varnish-Cache,mrhmouse/Varnish-Cache,gauthier-delacroix/Varnish-Cache,wikimedia/operations-debs-varnish,chrismoulton/Varnish-Cache,gauthier-delacroix/Varnish-Cache,varnish/Varnish-Cache,wikimedia/operations-debs-varnish,zhoualbeart/Varnish-Cache,gauthier-delacroix/Varnish-Cache,mrhmouse/Varnish-Cache,drwilco/varnish-cache-old,zhoualbeart/Varnish-Cache,drwilco/varnish-cache-old,ambernetas/varnish-cache,drwilco/varnish-cache-drwilco,varnish/Varnish-Cache,ambernetas/varnish-cache,zhoualbeart/Varnish-Cache,gquintard/Varnish-Cache,wikimedia/operations-debs-varnish,1HLtd/Varnish-Cache,gauthier-delacroix/Varnish-Cache,ssm/pkg-varnish,wikimedia/operations-debs-varnish,franciscovg/Varnish-Cache,alarky/varnish-cache-doc-ja,gquintard/Varnish-Cache,franciscovg/Varnish-Cache,ajasty-cavium/Varnish-Cache,ssm/pkg-varnish,zhoualbeart/Varnish-Cache,feld/Varnish-Cache,ssm/pkg-varnish,gquintard/Varnish-Cache,feld/Varnish-Cache,mrhmouse/Varnish-Cache,feld/Varnish-Cache,franciscovg/Varnish-Cache,feld/Varnish-Cache,ssm/pkg-varnish,mrhmouse/Varnish-Cache,ajasty-cavium/Varnish-Cache,gauthier-delacroix/Varnish-Cache,wikimedia/operations-debs-varnish,zhoualbeart/Varnish-Cache,1HLtd/Varnish-Cache,chrismoulton/Varnish-Cache,varnish/Varnish-Cache,varnish/Varnish-Cache,drwilco/varnish-cache-old,drwilco/varnish-cache-drwilco,chrismoulton/Varnish-Cache,varnish/Varnish-Cache
bf737e99dd9fb759499919236142eb1da80cabab
includes/Rasterizer.h
includes/Rasterizer.h
#ifndef RASTERIZER_H #define RASTERIZER_H #include <string> #include "Renderer.h" class Rasterizer : public Renderer { private: const float k_a = 0.1; const RGBColor AMBIENT_COLOR = RGBColor(1.0f, 1.0f, 1.0f); public: Rasterizer(); Rasterizer(World* world, const uint16_t image_width, const uint16_t image_height); ~Rasterizer(); const RGBColor shade(const GeometryObject& object, const Triangle3D& triangle, const Point3D point_in_triangle) const override; void render(const std::string output_path) override; private: const RGBColor phongShading(const Material& material, const RGBColor& base_color, const Triangle3D& triangle, const Point3D& point_in_triangle) const; const RGBColor blinnPhongShading(const Material& material, const RGBColor& base_color, const Triangle3D& triangle, const Point3D& point_in_triangle) const; }; #endif /* RASTERIZER_H */
#ifndef RASTERIZER_H #define RASTERIZER_H #include <string> #include "Renderer.h" class Rasterizer : public Renderer { private: const float k_a = 0.1; const RGBColor AMBIENT_COLOR = RGBColor(1.0f, 1.0f, 1.0f); public: Rasterizer(); Rasterizer(World* world, const uint16_t image_width, const uint16_t image_height); ~Rasterizer(); const RGBColor shade(const GeometryObject& object, const Triangle3D& triangle, const Point3D point_in_triangle) const override; void render(const std::string output_path) override; private: const Triangle2D toRaster(const Triangle3D& triangle_world) const; const float getDepth(const Triangle3D& triangle_world, const Triangle2D& triangle_raster, const Point2D& pixel_raster) const; const RGBColor phongShading(const Material& material, const RGBColor& base_color, const Triangle3D& triangle, const Point3D& point_in_triangle) const; const RGBColor blinnPhongShading(const Material& material, const RGBColor& base_color, const Triangle3D& triangle, const Point3D& point_in_triangle) const; }; #endif /* RASTERIZER_H */
Refactor render method to make it simpler
Refactor render method to make it simpler
C
mit
mtrebi/Rasterizer,mtrebi/Rasterizer
d94d8d1afeaecbde0ed644de30a51f19f3b170dd
examples/picovic.c
examples/picovic.c
/* shadowVIC – Copyright (c) 2015 Sven Michael Klose <pixel@hugbox.org> */ #include <stdio.h> #include "types.h" #include "config.h" #include "6502.h" #include "shadowvic.h" #include "joystick.h" #include "video.h" #include "sync.h" #define FALSE 0 #define TRUE 1 int main (int argc, char * argv[]) { struct vic20_config config = { .is_expanded = FALSE, .use_paddles = FALSE, .manual_screen_updates = FALSE, .frames_per_second = 50, .frame_interceptor = NULL }; printf ("shadowVIC – https://github.com/SvenMichaelKlose/shadowvic/"); joystick_open (); video_open (); video_map (); vic20_open (&config); vic20_emulate (m[0xfffc] + (m[0xfffd] << 8)); vic20_close (); video_close (); joystick_close (); return 0; }
/* shadowVIC – Copyright (c) 2015 Sven Michael Klose <pixel@hugbox.org> */ #include <stdio.h> #include "types.h" #include "config.h" #include "6502.h" #include "shadowvic.h" #include "joystick.h" #include "video.h" #include "sync.h" #define FALSE 0 #define TRUE 1 int main (int argc, char * argv[]) { struct vic20_config config = { .is_expanded = FALSE, .use_paddles = FALSE, .manual_screen_updates = FALSE, .frames_per_second = 50, .frame_interceptor = NULL }; printf ("picoVIC – https://github.com/SvenMichaelKlose/shadowvic/\n"); joystick_open (); video_open (); video_map (); vic20_open (&config); vic20_emulate (m[0xfffc] + (m[0xfffd] << 8)); vic20_close (); video_close (); joystick_close (); return 0; }
Print welcome message with application name and newline.
Print welcome message with application name and newline.
C
mit
SvenMichaelKlose/shadowvic,SvenMichaelKlose/shadowvic
ec73e01d1ec3837eb103e408b6fdc19b58fd6787
projects/switch/mains/uart/main.c
projects/switch/mains/uart/main.c
#include "main.h" #include <msp430.h> #include "led_driver.h" int main(void) { WDTCTL = WDTPW + WDTHOLD; led_initialize((led_addresses_s*)P1IN_); P1DIR = 0x04; P1SEL = 0x06; UCA0CTL0 = 0x00; UCA0CTL1 = UCSSEL_3; UCA0BR0 = 104; UCA0BR1 = 0x00; UCA0MCTL = 0x03 << 4; set_led_color(LED_GREEN); while(1) { if(UCA0STAT & 0x01 == 0x00) { UCA0TXBUF = 0x5a; } } }
#include "main.h" #include <msp430.h> #include "led_driver.h" void main(void) { WDTCTL = WDTPW + WDTHOLD; //Set clock to 1MHz BCSCTL1 = CALBC1_1MHZ; DCOCTL = CALDCO_1MHZ; led_initialize((led_addresses_s*)P1IN_); P1DIR |= 0x04; P1SEL |= 0x06; P1SEL2 |= 0x06; UCA0CTL0 |= 0x00; UCA0CTL1 |= UCSSEL_2; UCA0BR0 = 104; UCA0BR1 = 0x00; UCA0MCTL = UCBRS0; UCA0CTL1 &= ~UCSWRST; set_led_color(LED_GREEN); while(1) { if((IFG2 & UCA0TXIFG) == UCA0TXIFG) { UCA0TXBUF = 0x5a; } //IE2 |= UCA0TXIE; // Enable USCI_A0 TX interrupt //__bis_SR_register(LPM0_bits + GIE); // Enter LPM0, interrupts enabled } } #pragma vector=USCIAB0TX_VECTOR __interrupt void TX_Ready(void) { if((IFG2 & UCA0TXIFG) == UCA0TXIFG) { UCA0TXBUF = 0x5a; } }
Send '0x5A' across UART continuously.
Send '0x5A' across UART continuously.
C
bsd-2-clause
sep/ping-pong-platform,sep/ping-pong-platform,sep/ping-pong-platform
538fbb508663e8c091f7e129ec36a6c7e6a4f1b1
include/llvm/ADT/StringSet.h
include/llvm/ADT/StringSet.h
//===--- StringSet.h - The LLVM Compiler Driver -----------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open // Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // StringSet - A set-like wrapper for the StringMap. // //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_STRINGSET_H #define LLVM_ADT_STRINGSET_H #include "llvm/ADT/StringMap.h" #include <cassert> namespace llvm { /// StringSet - A wrapper for StringMap that provides set-like /// functionality. Only insert() and count() methods are used by my /// code. template <class AllocatorTy = llvm::MallocAllocator> class StringSet : public llvm::StringMap<char, AllocatorTy> { typedef llvm::StringMap<char, AllocatorTy> base; public: bool insert (const std::string& InLang) { assert(!InLang.empty()); const char* KeyStart = &InLang[0]; const char* KeyEnd = KeyStart + InLang.size(); return base::insert(llvm::StringMapEntry<char>:: Create(KeyStart, KeyEnd, base::getAllocator(), '+')); } }; } #endif // LLVM_ADT_STRINGSET_H
//===--- StringSet.h - The LLVM Compiler Driver -----------------*- C++ -*-===// // // The LLVM Compiler Infrastructure // // This file is distributed under the University of Illinois Open // Source License. See LICENSE.TXT for details. // //===----------------------------------------------------------------------===// // // StringSet - A set-like wrapper for the StringMap. // //===----------------------------------------------------------------------===// #ifndef LLVM_ADT_STRINGSET_H #define LLVM_ADT_STRINGSET_H #include "llvm/ADT/StringMap.h" #include <cassert> namespace llvm { /// StringSet - A wrapper for StringMap that provides set-like /// functionality. Only insert() and count() methods are used by my /// code. template <class AllocatorTy = llvm::MallocAllocator> class StringSet : public llvm::StringMap<char, AllocatorTy> { typedef llvm::StringMap<char, AllocatorTy> base; public: bool insert(const std::string& InLang) { assert(!InLang.empty()); const char* KeyStart = &InLang[0]; const char* KeyEnd = KeyStart + InLang.size(); return base::insert(llvm::StringMapEntry<char>:: Create(KeyStart, KeyEnd, base::getAllocator(), '+')); } }; } #endif // LLVM_ADT_STRINGSET_H
Remove extra blank line and space.
Remove extra blank line and space. git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@61916 91177308-0d34-0410-b5e6-96231b3b80d8
C
bsd-2-clause
dslab-epfl/asap,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm
d71a3e7b93a9d7f4a4e95d40d4fc91b59afae358
src/hal/classicladder/classicladder_gtk.h
src/hal/classicladder/classicladder_gtk.h
void UpdateVScrollBar(); void save_label_comment_edited(); void refresh_label_comment( void ); void clear_label_comment(); void autorize_prevnext_buttons(int Yes); void ShowMessageBox(const char * title, const char * text, const char * button); void ShowConfirmationBoxWithChoiceOrNot(const char * title, const char * text, void * function_if_yes, char HaveTheChoice); void ShowConfirmationBox(const char * title, const char * text, void * function_if_yes); void RefreshOneBoolVar( int Type, int Num, int Val ); void RefreshAllBoolsVars( ); void UpdateAllLabelsBoolsVars( ); void DoQuitGtkApplication( void ); void DoReset( ); void MessageInStatusBar( char * msg ); void InitGtkWindows( int argc, char *argv[] ); void UpdateAllGtkWindows( void ); void UpdateWindowTitleWithProjectName( void );
void UpdateVScrollBar(); void save_label_comment_edited(); void refresh_label_comment( void ); void clear_label_comment(); void autorize_prevnext_buttons(int Yes); void ShowMessageBox(const char * title, const char * text, const char * button); void ShowConfirmationBoxWithChoiceOrNot(const char * title, const char * text, void * function_if_yes, char HaveTheChoice); void ShowConfirmationBox(const char * title, const char * text, void * function_if_yes); void RefreshOneBoolVar( int Type, int Num, int Val ); void RefreshAllBoolsVars( ); void UpdateAllLabelsBoolsVars( ); void DoQuitGtkApplication( void ); void DoReset( ); void MessageInStatusBar( char * msg ); void InitGtkWindows( int argc, char *argv[] ); void UpdateAllGtkWindows( void ); void UpdateWindowTitleWithProjectName( void ); void ShowErrorMessage(const char * title, const char * text, const char * button); void CheckForErrors (void);
Add a message window to display %E variable controlled errors with out grabing focus
Add a message window to display %E variable controlled errors with out grabing focus
C
lgpl-2.1
RunningLight/machinekit,Cid427/machinekit,unseenlaser/linuxcnc,RunningLight/machinekit,bobvanderlinden/machinekit,ArcEye/machinekit-testing,ikcalB/linuxcnc-mirror,bmwiedemann/linuxcnc-mirror,kinsamanka/machinekit,araisrobo/linuxcnc,kinsamanka/machinekit,cdsteinkuehler/linuxcnc,ArcEye/machinekit-testing,unseenlaser/linuxcnc,araisrobo/machinekit,unseenlaser/linuxcnc,cnc-club/linuxcnc,mhaberler/machinekit,cdsteinkuehler/linuxcnc,Cid427/machinekit,aschiffler/linuxcnc,bobvanderlinden/machinekit,EqAfrica/machinekit,kinsamanka/machinekit,mhaberler/machinekit,unseenlaser/machinekit,araisrobo/linuxcnc,ArcEye/MK-Qt5,cdsteinkuehler/MachineKit,bobvanderlinden/machinekit,mhaberler/machinekit,bmwiedemann/linuxcnc-mirror,ArcEye/machinekit-testing,araisrobo/linuxcnc,ArcEye/MK-Qt5,strahlex/machinekit,unseenlaser/machinekit,ianmcmahon/linuxcnc-mirror,cdsteinkuehler/linuxcnc,bobvanderlinden/machinekit,bobvanderlinden/machinekit,strahlex/machinekit,araisrobo/machinekit,yishinli/emc2,EqAfrica/machinekit,cdsteinkuehler/MachineKit,EqAfrica/machinekit,cnc-club/linuxcnc,ikcalB/linuxcnc-mirror,cnc-club/linuxcnc,araisrobo/machinekit,jaguarcat79/ILC-with-LinuxCNC,bmwiedemann/linuxcnc-mirror,bmwiedemann/linuxcnc-mirror,aschiffler/linuxcnc,kinsamanka/machinekit,mhaberler/machinekit,araisrobo/machinekit,ArcEye/MK-Qt5,narogon/linuxcnc,ArcEye/MK-Qt5,jaguarcat79/ILC-with-LinuxCNC,araisrobo/linuxcnc,RunningLight/machinekit,ArcEye/machinekit-testing,strahlex/machinekit,ikcalB/linuxcnc-mirror,ianmcmahon/linuxcnc-mirror,ianmcmahon/linuxcnc-mirror,kinsamanka/machinekit,cdsteinkuehler/linuxcnc,RunningLight/machinekit,ArcEye/machinekit-testing,ikcalB/linuxcnc-mirror,araisrobo/machinekit,narogon/linuxcnc,kinsamanka/machinekit,ArcEye/MK-Qt5,bobvanderlinden/machinekit,narogon/linuxcnc,Cid427/machinekit,ianmcmahon/linuxcnc-mirror,kinsamanka/machinekit,cdsteinkuehler/MachineKit,EqAfrica/machinekit,araisrobo/machinekit,unseenlaser/linuxcnc,ianmcmahon/linuxcnc-mirror,jaguarcat79/ILC-with-LinuxCNC,bmwiedemann/linuxcnc-mirror,Cid427/machinekit,ianmcmahon/linuxcnc-mirror,yishinli/emc2,unseenlaser/machinekit,cdsteinkuehler/linuxcnc,cdsteinkuehler/linuxcnc,mhaberler/machinekit,strahlex/machinekit,mhaberler/machinekit,unseenlaser/machinekit,araisrobo/machinekit,Cid427/machinekit,narogon/linuxcnc,RunningLight/machinekit,unseenlaser/machinekit,unseenlaser/machinekit,Cid427/machinekit,EqAfrica/machinekit,ianmcmahon/linuxcnc-mirror,narogon/linuxcnc,bobvanderlinden/machinekit,araisrobo/linuxcnc,bmwiedemann/linuxcnc-mirror,EqAfrica/machinekit,cdsteinkuehler/MachineKit,yishinli/emc2,RunningLight/machinekit,ikcalB/linuxcnc-mirror,kinsamanka/machinekit,strahlex/machinekit,jaguarcat79/ILC-with-LinuxCNC,ArcEye/machinekit-testing,ArcEye/machinekit-testing,aschiffler/linuxcnc,strahlex/machinekit,mhaberler/machinekit,araisrobo/machinekit,RunningLight/machinekit,bmwiedemann/linuxcnc-mirror,RunningLight/machinekit,bobvanderlinden/machinekit,unseenlaser/linuxcnc,aschiffler/linuxcnc,unseenlaser/machinekit,EqAfrica/machinekit,ArcEye/MK-Qt5,aschiffler/linuxcnc,ikcalB/linuxcnc-mirror,strahlex/machinekit,Cid427/machinekit,EqAfrica/machinekit,cdsteinkuehler/MachineKit,araisrobo/machinekit,mhaberler/machinekit,cnc-club/linuxcnc,ArcEye/MK-Qt5,unseenlaser/machinekit,cnc-club/linuxcnc,ikcalB/linuxcnc-mirror,cnc-club/linuxcnc,jaguarcat79/ILC-with-LinuxCNC,Cid427/machinekit,ArcEye/machinekit-testing,yishinli/emc2,cdsteinkuehler/MachineKit,cnc-club/linuxcnc,ArcEye/MK-Qt5
2a63eef748fa1910eddb0b772eb24344e6705fdc
net/socket/ssl_client_socket.h
net/socket/ssl_client_socket.h
// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_H_ #define NET_SOCKET_SSL_CLIENT_SOCKET_H_ #include "net/socket/client_socket.h" namespace net { class SSLCertRequestInfo; class SSLInfo; // A client socket that uses SSL as the transport layer. // // NOTE: The SSL handshake occurs within the Connect method after a TCP // connection is established. If a SSL error occurs during the handshake, // Connect will fail. // class SSLClientSocket : public ClientSocket { public: // Gets the SSL connection information of the socket. virtual void GetSSLInfo(SSLInfo* ssl_info) = 0; // Gets the SSL CertificateRequest info of the socket after Connect failed // with ERR_SSL_CLIENT_AUTH_CERT_NEEDED. virtual void GetSSLCertRequestInfo( SSLCertRequestInfo* cert_request_info) = 0; }; } // namespace net #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_
// Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. #ifndef NET_SOCKET_SSL_CLIENT_SOCKET_H_ #define NET_SOCKET_SSL_CLIENT_SOCKET_H_ #include "net/socket/client_socket.h" namespace net { class SSLCertRequestInfo; class SSLInfo; // A client socket that uses SSL as the transport layer. // // NOTE: The SSL handshake occurs within the Connect method after a TCP // connection is established. If a SSL error occurs during the handshake, // Connect will fail. // class SSLClientSocket : public ClientSocket { public: // Next Protocol Negotiation (NPN), if successful, results in agreement on an // application-level string that specifies the application level protocol to // use over the TLS connection. NextProto enumerates the application level // protocols that we recognise. enum NextProto { kProtoUnknown = 0, kProtoHTTP11 = 1, kProtoSPDY = 2, }; // Gets the SSL connection information of the socket. virtual void GetSSLInfo(SSLInfo* ssl_info) = 0; // Gets the SSL CertificateRequest info of the socket after Connect failed // with ERR_SSL_CLIENT_AUTH_CERT_NEEDED. virtual void GetSSLCertRequestInfo( SSLCertRequestInfo* cert_request_info) = 0; static NextProto NextProtoFromString(const std::string& proto_string) { if (proto_string == "http1.1") { return kProtoHTTP11; } else if (proto_string == "spdy") { return kProtoSPDY; } else { return kProtoUnknown; } } }; } // namespace net #endif // NET_SOCKET_SSL_CLIENT_SOCKET_H_
Add static function to convert NPN strings to an enum.
Add static function to convert NPN strings to an enum. http://codereview.chromium.org/487012 git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@34287 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
C
bsd-3-clause
wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser
c22a72ef4865dea9581a39c3d48dc638fe6f894a
test/python_api/hello_world/main.c
test/python_api/hello_world/main.c
#include <stdio.h> int main(int argc, char const *argv[]) { printf("Hello world.\n"); // Set break point at this line. if (argc == 1) return 0; // Waiting to be attached by the debugger, otherwise. char line[100]; while (fgets(line, sizeof(line), stdin)) { // Waiting to be attached... printf("input line=>%s\n", line); } printf("Exiting now\n"); }
#include <stdio.h> #if defined(__linux__) #include <sys/prctl.h> #endif int main(int argc, char const *argv[]) { #if defined(__linux__) // Immediately enable any ptracer so that we can allow the stub attach // operation to succeed. Some Linux kernels are locked down so that // only an ancestor process can be a ptracer of a process. This disables that // restriction. Without it, attach-related stub tests will fail. #if defined(PR_SET_PTRACER) && defined(PR_SET_PTRACER_ANY) int prctl_result; // For now we execute on best effort basis. If this fails for // some reason, so be it. prctl_result = prctl(PR_SET_PTRACER, PR_SET_PTRACER_ANY, 0, 0, 0); (void) prctl_result; #endif #endif printf("Hello world.\n"); // Set break point at this line. if (argc == 1) return 0; // Waiting to be attached by the debugger, otherwise. char line[100]; while (fgets(line, sizeof(line), stdin)) { // Waiting to be attached... printf("input line=>%s\n", line); } printf("Exiting now\n"); }
Fix HelloWorld attach test for Linux kernels with ptrace ancestor lockdown.
Fix HelloWorld attach test for Linux kernels with ptrace ancestor lockdown. Similar to a recent test I fixed for gdb-remote attach scenarios, this fix is for Linux kernels, such as Ubuntu's stock setup on 11.04-ish and later, where ptrace starts requiring a ptracer to be an ancestor of the inferior to be ptraced. This change checks for Linux and the ptrace-related flags. If they're found, it tries to switch on the "allow any ptracer" mode for the inferior as the first statements in the program. It's a best-effort solution - if the prctl call fails, the failure is ignored, and probably will lead to the test failing. The ptrace security behavior can be modified system-wide, but is outside the scope of the test to address. Hence I went with this particular solution. git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@220650 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb
79be1938ba7f1d22397d24a58c4a39fe5ad13c41
modules/modinclude.h
modules/modinclude.h
#ifndef MODINCLUDE_H #define MODINCLUDE_H #include "../main.h" class ConfigReader; class ModuleInterface; // forward-declare so it can be used in modules and server #include "../connection.h" // declare other classes that use it #include "../modules.h" #include "../config.h" #include "../modules.h" #endif
#ifndef MODINCLUDE_H #define MODINCLUDE_H #include "../main.h" class ConfigReader; class ModuleInterface; // forward-declare so it can be used in modules and server #include "../connection.h" // declare other classes that use it #include "../modules.h" #include "../config.h" #endif
Remove double include of a file
Remove double include of a file
C
mit
ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo
c269fb2bc1bb58f91145303a4ce3a24957085b4b
lb_vector.c
lb_vector.c
#include "lb_vector.h" Vector lb_create_vector(Scalar* data, unsigned int length) { Vector v; v.data = data; v.length = length; return v; } Vector lb_allocate_vector(unsigned int length) { Scalar* ptr = (Scalar*)malloc(sizeof(Scalar) * length); return lb_create_vector(ptr, length); } // Result = Vector dot Vector void lbdp(Vector a, Vector b, Scalar* result) { *result = 0.0; int i; for(i = 0; i < a.length; i++) *result += a.data[i] * b.data[i]; } // Result = Scalar * Vector void lbstv(Scalar s, Vector v, Vector result) { int i; for(i = 0; i < v.length; i++) result.data[i] = s * v.data[i]; }
#include <stdlib.h> #include "lb_vector.h" Vector lb_create_vector(Scalar* data, unsigned int length) { Vector v; v.data = data; v.length = length; return v; } Vector lb_allocate_vector(unsigned int length) { Scalar* ptr = (Scalar*)malloc(sizeof(Scalar) * length); return lb_create_vector(ptr, length); } // Result = Vector dot Vector void lbdp(Vector a, Vector b, Scalar* result) { *result = 0.0; int i; for(i = 0; i < a.length; i++) *result += a.data[i] * b.data[i]; } // Result = Scalar * Vector void lbstv(Scalar s, Vector v, Vector result) { int i; for(i = 0; i < v.length; i++) result.data[i] = s * v.data[i]; }
Include stdlib.h for malloc not to bail
Include stdlib.h for malloc not to bail
C
apache-2.0
frenchrd/laid-back-lapack,frenchrd/laid-back-lapack
01815d76afedad438c36cd3c8d2132e36ec02715
include/core/SkMilestone.h
include/core/SkMilestone.h
/* * 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 71 #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 72 #endif
Update Skia milestone to 72
Update Skia milestone to 72 No API changes TBR=reed NOTRY=TRUE Bug: skia: Change-Id: I1ffde14bc6ebf0cf3d89735f70fb9a385b35d167 Reviewed-on: https://skia-review.googlesource.com/c/161940 Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com> Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
C
bsd-3-clause
Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,google/skia,HalCanary/skia-hc,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,rubenvb/skia,google/skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,rubenvb/skia,rubenvb/skia,google/skia
75091bfd2394b33a259bc9ea9b48807f964a3af4
src/android/AndroidConfigurationEvent.h
src/android/AndroidConfigurationEvent.h
#ifndef _ANDROIDCONFIGURATIONEVENT_H_ #define _ANDROIDCONFIGURATIONEVENT_H_ #include <ConfigurationEvent.h> #include <android/native_window.h> class AndroidConfigurationEvent : public ConfigurationEvent { public: AndroidConfigurationEvent(double _timestamp, ANativeWindow * _window) : ConfigurationEvent(_timestamp), window(_window) { } ANativeWindow * getWindow() { return window; } std::shared_ptr<EventBase> dup() const { return NULL; } void dispatch(Element & element); private: ANativeWindow * window = 0; }; #endif
#ifndef _ANDROIDCONFIGURATIONEVENT_H_ #define _ANDROIDCONFIGURATIONEVENT_H_ #include <ConfigurationEvent.h> #include <android/native_window.h> class AndroidConfigurationEvent : public ConfigurationEvent { public: AndroidConfigurationEvent(double _timestamp, ANativeWindow * _window) : ConfigurationEvent(_timestamp), window(_window) { } ANativeWindow * getWindow() { return window; } std::shared_ptr<EventBase> dup() const { return std::make_shared<AndroidConfigurationEvent>(*this); } void dispatch(Element & element); private: ANativeWindow * window = 0; }; #endif
Fix AConfigurationEvent dup() return value
Fix AConfigurationEvent dup() return value
C
mit
Sometrik/framework,Sometrik/framework,Sometrik/framework
3b8868dca49ba4e317d562279d2128ed8fff9a81
src/qt/bitcoinaddressvalidator.h
src/qt/bitcoinaddressvalidator.h
#ifndef BITCOINADDRESSVALIDATOR_H #define BITCOINADDRESSVALIDATOR_H #include <QValidator> /** Base48 entry widget validator. Corrects near-miss characters and refuses characters that are no part of base48. */ class BitcoinAddressValidator : public QValidator { Q_OBJECT public: explicit BitcoinAddressValidator(QObject *parent = 0); State validate(QString &input, int &pos) const; static const int MaxAddressLength = 35; }; #endif // BITCOINADDRESSVALIDATOR_H
#ifndef BITCOINADDRESSVALIDATOR_H #define BITCOINADDRESSVALIDATOR_H #include <QValidator> /** Base58 entry widget validator. Corrects near-miss characters and refuses characters that are not part of base58. */ class BitcoinAddressValidator : public QValidator { Q_OBJECT public: explicit BitcoinAddressValidator(QObject *parent = 0); State validate(QString &input, int &pos) const; static const int MaxAddressLength = 35; }; #endif // BITCOINADDRESSVALIDATOR_H
Fix typo in a comment: it's base58, not base48.
Fix typo in a comment: it's base58, not base48.
C
mit
Climbee/artcoin,madman5844/poundkoin,renatolage/wallets-BRCoin,madman5844/poundkoin,kevin-cantwell/crunchcoin,goldmidas/goldmidas,vbernabe/freicoin,BenjaminsCrypto/Benjamins-1,DigitalPandacoin/pandacoin,Climbee/artcoin,kevin-cantwell/crunchcoin,dobbscoin/dobbscoin-source,therealaltcoin/altcoin,tripmode/pxlcoin,goldmidas/goldmidas,keisercoin-official/keisercoin,MitchellMintCoins/AutoCoin,metrocoins/metrocoin,mammix2/ccoin-dev,compasscoin/compasscoin,keisercoin-official/keisercoin,applecoin-official/fellatio,applecoin-official/applecoin,raasakh/bardcoin,peercoin/peercoin,raasakh/bardcoin.exe,raasakh/bardcoin,barcoin-project/nothingcoin,osuyuushi/laughingmancoin,Carrsy/PoundCoin,Earlz/dobbscoin-source,MitchellMintCoins/AutoCoin,dobbscoin/dobbscoin-source,glv2/peerunity,Carrsy/PoundCoin,raasakh/bardcoin,cryptohelper/premine,jimblasko/2015_UNB_Wallets,MitchellMintCoins/MortgageCoin,Dinarcoin/dinarcoin,jimblasko/2015_UNB_Wallets,CarpeDiemCoin/CarpeDiemLaunch,DigitalPandacoin/pandacoin,metrocoins/metrocoin,peercoin/peercoin,madman5844/poundkoin,raasakh/bardcoin.exe,peacedevelop/peacecoin,hg5fm/nexuscoin,raasakh/bardcoin,DigitalPandacoin/pandacoin,MitchellMintCoins/AutoCoin,brettwittam/geocoin,CarpeDiemCoin/CarpeDiemLaunch,goldmidas/goldmidas,cainca/liliucoin,SocialCryptoCoin/SocialCoin,mammix2/ccoin-dev,peercoin/peercoin,ppcoin/ppcoin,starwalkerz/fincoin-fork,therealaltcoin/altcoin,brettwittam/geocoin,totallylegitbiz/totallylegitcoin,Climbee/artcoin,metrocoins/metrocoin,CarpeDiemCoin/CarpeDiemLaunch,renatolage/wallets-BRCoin,zestcoin/ZESTCOIN,DigitalPandacoin/pandacoin,cainca/liliucoin,renatolage/wallets-BRCoin,jimblasko/2015_UNB_Wallets,therealaltcoin/altcoin,5mil/Tradecoin,compasscoin/compasscoin,Adaryian/E-Currency,OfficialTitcoin/titcoin-wallet,Adaryian/E-Currency,raasakh/bardcoin,tripmode/pxlcoin,bitpagar/bitpagar,howardrya/AcademicCoin,Dinarcoin/dinarcoin,applecoin-official/fellatio,borgcoin/Borgcoin1,pdrobek/Polcoin-1-3,brettwittam/geocoin,WorldLeadCurrency/WLC,gjhiggins/fuguecoin,webdesignll/coin,cryptohelper/premine,webdesignll/coin,totallylegitbiz/totallylegitcoin,metrocoins/metrocoin,CarpeDiemCoin/CarpeDiemLaunch,peerdb/cors,borgcoin/Borgcoin1,ppcoin/ppcoin,vbernabe/freicoin,Enticed87/Decipher,borgcoin/Borgcoin.rar,zestcoin/ZESTCOIN,peerdb/cors,Earlz/dobbscoin-source,raasakh/bardcoin.exe,borgcoin/Borgcoin1,osuyuushi/laughingmancoin,Adaryian/E-Currency,vbernabe/freicoin,howardrya/AcademicCoin,applecoin-official/applecoin,Earlz/dobbscoin-source,glv2/peerunity,WorldLeadCurrency/WLC,zestcoin/ZESTCOIN,madman5844/poundkoin,borgcoin/Borgcoin.rar,gjhiggins/fuguecoin,hg5fm/nexuscoin,jimblasko/2015_UNB_Wallets,qubitcoin-project/QubitCoinQ2C,howardrya/AcademicCoin,barcoin-project/nothingcoin,WorldLeadCurrency/WLC,jimblasko/UnbreakableCoin-master,Carrsy/PoundCoin,borgcoin/Borgcoin.rar,totallylegitbiz/totallylegitcoin,peerdb/cors,WorldLeadCurrency/WLC,applecoin-official/applecoin,bitpagar/bitpagar,BenjaminsCrypto/Benjamins-1,peacedevelop/peacecoin,dobbscoin/dobbscoin-source,webdesignll/coin,osuyuushi/laughingmancoin,jimblasko/UnbreakableCoin-master,howardrya/AcademicCoin,Enticed87/Decipher,gjhiggins/fuguecoin,glv2/peerunity,WorldLeadCurrency/WLC,Earlz/dobbscoin-source,OfficialTitcoin/titcoin-wallet,pdrobek/Polcoin-1-3,totallylegitbiz/totallylegitcoin,hg5fm/nexuscoin,peercoin/peercoin,webdesignll/coin,Carrsy/PoundCoin,goldmidas/goldmidas,peerdb/cors,cryptocoins4all/zcoin,pdrobek/Polcoin-1-3,applecoin-official/applecoin,cainca/liliucoin,ionux/freicoin,brettwittam/geocoin,Carrsy/PoundCoin,cainca/liliucoin,mammix2/ccoin-dev,peercoin/peercoin,keisercoin-official/keisercoin,pdrobek/Polcoin-1-3,brettwittam/geocoin,keisercoin-official/keisercoin,pdrobek/Polcoin-1-3,vbernabe/freicoin,raasakh/bardcoin.exe,raasakh/bardcoin,ionux/freicoin,jimblasko/UnbreakableCoin-master,SocialCryptoCoin/SocialCoin,cryptohelper/premine,peacedevelop/peacecoin,OfficialTitcoin/titcoin-wallet,renatolage/wallets-BRCoin,peacedevelop/peacecoin,raasakh/bardcoin.exe,BenjaminsCrypto/Benjamins-1,barcoin-project/nothingcoin,DigitalPandacoin/pandacoin,compasscoin/compasscoin,applecoin-official/fellatio,cainca/liliucoin,jimblasko/UnbreakableCoin-master,CarpeDiemCoin/CarpeDiemLaunch,gjhiggins/fuguecoin,tripmode/pxlcoin,cryptohelper/premine,BenjaminsCrypto/Benjamins-1,Enticed87/Decipher,5mil/Tradecoin,osuyuushi/laughingmancoin,compasscoin/compasscoin,barcoin-project/nothingcoin,MitchellMintCoins/AutoCoin,tripmode/pxlcoin,zestcoin/ZESTCOIN,5mil/Tradecoin,Enticed87/Decipher,MitchellMintCoins/MortgageCoin,starwalkerz/fincoin-fork,MitchellMintCoins/MortgageCoin,Adaryian/E-Currency,peerdb/cors,goldmidas/goldmidas,applecoin-official/applecoin,howardrya/AcademicCoin,ionux/freicoin,SocialCryptoCoin/SocialCoin,cryptocoins4all/zcoin,borgcoin/Borgcoin.rar,kevin-cantwell/crunchcoin,borgcoin/Borgcoin.rar,therealaltcoin/altcoin,applecoin-official/fellatio,mammix2/ccoin-dev,Adaryian/E-Currency,osuyuushi/laughingmancoin,renatolage/wallets-BRCoin,hg5fm/nexuscoin,MitchellMintCoins/AutoCoin,therealaltcoin/altcoin,jimblasko/2015_UNB_Wallets,Climbee/artcoin,Earlz/dobbscoin-source,OfficialTitcoin/titcoin-wallet,cryptocoins4all/zcoin,kevin-cantwell/crunchcoin,Climbee/artcoin,mammix2/ccoin-dev,hg5fm/nexuscoin,starwalkerz/fincoin-fork,ppcoin/ppcoin,dobbscoin/dobbscoin-source,WorldLeadCurrency/WLC,ionux/freicoin,bitpagar/bitpagar,vbernabe/freicoin,cryptohelper/premine,MitchellMintCoins/MortgageCoin,starwalkerz/fincoin-fork,qubitcoin-project/QubitCoinQ2C,cryptocoins4all/zcoin,dobbscoin/dobbscoin-source,DigitalPandacoin/pandacoin,Earlz/dobbscoin-source,webdesignll/coin,vbernabe/freicoin,qubitcoin-project/QubitCoinQ2C,metrocoins/metrocoin,peerdb/cors,ppcoin/ppcoin,ionux/freicoin,compasscoin/compasscoin,Dinarcoin/dinarcoin,SocialCryptoCoin/SocialCoin,borgcoin/Borgcoin1,peercoin/peercoin,qubitcoin-project/QubitCoinQ2C,gjhiggins/fuguecoin,zestcoin/ZESTCOIN,kevin-cantwell/crunchcoin,bitpagar/bitpagar,Dinarcoin/dinarcoin,borgcoin/Borgcoin1,SocialCryptoCoin/SocialCoin,keisercoin-official/keisercoin,5mil/Tradecoin,Dinarcoin/dinarcoin,OfficialTitcoin/titcoin-wallet,cryptocoins4all/zcoin,jimblasko/UnbreakableCoin-master,5mil/Tradecoin,glv2/peerunity,Enticed87/Decipher,ionux/freicoin,peacedevelop/peacecoin,tripmode/pxlcoin,applecoin-official/fellatio,MitchellMintCoins/MortgageCoin,dobbscoin/dobbscoin-source,qubitcoin-project/QubitCoinQ2C,totallylegitbiz/totallylegitcoin,raasakh/bardcoin.exe,barcoin-project/nothingcoin
33ea6a02332d0944150e9445a584d6f26718509b
src/untrusted/irt/irt_private_pthread.c
src/untrusted/irt/irt_private_pthread.c
/* * Copyright (c) 2012 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <errno.h> #include <pthread.h> #include <unistd.h> #include "native_client/src/untrusted/nacl/tls.h" /* * libstdc++ makes minimal use of pthread_key_t stuff. */ #undef PTHREAD_KEYS_MAX #define PTHREAD_KEYS_MAX 16 #define NC_TSD_NO_MORE_KEYS irt_tsd_no_more_keys() static void irt_tsd_no_more_keys(void) { static const char msg[] = "IRT: too many pthread keys\n"; write(2, msg, sizeof msg - 1); } #define NACL_IN_IRT /* @IGNORE_LINES_FOR_CODE_HYGIENE[2] */ #include "native_client/src/untrusted/pthread/nc_init_private.c" #include "native_client/src/untrusted/pthread/nc_thread.c"
/* * Copyright (c) 2012 The Native Client Authors. All rights reserved. * Use of this source code is governed by a BSD-style license that can be * found in the LICENSE file. */ #include <errno.h> #include <pthread.h> #include <unistd.h> #include "native_client/src/untrusted/nacl/tls.h" /* * libstdc++ makes minimal use of pthread_key_t stuff. */ #undef PTHREAD_KEYS_MAX #define PTHREAD_KEYS_MAX 32 #define NC_TSD_NO_MORE_KEYS irt_tsd_no_more_keys() static void irt_tsd_no_more_keys(void) { static const char msg[] = "IRT: too many pthread keys\n"; write(2, msg, sizeof msg - 1); } #define NACL_IN_IRT /* @IGNORE_LINES_FOR_CODE_HYGIENE[2] */ #include "native_client/src/untrusted/pthread/nc_init_private.c" #include "native_client/src/untrusted/pthread/nc_thread.c"
Increase the number of pthread keys available to the IRT
Increase the number of pthread keys available to the IRT The Mojo EDK uses an additional key for thread-local storage and is now necessary to bring up IPC in Chrome. This is apparently enough to push us over the 16 key limit in some cases. Doubling to 32 to leave some room for further expansion. BUG=https://code.google.com/p/chromium/issues/detail?id=612500 Review-Url: https://codereview.chromium.org/2050043004
C
bsd-3-clause
sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client,sbc100/native_client
d849a52cc61e6183554cdbfe49d458e6bcbd79e8
ports/gtk-webkit/next-gtk-webkit.c
ports/gtk-webkit/next-gtk-webkit.c
/* Copyright © 2018 Atlas Engineer LLC. Use of this file is governed by the license that can be found in LICENSE. */ #include <gtk/gtk.h> #include "server.h" int main(int argc, char *argv[]) { // TODO: Use GtkApplication? gtk_init(&argc, &argv); // TODO: Start the xmlrpc server first? If GUI is started, then we can // report xmlrpc startup issue graphically. start_server(); start_client(); gtk_main(); stop_server(); return 0; }
/* Copyright © 2018 Atlas Engineer LLC. Use of this file is governed by the license that can be found in LICENSE. */ #include <gtk/gtk.h> #include <stdlib.h> #include "server.h" int main(int argc, char *argv[]) { // TODO: Use GtkApplication? gtk_init(&argc, &argv); // TODO: Start the xmlrpc server first? If GUI is started, then we can // report xmlrpc startup issue graphically. start_server(); start_client(); gtk_main(); stop_server(); return EXIT_SUCCESS; }
Use stdlib and return EXIT_SUCCESS
ports/gtk-webkit: Use stdlib and return EXIT_SUCCESS
C
bsd-3-clause
jmercouris/NeXT,jmercouris/NeXT
9a4a639fa3586a5ec10444d0fc26049bd9c3b707
src/lib/pubkey/cecpq1/cecpq1.h
src/lib/pubkey/cecpq1/cecpq1.h
/* * CECPQ1 (x25519 + NewHope) * (C) 2016 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ #ifndef BOTAN_CECPQ1_H__ #define BOTAN_CECPQ1_H__ #include <botan/secmem.h> #include <botan/newhope.h> namespace Botan { struct CECPQ1_key { secure_vector<uint8_t> m_x25519; newhope_poly m_newhope; }; void BOTAN_DLL CECPQ1_offer(uint8_t* offer_message, CECPQ1_key* offer_key_output, RandomNumberGenerator& rng); void BOTAN_DLL CECPQ1_accept(uint8_t* shared_key, uint8_t* accept_message, const uint8_t* offer_message, RandomNumberGenerator& rng); void BOTAN_DLL CECPQ1_finish(uint8_t* shared_key, const CECPQ1_key& offer_key, const uint8_t* accept_message); } #endif
/* * CECPQ1 (x25519 + NewHope) * (C) 2016 Jack Lloyd * * Botan is released under the Simplified BSD License (see license.txt) */ #ifndef BOTAN_CECPQ1_H__ #define BOTAN_CECPQ1_H__ #include <botan/secmem.h> #include <botan/newhope.h> namespace Botan { class CECPQ1_key { public: secure_vector<uint8_t> m_x25519; newhope_poly m_newhope; }; void BOTAN_DLL CECPQ1_offer(uint8_t* offer_message, CECPQ1_key* offer_key_output, RandomNumberGenerator& rng); void BOTAN_DLL CECPQ1_accept(uint8_t* shared_key, uint8_t* accept_message, const uint8_t* offer_message, RandomNumberGenerator& rng); void BOTAN_DLL CECPQ1_finish(uint8_t* shared_key, const CECPQ1_key& offer_key, const uint8_t* accept_message); } #endif
Fix class vs struct declaration.
Fix class vs struct declaration. Recent Clang complains about forward decl as 'class X' when X was actually declared as a struct.
C
bsd-2-clause
webmaster128/botan,webmaster128/botan,randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,webmaster128/botan,webmaster128/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan
406f0cd7f1c4cd3796592305ae9e338d2ea6cdf8
testmud/mud/home/Game/sys/band.c
testmud/mud/home/Game/sys/band.c
/* keeps track of bans */ mapping username_bans; mapping ip_bans; static void create() { username_bans = ([ ]); } void ban_username(string username) { ACCESS_CHECK(GAME()); if (username_bans[username]) { error("Username already banned"); } username_bans[username] = 1; } void unban_username(string username) { ACCESS_CHECK(GAME()); if (!username_bans[username]) { error("Username not banned"); } username_bans[username] = nil; } int query_is_banned(string username) { return !!username_bans(username); }
#include <kotaka/privilege.h> /* keeps track of bans */ mapping username_bans; private void save(); private void restore(); static void create() { username_bans = ([ ]); restore(); } void ban_username(string username) { ACCESS_CHECK(GAME()); if (username == "admin") { error("Cannot ban admin"); } if (username_bans[username]) { error("Username already banned"); } username_bans[username] = 1; save(); } void unban_username(string username) { ACCESS_CHECK(GAME()); if (!username_bans[username]) { error("Username not banned"); } username_bans[username] = nil; save(); } int query_is_banned(string username) { return !!username_bans[username]; } private void save() { save_object("band.o"); } private void restore() { restore_object("band.o"); }
Allow ban manager to save state
Allow ban manager to save state
C
agpl-3.0
shentino/kotaka,shentino/kotaka,shentino/kotaka
b8f31ace2931a5ba15f10abbba4f819fa207c88b
test/CodeGen/2007-11-07-ZeroAggregateAlign.c
test/CodeGen/2007-11-07-ZeroAggregateAlign.c
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s struct A { short s; short t; int i; }; // CHECK: %a = alloca %struct.A, align 4 // CHECK: call void @llvm.memset.p0i8.i64(i8* %tmp, i8 0, i64 8, i32 4, i1 false) void q() { struct A a = {0}; }
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s struct A { short s; short t; int i; }; // CHECK: %a = alloca %struct.A, align 4 // CHECK: call void @llvm.memset.p0i8.i64{{.*}}i32 4, i1 false) void q() { struct A a = {0}; }
Rework the match here to silence release mode windows buildbots.
Rework the match here to silence release mode windows buildbots. git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@136164 91177308-0d34-0410-b5e6-96231b3b80d8
C
apache-2.0
apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang
546aa3b916172c46fa6df8f7a002949c3976c060
Xcode/Audio/src/user_color_sensor.h
Xcode/Audio/src/user_color_sensor.h
#include "GRT/GRT.h" #include "istream.h" using namespace GRT; // Normalize by dividing each dimension by the total magnitude. // Also add the magnitude as an additional feature. vector<double> normalize(vector<double> input) { double magnitude; for (int i = 0; i < input.size(); i++) magnitude += (input[i] * input[i]); magnitude = sqrt(magnitude); for (int i = 0; i < input.size(); i++) input[i] /= magnitude; input.push_back(magnitude); return input; } ASCIISerialStream stream(9600, 3); GestureRecognitionPipeline pipeline; void setup() { stream.useUSBPort(0); stream.useNormalizer(normalize); useStream(stream); pipeline.addPreProcessingModule(MovingAverageFilter(5, 4)); //pipeline.addFeatureExtractionModule(TimeDomainFeatures(10, 1, 3, false, true, true, false, false)); pipeline.setClassifier(ANBC()); usePipeline(pipeline); }
#include "GRT/GRT.h" #include "istream.h" using namespace GRT; // Normalize by dividing each dimension by the total magnitude. // Also add the magnitude as an additional feature. vector<double> normalize(vector<double> input) { double magnitude = 0.0; for (int i = 0; i < input.size(); i++) magnitude += (input[i] * input[i]); magnitude = sqrt(magnitude); for (int i = 0; i < input.size(); i++) input[i] /= magnitude; input.push_back(magnitude); return input; } ASCIISerialStream stream(9600, 3); GestureRecognitionPipeline pipeline; void setup() { stream.useUSBPort(0); stream.useNormalizer(normalize); useStream(stream); pipeline.addPreProcessingModule(MovingAverageFilter(5, 4)); //pipeline.addFeatureExtractionModule(TimeDomainFeatures(10, 1, 3, false, true, true, false, false)); pipeline.setClassifier(ANBC()); usePipeline(pipeline); }
Initialize double variable before use.
Initialize double variable before use. Also removed trailing spaces.
C
bsd-3-clause
damellis/ESP,damellis/ESP
238cb4590508838cf420c23eece94715ce314a27
CppChart/Log.h
CppChart/Log.h
#ifndef LOG_H #define LOG_H #include <string> #include <iostream> #include <SFML/Graphics.hpp> inline void Log(std::string str) { std::cout << "[" << __LINE__ << "] " << __FUNCTION__ << " : " << str << std::endl; } inline void LogFnStart() { Log("Entered"); } inline void LogFnEnd() { Log("Finished"); } inline void NestedLog(std::string str) { std::cout << "\n\t" << str << "\n" << std::endl; } namespace CppChart { std::ostream& operator<<(std::ostream& stream, const sf::Vector2f& v); std::ostream& operator<<(std::ostream& stream, const sf::Vector2u& v); std::ostream& operator<<(std::ostream& stream, const sf::Color& c); template <typename T> std::string ToString(const T& val); } #endif
#ifndef LOG_H #define LOG_H #include <string> #include <iostream> #include <SFML/Graphics.hpp> inline void Log(std::string str) { std::cout << "[" << __LINE__ << "] " << __FUNCTION__ << " : " << str << std::endl; } inline void LogFnStart() { Log("Entered"); } inline void LogFnEnd() { Log("Finished"); } inline void NestedLog(std::string str) { std::cout << "\n\t" << str << "\n" << std::endl; } namespace CppChart { std::ostream& operator<<(std::ostream&, const sf::Vector2f&); std::ostream& operator<<(std::ostream&, const sf::Vector2u&); std::ostream& operator<<(std::ostream&, const sf::Color&); template <typename T> std::string ToString(const T&); } #endif
Delete argument names of function
Delete argument names of function
C
mit
utilForever/CppChart
7a8eda6a9283448ffe1a164b7cfa39c832d3fec0
searchlib/src/vespa/searchlib/queryeval/equiv_blueprint.h
searchlib/src/vespa/searchlib/queryeval/equiv_blueprint.h
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "blueprint.h" #include <vespa/searchlib/fef/matchdatalayout.h> namespace search::queryeval { class EquivBlueprint : public ComplexLeafBlueprint { private: FieldSpecBaseList _fields; HitEstimate _estimate; fef::MatchDataLayout _layout; std::vector<Blueprint::UP> _terms; std::vector<double> _exactness; public: EquivBlueprint(const FieldSpecBaseList &fields, fef::MatchDataLayout subtree_mdl); virtual ~EquivBlueprint(); // used by create visitor EquivBlueprint& addTerm(Blueprint::UP term, double exactness); SearchIteratorUP createLeafSearch(const fef::TermFieldMatchDataArray &tfmda, bool strict) const override; SearchIteratorUP createFilterSearch(bool strict, FilterConstraint constraint) const override; void visitMembers(vespalib::ObjectVisitor &visitor) const override; void fetchPostings(const ExecuteInfo &execInfo) override; bool isEquiv() const override { return true; } }; }
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "blueprint.h" #include <vespa/searchlib/fef/matchdatalayout.h> namespace search::queryeval { class EquivBlueprint : public ComplexLeafBlueprint { private: FieldSpecBaseList _fields; HitEstimate _estimate; fef::MatchDataLayout _layout; std::vector<Blueprint::UP> _terms; std::vector<double> _exactness; public: EquivBlueprint(const FieldSpecBaseList &fields, fef::MatchDataLayout subtree_mdl); ~EquivBlueprint() override; // used by create visitor EquivBlueprint& addTerm(Blueprint::UP term, double exactness); SearchIteratorUP createLeafSearch(const fef::TermFieldMatchDataArray &tfmda, bool strict) const override; SearchIteratorUP createFilterSearch(bool strict, FilterConstraint constraint) const override; void visitMembers(vespalib::ObjectVisitor &visitor) const override; void fetchPostings(const ExecuteInfo &execInfo) override; bool isEquiv() const override { return true; } }; }
Use override specifier for EquivBlueprint destructor.
Use override specifier for EquivBlueprint destructor.
C
apache-2.0
vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa,vespa-engine/vespa
e56b0c0f248ae779a0abd9e1d5aa7f7420a03f64
ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
ios/shared/ios_sharedlo/objective_c/view_controllers/testing_tiles/MLOTestingTileParametersViewController.h
// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ // // This file is part of the LibreOffice project. // // 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/. #import "MLOViewController.h" #import "MLOTestingTileSubviewControllerProtocol.h" static const CGFloat CONTEXT_WIDTH_DEFAULT = 450; static const CGFloat CONTEXT_HEIGHT_DEFAULT = 450; static const CGFloat TILE_POS_X_DEFAULT = 400; static const CGFloat TILE_POS_Y_DEFAULT = 420; static const CGFloat TILE_WIDTH_DEFAULT = 250; static const CGFloat TILE_HEIGHT_DEFAULT = 250; @interface MLOTestingTileParametersViewController : MLOViewController<MLOTestingTileSubviewControllerProtocol> @property CGFloat contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight; -(void)renderTile; @end
// -*- Mode: ObjC; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ // // This file is part of the LibreOffice project. // // 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/. #import "MLOViewController.h" #import "MLOTestingTileSubviewControllerProtocol.h" // The size of the actual pixel tile static const CGFloat CONTEXT_WIDTH_DEFAULT = 450; static const CGFloat CONTEXT_HEIGHT_DEFAULT = 450; // In our "decatwips" static const CGFloat TILE_POS_X_DEFAULT = 0; static const CGFloat TILE_POS_Y_DEFAULT = 0; // "Tile" size here means the decatwip size of the part of the document // rendered into the pixel tile static const CGFloat TILE_WIDTH_DEFAULT = 500; static const CGFloat TILE_HEIGHT_DEFAULT = 500; @interface MLOTestingTileParametersViewController : MLOViewController<MLOTestingTileSubviewControllerProtocol> @property CGFloat contextWidth, contextHeight, tilePosX, tilePosY, tileWidth, tileHeight; -(void)renderTile; @end
Adjust parameter defaults to give pleasant result
Adjust parameter defaults to give pleasant result Change-Id: Ifee900344547ef25b2041d25c13fcbc50428485e
C
mpl-2.0
JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core,JurassicWordExcel/core
1c34607f3b280ab0b40835b8f57555f941ed2b6c
src/dyn_types.h
src/dyn_types.h
typedef uint64_t msgid_t; typedef uint64_t msec_t; typedef uint64_t usec_t;
#pragma once typedef uint64_t msgid_t; typedef uint64_t msec_t; typedef uint64_t usec_t;
Fix compile error on CentOS
Fix compile error on CentOS
C
apache-2.0
Netflix/dynomite,Netflix/dynomite,Netflix/dynomite,Netflix/dynomite