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
|
|---|---|---|---|---|---|---|---|---|---|
b5491f9029675cc364ae0e8d262f9d73c272bc3c
|
TDTHotChocolate/FoundationAdditions/NSDate+TDTComparisons.h
|
TDTHotChocolate/FoundationAdditions/NSDate+TDTComparisons.h
|
#import <Foundation/Foundation.h>
/**
Simple wrappers over `[NSDate compare:]` to make comparisons more readable.
*/
@interface NSDate (TDTComparisons)
- (BOOL)isEarlierThanDate:(NSDate *)date;
- (BOOL)isEarlierThanOrEqualToDate:(NSDate *)date;
@end
|
#import <Foundation/Foundation.h>
/**
Wrappers over `[NSDate compare:]` to make comparisons more readable.
*/
@interface NSDate (TDTComparisons)
- (BOOL)isEarlierThanDate:(NSDate *)date;
- (BOOL)isEarlierThanOrEqualToDate:(NSDate *)date;
@end
|
Remove unnecessary adjective from description
|
Remove unnecessary adjective from description
|
C
|
bsd-3-clause
|
talk-to/Chocolate,talk-to/Chocolate
|
5c488182daaf8e11789bd0a16528900ae4042dc2
|
lib/Target/CBackend/CTargetMachine.h
|
lib/Target/CBackend/CTargetMachine.h
|
//===-- CTargetMachine.h - TargetMachine for the C backend ------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file declares the TargetMachine that is used by the C backend.
//
//===----------------------------------------------------------------------===//
#ifndef CTARGETMACHINE_H
#define CTARGETMACHINE_H
#include "llvm/Target/TargetMachine.h"
namespace llvm {
struct CTargetMachine : public TargetMachine {
const TargetData DataLayout; // Calculates type size & alignment
CTargetMachine(const Module &M, const std::string &FS)
: TargetMachine("CBackend", M),
DataLayout("CBackend") {}
// This is the only thing that actually does anything here.
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
CodeGenFileType FileType, bool Fast);
// This class always works, but shouldn't be the default in most cases.
static unsigned getModuleMatchQuality(const Module &M) { return 1; }
virtual const TargetData *getTargetData() const { return &DataLayout; }
};
} // End llvm namespace
#endif
|
//===-- CTargetMachine.h - TargetMachine for the C backend ------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file was developed by the LLVM research group and is distributed under
// the University of Illinois Open Source License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file declares the TargetMachine that is used by the C backend.
//
//===----------------------------------------------------------------------===//
#ifndef CTARGETMACHINE_H
#define CTARGETMACHINE_H
#include "llvm/Target/TargetMachine.h"
namespace llvm {
struct CTargetMachine : public TargetMachine {
const TargetData DataLayout; // Calculates type size & alignment
CTargetMachine(const Module &M, const std::string &FS)
: TargetMachine("CBackend", M),
DataLayout("CBackend", &M) {}
// This is the only thing that actually does anything here.
virtual bool addPassesToEmitFile(PassManager &PM, std::ostream &Out,
CodeGenFileType FileType, bool Fast);
// This class always works, but shouldn't be the default in most cases.
static unsigned getModuleMatchQuality(const Module &M) { return 1; }
virtual const TargetData *getTargetData() const { return &DataLayout; }
};
} // End llvm namespace
#endif
|
Fix a bug in Owen's checkin that broke the CBE on all non sparc v9 platforms.
|
Fix a bug in Owen's checkin that broke the CBE on all non sparc v9 platforms.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@28081 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
bsd-2-clause
|
dslab-epfl/asap,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap
|
0182fa2e384034fbbe1326fa887bb537c05d4525
|
test/FrontendC/2010-05-18-asmsched.c
|
test/FrontendC/2010-05-18-asmsched.c
|
// RUN: %llvmgcc %s -c -O3 -m64 -emit-llvm -o - | llc -march=x86-64 -mtriple=x86_64-apple-darwin | FileCheck %s
// XFAIL: *
// XTARGET: x86,i386,i686
// r9 used to be clobbered before its value was moved to r10. 7993104.
void foo(int x, int y) {
// CHECK: bar
// CHECK: movq %r9, %r10
// CHECK: movq %rdi, %r9
// CHECK: bar
register int lr9 asm("r9") = x;
register int lr10 asm("r10") = y;
int foo;
asm volatile("bar" : "=r"(lr9) : "r"(lr9), "r"(lr10));
foo = lr9;
lr9 = x;
lr10 = foo;
asm volatile("bar" : "=r"(lr9) : "r"(lr9), "r"(lr10));
}
|
// RUN: %llvmgcc %s -c -O3 -m64 -emit-llvm -o - | llc -march=x86-64 -mtriple=x86_64-apple-darwin | FileCheck %s
// r9 used to be clobbered before its value was moved to r10. 7993104.
void foo(int x, int y) {
// CHECK: bar
// CHECK: movq %r9, %r10
// CHECK: movq %rdi, %r9
// CHECK: bar
register int lr9 asm("r9") = x;
register int lr10 asm("r10") = y;
int foo;
asm volatile("bar" : "=r"(lr9) : "r"(lr9), "r"(lr10));
foo = lr9;
lr9 = x;
lr10 = foo;
asm volatile("bar" : "=r"(lr9) : "r"(lr9), "r"(lr10));
}
|
Test passed on ppc, to my surprise; if it worked there it may work everywhere...
|
Test passed on ppc, to my surprise; if it worked
there it may work everywhere...
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@104053 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,dslab-epfl/asap,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,dslab-epfl/asap,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm
|
80e3504b8bd57974c86cafa9a9fbe0614c965bdf
|
stf/NBodylib/src/NBody/SwiftParticle.h
|
stf/NBodylib/src/NBody/SwiftParticle.h
|
/*! \file SwiftParticle.h
* \brief header file for the SWIFT particle type.
*/
#ifndef SWIFT_PARTICLE_H
#define SWIFT_PARTICLE_H
#ifdef SWIFTINTERFACE
/**
* @brief The default struct alignment in SWIFT.
*/
#define SWIFT_STRUCT_ALIGNMENT 32
#define SWIFT_STRUCT_ALIGN __attribute__((aligned(SWIFT_STRUCT_ALIGNMENT)))
namespace Swift
{
/* SWIFT enum of part types. Should match VELOCIraptor type values. */
enum part_type {
swift_type_gas = 0,
swift_type_dark_matter = 1,
swift_type_star = 4,
swift_type_black_hole = 5,
swift_type_count
} __attribute__((packed));
/* SWIFT/VELOCIraptor particle. */
struct swift_vel_part {
/*! Particle ID. If negative, it is the negative offset of the #part with
which this gpart is linked. */
long long id;
/*! Particle position. */
double x[3];
/*! Particle velocity. */
float v[3];
/*! Particle mass. */
float mass;
/*! Gravitational potential */
float potential;
/*! Internal energy of gas particle */
float u;
/*! Type of the #gpart (DM, gas, star, ...) */
enum part_type type;
} SWIFT_STRUCT_ALIGN;
}
#endif
#endif
|
/*! \file SwiftParticle.h
* \brief header file for the SWIFT particle type.
*/
#ifndef SWIFT_PARTICLE_H
#define SWIFT_PARTICLE_H
#ifdef SWIFTINTERFACE
namespace Swift
{
/* SWIFT enum of part types. Should match VELOCIraptor type values. */
enum part_type {
swift_type_gas = 0,
swift_type_dark_matter = 1,
swift_type_star = 4,
swift_type_black_hole = 5,
swift_type_count
} __attribute__((packed));
/* SWIFT/VELOCIraptor particle. */
struct swift_vel_part {
/*! Particle ID. */
long long id;
/*! Particle position. */
double x[3];
/*! Particle velocity. */
float v[3];
/*! Particle mass. */
float mass;
/*! Gravitational potential */
float potential;
/*! Internal energy of gas particle */
float u;
/*! Type of the #gpart (DM, gas, star, ...) */
enum part_type type;
};
}
#endif
#endif
|
Use unaligned particle structure to save memory.
|
Use unaligned particle structure to save memory.
|
C
|
mit
|
pelahi/VELOCIraptor-STF,pelahi/VELOCIraptor-STF,pelahi/VELOCIraptor-STF
|
56de4f7f2434bfb7b22f83bdb87744a8e6ca28de
|
MoPubSDK/MPConstants.h
|
MoPubSDK/MPConstants.h
|
//
// MPConstants.h
// MoPub
//
// Created by Nafis Jamal on 2/9/11.
// Copyright 2011 MoPub, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#define MP_DEBUG_MODE 1
#define HOSTNAME @"ads.mopub.com"
#define HOSTNAME_FOR_TESTING @"testing.ads.mopub.com"
#define DEFAULT_PUB_ID @"agltb3B1Yi1pbmNyDAsSBFNpdGUYkaoMDA"
#define MP_SERVER_VERSION @"8"
#define MP_SDK_VERSION @"1.16.0.1"
// Sizing constants.
#define MOPUB_BANNER_SIZE CGSizeMake(320, 50)
#define MOPUB_MEDIUM_RECT_SIZE CGSizeMake(300, 250)
#define MOPUB_LEADERBOARD_SIZE CGSizeMake(728, 90)
#define MOPUB_WIDE_SKYSCRAPER_SIZE CGSizeMake(160, 600)
// Miscellaneous constants.
#define MINIMUM_REFRESH_INTERVAL 5.0
#define DEFAULT_BANNER_REFRESH_INTERVAL 60
#define BANNER_TIMEOUT_INTERVAL 10
#define INTERSTITIAL_TIMEOUT_INTERVAL 30
// Feature Flags
#define SESSION_TRACKING_ENABLED 1
|
//
// MPConstants.h
// MoPub
//
// Created by Nafis Jamal on 2/9/11.
// Copyright 2011 MoPub, Inc. All rights reserved.
//
#import <UIKit/UIKit.h>
#if DEBUG
#define MP_DEBUG_MODE 1
#else
#define MP_DEBUG_MODE 0
#endif
#define HOSTNAME @"ads.mopub.com"
#define HOSTNAME_FOR_TESTING @"testing.ads.mopub.com"
#define DEFAULT_PUB_ID @"agltb3B1Yi1pbmNyDAsSBFNpdGUYkaoMDA"
#define MP_SERVER_VERSION @"8"
#define MP_SDK_VERSION @"1.16.0.1"
// Sizing constants.
#define MOPUB_BANNER_SIZE CGSizeMake(320, 50)
#define MOPUB_MEDIUM_RECT_SIZE CGSizeMake(300, 250)
#define MOPUB_LEADERBOARD_SIZE CGSizeMake(728, 90)
#define MOPUB_WIDE_SKYSCRAPER_SIZE CGSizeMake(160, 600)
// Miscellaneous constants.
#define MINIMUM_REFRESH_INTERVAL 5.0
#define DEFAULT_BANNER_REFRESH_INTERVAL 60
#define BANNER_TIMEOUT_INTERVAL 10
#define INTERSTITIAL_TIMEOUT_INTERVAL 30
// Feature Flags
#define SESSION_TRACKING_ENABLED 1
|
Disable MoPub logging for release builds.
|
Disable MoPub logging for release builds.
|
C
|
bsd-3-clause
|
skillz/mopub-ios-sdk,skillz/mopub-ios-sdk,skillz/mopub-ios-sdk,skillz/mopub-ios-sdk
|
aa9981d1d777855b79a4779e4b2cac3b3463023e
|
src/SimpleAmqpClient/Version.h
|
src/SimpleAmqpClient/Version.h
|
#ifndef SIMPLEAMQPCLIENT_VERSION_H
#define SIMPLEAMQPCLIENT_VERSION_H
/*
* ***** BEGIN LICENSE BLOCK *****
* Version: MIT
*
* Copyright (c) 2013 Alan Antonuk
*
* 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.
* ***** END LICENSE BLOCK *****
*/
#define SIMPLEAMQPCLIENT_VERSION_MAJOR 2
#define SIMPLEAMQPCLIENT_VERSION_MINOR 5
#define SIMPLEAMQPCLIENT_VERSION_PATCH 1
#endif // SIMPLEAMQPCLIENT_VERSION_H
|
#ifndef SIMPLEAMQPCLIENT_VERSION_H
#define SIMPLEAMQPCLIENT_VERSION_H
/*
* ***** BEGIN LICENSE BLOCK *****
* Version: MIT
*
* Copyright (c) 2013 Alan Antonuk
*
* 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.
* ***** END LICENSE BLOCK *****
*/
#define SIMPLEAMQPCLIENT_VERSION_MAJOR 2
#define SIMPLEAMQPCLIENT_VERSION_MINOR 6
#define SIMPLEAMQPCLIENT_VERSION_PATCH 0
#endif // SIMPLEAMQPCLIENT_VERSION_H
|
Increment version to v2.6 (take 2)
|
Increment version to v2.6 (take 2)
v2.5.1 was release to correct a problem with install directories on
Debian.
|
C
|
mit
|
alanxz/SimpleAmqpClient,alanxz/SimpleAmqpClient
|
2ec20f8408bfc92bb15b982f2b06456ca48c5074
|
webkit/plugins/ppapi/ppp_pdf.h
|
webkit/plugins/ppapi/ppp_pdf.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 WEBKIT_PLUGINS_PPAPI_PPP_PDF_H_
#define WEBKIT_PLUGINS_PPAPI_PPP_PDF_H_
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_point.h"
#include "ppapi/c/pp_var.h"
#define PPP_PDF_INTERFACE_1 "PPP_Pdf;1"
struct PPP_Pdf_1 {
// Returns an absolute URL if the position is over a link.
PP_Var (*GetLinkAtPosition)(PP_Instance instance,
PP_Point point);
};
typedef PPP_Pdf_1 PPP_Pdf;
#endif // WEBKIT_PLUGINS_PPAPI_PPP_PDF_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 WEBKIT_PLUGINS_PPAPI_PPP_PDF_H_
#define WEBKIT_PLUGINS_PPAPI_PPP_PDF_H_
#include "ppapi/c/pp_instance.h"
#include "ppapi/c/pp_point.h"
#include "ppapi/c/pp_var.h"
#define PPP_PDF_INTERFACE_1 "PPP_Pdf;1"
#define PPP_PDF_INTERFACE PPP_PDF_INTERFACE_1
struct PPP_Pdf_1 {
// Returns an absolute URL if the position is over a link.
PP_Var (*GetLinkAtPosition)(PP_Instance instance,
PP_Point point);
};
typedef PPP_Pdf_1 PPP_Pdf;
#endif // WEBKIT_PLUGINS_PPAPI_PPP_PDF_H_
|
Add missing unversioned interface-name macro for PPP_Pdf.
|
Add missing unversioned interface-name macro for PPP_Pdf.
BUG=107398
Review URL: http://codereview.chromium.org/9114010
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@116504 0039d316-1c4b-4281-b951-d872f2087c98
|
C
|
bsd-3-clause
|
markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,zcbenz/cefode-chromium,Chilledheart/chromium,ChromiumWebApps/chromium,Jonekee/chromium.src,chuan9/chromium-crosswalk,timopulkkinen/BubbleFish,dednal/chromium.src,dednal/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,anirudhSK/chromium,zcbenz/cefode-chromium,rogerwang/chromium,robclark/chromium,ChromiumWebApps/chromium,Just-D/chromium-1,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,hgl888/chromium-crosswalk,dednal/chromium.src,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,keishi/chromium,keishi/chromium,dednal/chromium.src,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,keishi/chromium,dushu1203/chromium.src,patrickm/chromium.src,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,rogerwang/chromium,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,Jonekee/chromium.src,keishi/chromium,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,Jonekee/chromium.src,keishi/chromium,nacl-webkit/chrome_deps,fujunwei/chromium-crosswalk,dednal/chromium.src,ondra-novak/chromium.src,ChromiumWebApps/chromium,robclark/chromium,markYoungH/chromium.src,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,dednal/chromium.src,nacl-webkit/chrome_deps,junmin-zhu/chromium-rivertrail,dednal/chromium.src,anirudhSK/chromium,M4sse/chromium.src,nacl-webkit/chrome_deps,nacl-webkit/chrome_deps,hujiajie/pa-chromium,mohamed--abdel-maksoud/chromium.src,keishi/chromium,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,M4sse/chromium.src,hujiajie/pa-chromium,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,hgl888/chromium-crosswalk,robclark/chromium,Jonekee/chromium.src,rogerwang/chromium,jaruba/chromium.src,Fireblend/chromium-crosswalk,anirudhSK/chromium,M4sse/chromium.src,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,markYoungH/chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,axinging/chromium-crosswalk,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,littlstar/chromium.src,jaruba/chromium.src,PeterWangIntel/chromium-crosswalk,rogerwang/chromium,dushu1203/chromium.src,hgl888/chromium-crosswalk,Jonekee/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,dushu1203/chromium.src,robclark/chromium,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,rogerwang/chromium,M4sse/chromium.src,littlstar/chromium.src,littlstar/chromium.src,patrickm/chromium.src,markYoungH/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,mogoweb/chromium-crosswalk,M4sse/chromium.src,ondra-novak/chromium.src,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,M4sse/chromium.src,jaruba/chromium.src,ltilve/chromium,junmin-zhu/chromium-rivertrail,keishi/chromium,Just-D/chromium-1,dednal/chromium.src,jaruba/chromium.src,robclark/chromium,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,rogerwang/chromium,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,junmin-zhu/chromium-rivertrail,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,nacl-webkit/chrome_deps,ondra-novak/chromium.src,axinging/chromium-crosswalk,keishi/chromium,anirudhSK/chromium,littlstar/chromium.src,mogoweb/chromium-crosswalk,ltilve/chromium,fujunwei/chromium-crosswalk,ChromiumWebApps/chromium,anirudhSK/chromium,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,Just-D/chromium-1,chuan9/chromium-crosswalk,robclark/chromium,anirudhSK/chromium,timopulkkinen/BubbleFish,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,Fireblend/chromium-crosswalk,patrickm/chromium.src,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,dednal/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,littlstar/chromium.src,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ChromiumWebApps/chromium,hujiajie/pa-chromium,anirudhSK/chromium,timopulkkinen/BubbleFish,rogerwang/chromium,Chilledheart/chromium,hgl888/chromium-crosswalk,M4sse/chromium.src,axinging/chromium-crosswalk,ltilve/chromium,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,axinging/chromium-crosswalk,jaruba/chromium.src,Fireblend/chromium-crosswalk,bright-sparks/chromium-spacewalk,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,robclark/chromium,Chilledheart/chromium,mogoweb/chromium-crosswalk,zcbenz/cefode-chromium,ltilve/chromium,timopulkkinen/BubbleFish,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,littlstar/chromium.src,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,anirudhSK/chromium,mogoweb/chromium-crosswalk,ChromiumWebApps/chromium,rogerwang/chromium,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,ltilve/chromium,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,ltilve/chromium,hujiajie/pa-chromium,robclark/chromium,zcbenz/cefode-chromium,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,ltilve/chromium,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,ltilve/chromium,junmin-zhu/chromium-rivertrail,markYoungH/chromium.src,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,M4sse/chromium.src,mogoweb/chromium-crosswalk,robclark/chromium,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,chuan9/chromium-crosswalk,fujunwei/chromium-crosswalk,pozdnyakov/chromium-crosswalk,chuan9/chromium-crosswalk,M4sse/chromium.src,ondra-novak/chromium.src,hujiajie/pa-chromium,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,patrickm/chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,robclark/chromium,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,jaruba/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,anirudhSK/chromium,keishi/chromium,hujiajie/pa-chromium,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,hujiajie/pa-chromium,Chilledheart/chromium,krieger-od/nwjs_chromium.src,jaruba/chromium.src,keishi/chromium,dushu1203/chromium.src,markYoungH/chromium.src,pozdnyakov/chromium-crosswalk,Pluto-tv/chromium-crosswalk,patrickm/chromium.src,dednal/chromium.src,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,ChromiumWebApps/chromium,rogerwang/chromium,Pluto-tv/chromium-crosswalk,nacl-webkit/chrome_deps,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,keishi/chromium,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,zcbenz/cefode-chromium,fujunwei/chromium-crosswalk,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,patrickm/chromium.src,patrickm/chromium.src,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl
|
5113f1622d5c6b0d00975ada0e0827403383e3e8
|
list.c
|
list.c
|
#include "list.h"
struct ListNode
{
ListNode* prev;
ListNode* next;
void* k;
};
struct List
{
ListNode* head;
};
List* List_Create(void)
{
List* l = (List *)malloc(sizeof(List));
l->head = NULL;
return l;
}
ListNode* ListNode_Create(void* k)
{
ListNode* n = (ListNode *)malloc(sizeof(ListNode));
n->prev = NULL;
n->next = NULL;
n->k = k;
return n;
}
ListNode* List_Search(List* l, void* k, int (f)(void*, void*))
{
ListNode* n = l->head;
while (n != NULL && !f(n->k, k))
{
n = n->next;
}
return n;
}
void List_Insert(List* l, ListNode* n)
{
n->next = l->head;
if (l->head != NULL)
{
l->head->prev = n;
}
l->head = n;
n->prev = NULL;
}
|
#include "list.h"
struct ListNode
{
ListNode* prev;
ListNode* next;
void* k;
};
struct List
{
ListNode* head;
};
List* List_Create(void)
{
List* l = (List *)malloc(sizeof(List));
l->head = NULL;
return l;
}
ListNode* ListNode_Create(void* k)
{
ListNode* n = (ListNode *)malloc(sizeof(ListNode));
n->prev = NULL;
n->next = NULL;
n->k = k;
return n;
}
ListNode* List_Search(List* l, void* k, int (f)(void*, void*))
{
ListNode* n = l->head;
while (n != NULL && !f(n->k, k))
{
n = n->next;
}
return n;
}
void List_Insert(List* l, ListNode* n)
{
n->next = l->head;
if (l->head != NULL)
{
l->head->prev = n;
}
l->head = n;
n->prev = NULL;
}
void List_Delete(List* l, ListNode* n)
{
if (n->prev != NULL)
{
n->prev->next = n->next;
} else {
l->head = n->next;
}
if (n->next != NULL)
{
n->next->prev = n->prev;
}
}
|
Add List Delete function implementation
|
Add List Delete function implementation
|
C
|
mit
|
MaxLikelihood/CADT
|
5bee973dd0c1ba2ba5b473398429c2f4c5f6447e
|
main.c
|
main.c
|
#include <stdio.h>
#include <stdlib.h>
int main(int argc,char* argv)
{
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc,char* argv)
{
FILE *ps;
char date_str[32]={0};
if((ps = popen("date +%Y%m%d-%H%M%S", "r")) == NULL )
{
printf("popen() error!\n");
return 1;
}
fgets(date_str, sizeof(date_str),ps);
printf("%s\n",date_str);
pclose(ps);
if((ps = popen("df -h | grep rootfs | awk '{print $5}'", "r")) == NULL )
{
printf("popen() error!\n");
return 1;
}
memset(date_str,0,sizeof(date_str));
fgets(date_str, sizeof(date_str),ps);
printf("%s\n",date_str);
pclose(ps);
return 0;
}
|
Add date and storage percent functions.
|
Add date and storage percent functions.
|
C
|
mit
|
wigcheng/pi_apps
|
6f49fe976a26bbf302f4a9c1ee82f11e0652417c
|
DKNightVersion/DKNightVersion.h
|
DKNightVersion/DKNightVersion.h
|
//
// DKNightVersion.h
// DKNightVerision
//
// Created by Draveness on 4/14/15.
// Copyright (c) 2015 Draveness. All rights reserved.
//
//! Project version string for MyFramework.
FOUNDATION_EXPORT const unsigned char DKNightVersionVersionString[];
//! Project version number for MyFramework.
FOUNDATION_EXPORT double DKNightVersionVersionNumber;
#ifndef _DKNIGHTVERSION_
#define _DKNIGHTVERSION_
#import <Core/DKColor.h>
#import <Core/DKImage.h>
#import <Core/DKNightVersionManager.h>
#import <Core/NSObject+Night.h>
#import <ColorTable/DKColorTable.h>
#import <UIKit/UIKit+Night.h>
#import <CoreAnimation/CoreAnimation+Night.h>
#endif /* _DKNIGHTVERSION_ */
|
//
// DKNightVersion.h
// DKNightVerision
//
// Created by Draveness on 4/14/15.
// Copyright (c) 2015 Draveness. All rights reserved.
//
//! Project version string for MyFramework.
FOUNDATION_EXPORT const unsigned char DKNightVersionVersionString[];
//! Project version number for MyFramework.
FOUNDATION_EXPORT double DKNightVersionVersionNumber;
#ifndef _DKNIGHTVERSION_
#define _DKNIGHTVERSION_
#import "Core/DKColor.h"
#import "Core/DKImage.h"
#import "Core/DKNightVersionManager.h"
#import "Core/NSObject+Night.h"
#import "ColorTable/DKColorTable.h"
#import "UIKit/UIKit+Night.h"
#import "CoreAnimation/CoreAnimation+Night.h"
#endif /* _DKNIGHTVERSION_ */
|
Use " instead of angle bracket
|
Use " instead of angle bracket
|
C
|
mit
|
Draveness/DKNightVersion,Draveness/DKNightVersion,Draveness/DKNightVersion,ungacy/DKNightVersion,ungacy/DKNightVersion,ungacy/DKNightVersion
|
4f1646b404a3ee061679b47e5f284605866a5e74
|
gui/webdisplay/inc/LinkDef.h
|
gui/webdisplay/inc/LinkDef.h
|
/*************************************************************************
* Copyright (C) 1995-2017, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class ROOT::Experimental::TWebWindow;
#pragma link C++ class ROOT::Experimental::TWebWindowsManager;
#endif
|
/*************************************************************************
* Copyright (C) 1995-2017, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class ROOT::Experimental::TWebWindow+;
#pragma link C++ class ROOT::Experimental::TWebWindowsManager+;
#endif
|
Add +: use the proper streamer.
|
Add +: use the proper streamer.
|
C
|
lgpl-2.1
|
root-mirror/root,root-mirror/root,olifre/root,karies/root,olifre/root,karies/root,karies/root,root-mirror/root,karies/root,root-mirror/root,olifre/root,root-mirror/root,karies/root,karies/root,karies/root,olifre/root,karies/root,root-mirror/root,karies/root,root-mirror/root,olifre/root,olifre/root,root-mirror/root,karies/root,olifre/root,root-mirror/root,olifre/root,olifre/root,olifre/root,olifre/root,root-mirror/root,root-mirror/root,karies/root
|
ce37c4c11c5fb76788b2b6a04c51107941b6f518
|
src/main.c
|
src/main.c
|
//
// main.c
// converter - Command-line number converter to Mac OS
//
// Created by Paulo Ricardo Paz Vital on 23/05/15.
// Copyright (c) 2015 pvital Solutions. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
void usage(void) {
printf("usage: convert decimal_number \n");
}
int main(int argc, const char * argv[]) {
int decimal;
if (argc < 2 || argc > 3) {
usage();
return -1;
}
decimal = atoi(argv[1]);
if (decimal < 0) {
printf("ERROR: decimal number must be greater than zero (0).\n");
return -1;
}
if (decimal > INT_MAX) {
printf("ERROR: maximum decimal number supported is %d.\n", INT_MAX);
return -1;
}
return 0;
}
|
//
// main.c
// converter - Command-line number converter to Mac OS
//
// Created by Paulo Ricardo Paz Vital on 23/05/15.
// Copyright (c) 2015 pvital Solutions. All rights reserved.
//
#include <stdio.h>
#include <stdlib.h>
#include <limits.h>
void usage(void) {
printf("usage: convert decimal_number \n");
}
void dec2bin(int decimal) {
int remainder[32];
int quocient = decimal, i = 0;
while (quocient >= 2) {
remainder[i] = quocient % 2;
quocient = quocient / 2;
i++;
}
// add the last quocient in the end of remainder list
remainder[i] = quocient;
// print the remainder list in the revert order
printf ("The decimal number %d in binary is: ", decimal);
while (i >= 0) {
printf("%d", remainder[i]);
i--;
}
printf("\n");
}
int main(int argc, const char * argv[]) {
int decimal;
if (argc < 2 || argc > 3) {
usage();
return -1;
}
decimal = atoi(argv[1]);
if (decimal < 0) {
printf("ERROR: decimal number must be greater than zero (0).\n");
return -1;
}
if (decimal > INT_MAX) {
printf("ERROR: maximum decimal number supported is %d.\n", INT_MAX);
return -1;
}
dec2bin(decimal);
return 0;
}
|
Add decimal to binary conversion.
|
Add decimal to binary conversion.
Add function to convert decimal to binary.
Signed-off-by: Paulo Vital <56235ab4620bb40c4cfee535b2e93f80c23e9ac8@gmail.com>
|
C
|
mit
|
pvital/converter
|
0d0f6c5793f01a6ef27140ec881d2f5605d5260e
|
src/main.h
|
src/main.h
|
#ifndef _MAIN_H_
#define _MAIN_H_
#define PROGRAM_MAJOR_VERSION 0
#define PROGRAM_MINOR_VERSION 0
#define PROGRAM_PATCH_VERSION 6
#endif /* _MAIN_H_ */
|
#ifndef _MAIN_H_
#define _MAIN_H_
#define PROGRAM_MAJOR_VERSION 0
#define PROGRAM_MINOR_VERSION 1
#define PROGRAM_PATCH_VERSION 0
#endif /* _MAIN_H_ */
|
Increase game version to 0.1.0.
|
Increase game version to 0.1.0.
|
C
|
mit
|
zear/HomingFever
|
b076232c0cf6240f09f28b89bacfafd09cee61f9
|
src/user.c
|
src/user.c
|
task usercontrol(){
int DY, DT;
bool armsLocked = false;
while(true){
//Driving
DY = threshold(PAIRED_CH2, 15) + (PAIRED_BTN8U * MAX_POWER) - (PAIRED_BTN8D * MAX_POWER);
DT = threshold(PAIRED_CH1, 15) + (PAIRED_BTN8R * MAX_POWER) - (PAIRED_BTN8L * MAX_POWER);
drive(DY, DT);
//Pistons (toggle)
if(PAIRED_BTN7R){
pistons(!PISTON_POS);
waitUntil(!PAIRED_BTN7R);
}
//Arms
if(PAIRED_BTN7L){
armsLocked = !armsLocked;
waitUntil(!PAIRED_BTN7L);
}
if(armsLocked){
arms(ARM_LOCK);
} else {
arms(threshold(PAIRED_CH3, 15) + ((PAIRED_BTN5U - PAIRED_BTN5D) * MAX_POWER));
}
//Lift
lift((PAIRED_BTN7U - PAIRED_BTN7D) * MAX_POWER);
//Intake
intake((PAIRED_BTN6U - PAIRED_BTN6D) * MAX_POWER);
}
}
|
task usercontrol(){
int DY, DT;
bool armsLocked = false;
while(true){
//Driving
DY = threshold(PAIRED_CH2, 15) + (PAIRED_BTN8U * MAX_POWER) - (PAIRED_BTN8D * MAX_POWER);
DT = threshold(PAIRED_CH1, 15) + (PAIRED_BTN8R * MAX_POWER) - (PAIRED_BTN8L * MAX_POWER);
drive(DY, DT);
//Pistons (toggle)
if(PAIRED_BTN7R){
pistons(!PISTON_POS);
waitUntil(!PAIRED_BTN7R);
}
//Arms
if(PAIRED_BTN7L){
armsLocked = !armsLocked;
waitUntil(!PAIRED_BTN7L);
}
if(armsLocked){
arms(ARM_LOCK);
} else {
arms(threshold(PAIRED_CH3, 15) + ((PAIRED_BTN6U - PAIRED_BTN6D) * MAX_POWER));
}
//Lift
lift((PAIRED_BTN7U - PAIRED_BTN7D) * MAX_POWER);
//Intake
intake((PAIRED_BTN5U - PAIRED_BTN5D) * MAX_POWER);
}
}
|
Swap back the arm and intake buttons
|
Swap back the arm and intake buttons
Erik didn't like the change since he was very used to the old
layout. It made sense at the time to put the arm joystick and
buttons on the same side, but I guess not.
|
C
|
mit
|
18moorei/code-red-in-the-zone
|
c5108966b7554cacde02ea0b141e54639e1dcd1d
|
src/stdafx.h
|
src/stdafx.h
|
#pragma once
// std headers
#include <string>
#include <vector>
#include <set>
#include <functional>
// windows header
#ifdef _WIN32
#define NOMINMAX
#include <windows.h>
#endif
// common ogre headers
#include "OgrePrerequisites.h"
#include "OgreString.h"
#include "OgreRoot.h"
#include "OgreRenderWindow.h"
#include "OgreCamera.h"
#include "OgreItem.h"
#include "OgreHlmsManager.h"
#include "OgreHlmsTextureManager.h"
// common qt headers
#include <QString>
#include <QWidget>
#include <QDebug>
#include "scopeguard.h"
|
#pragma once
// std headers
#include <string>
#include <vector>
#include <functional>
// windows header
#ifdef _WIN32
#define NOMINMAX
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#endif
// common ogre headers
#include "OgrePrerequisites.h"
#include "OgreString.h"
#include "OgreRoot.h"
#include "OgreRenderWindow.h"
#include "OgreCamera.h"
#include "OgreItem.h"
#include "OgreHlmsManager.h"
#include "OgreHlmsTextureManager.h"
// common qt headers
#include <QString>
#include <QWidget>
#include <QDebug>
#include "scopeguard.h"
|
Define WIN32_LEAN_AND_MEAN to reduce the pre-compiled header size
|
Define WIN32_LEAN_AND_MEAN to reduce the pre-compiled header size
|
C
|
mit
|
chchwy/ogre-v2-mesh-viewer,chchwy/ogre-v2-mesh-viewer
|
3423a5f810efdc0125b4a25e74ecb5c6a4b31e5f
|
src/main.c
|
src/main.c
|
/*
* main.c
*
* Created: 4/3/2014 8:36:43 AM
* Author: razius
*/
#include <avr/io.h>
#include <avr/interrupt.h>
int main(void){
// Clear Timer on Compare Match (CTC) Mode with OCRnA as top.
TCCR4B |= _BV(WGM42);
// Toggle OCnA on compare match
TCCR4A |= _BV(COM4A0);
// clk / (2 * prescaler * (1 + OCRnA))
OCR4AH = 0x7A;
OCR4AL = 0x12;
// Setup Timer 0 pre-scaler to clk/256
TCCR4B |= _BV(CS42);
// Setup PH3 to output
DDRH |= _BV(DDH3);
// Enable MCU interrupt (set I-flag)
sei();
while (1) {
}
return 0;
}
|
/*
* main.c
*
* Created: 4/3/2014 8:36:43 AM
* Author: razius
*/
#include <avr/io.h>
#include <avr/interrupt.h>
uint8_t SECONDS = 0x00;
int main(void){
// Clear Timer on Compare Match (CTC) Mode with OCRnA as top.
TCCR1A |= _BV(WGM12);
// clk / (2 * prescaler * (1 + OCRnA))
OCR1AH = 0x7A;
OCR1AL = 0x12;
// Setup Timer 0 pre-scaler to clk/256
TCCR1B |= _BV(CS12);
// Enable Timer/Counter4 overflow interrupt.
TIMSK1 = _BV(TOIE1);
// Setup PH3 to output
DDRH = 0xFF;
// Enable MCU interrupt (set I-flag)
sei();
while (1) {
PORTH = ~SECONDS;
}
return 0;
}
ISR(TIMER1_OVF_vect){
// Setup PH3 to output
// DDRH |= _BV(DDH3);
// PORTH = PORTH << 1;
if (SECONDS < 60) {
SECONDS++;
}
else {
SECONDS = 0x00;
}
}
|
Increment seconds and show them using LED's.
|
Increment seconds and show them using LED's.
|
C
|
mit
|
razius/nixie-clock,razius/nixie-clock
|
36a20e62b3a48ba52633f9009010fc3547263026
|
src/main.c
|
src/main.c
|
/*
* main.c - where it all begins
*/
#include <std.h>
#include <io.h>
#include <vt100.h>
#include <clock.h>
void function( ) {
kprintf_string( "Interrupt!\n" );
vt_flush();
__asm__ ( "movs pc, lr" );
}
int main(int argc, char* argv[]) {
UNUSED(argc);
UNUSED(argv);
uart_init();
vt_blank();
vt_hide();
debug_message("Welcome to ferOS v%u", __BUILD__);
debug_message("Built %s %s", __DATE__, __TIME__);
// tell the CPU where to handle software interrupts
// void** irq_handler = (void**)0x28;
// *irq_handler = (void*)function;
/*
int i;
for( i = 8; i < 255; i += 4 ) {
irq_handler[i/4] = (void*)function;
}
*/
// __asm__ ("swi 1");
// kprintf_string( "RETURNED" );
// vt_flush();
bool done = false;
while (1) {
vt_read();
vt_write();
if (!done) {
kprintf_cpsr();
done = true;
}
}
vt_blank();
vt_flush();
return 0;
}
|
/*
* main.c - where it all begins
*/
#include <std.h>
#include <io.h>
#include <vt100.h>
#include <clock.h>
void function( ) {
kprintf_string( "Interrupt!\n" );
vt_flush();
__asm__ ( "movs pc, lr" );
}
int main(int argc, char* argv[]) {
UNUSED(argc);
UNUSED(argv);
uart_init();
vt_blank();
vt_hide();
debug_message("Welcome to ferOS build %u", __BUILD__);
debug_message("Built %s %s", __DATE__, __TIME__);
// tell the CPU where to handle software interrupts
// void** irq_handler = (void**)0x28;
// *irq_handler = (void*)function;
/*
int i;
for( i = 8; i < 255; i += 4 ) {
irq_handler[i/4] = (void*)function;
}
*/
// __asm__ ("swi 1");
// kprintf_string( "RETURNED" );
// vt_flush();
bool done = false;
while (1) {
vt_read();
vt_write();
if (!done) {
kprintf_cpsr();
done = true;
}
}
vt_blank();
vt_flush();
return 0;
}
|
Use build number instead of version number in startup message
|
Use build number instead of version number in startup message
|
C
|
mit
|
ferrous26/cs452-flaming-meme,ferrous26/cs452-flaming-meme,ferrous26/cs452-flaming-meme
|
b0699787c413baf93974a2b39f89117acfe55780
|
src/sys_io.h
|
src/sys_io.h
|
/*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*/
#define STDOUT_FD 1
#define STDERR_FD 2
#define FIRST_USER_FD 3
#define FILE_TYPE_CPIO 0
#define FILE_TYPE_SOCKET 1
#define FD_TABLE_SIZE(x) (sizeof(muslcsys_fd_t) * (x))
/* this implementation does not allow users to close STDOUT or STDERR, so they can't be freed */
#define FREE_FD_TABLE_SIZE(x) (sizeof(int) * ((x) - FIRST_USER_FD))
#define PAGE_SIZE_4K 4096
typedef struct muslcsys_fd {
int filetype;
void *data;
} muslcsys_fd_t;
int allocate_fd(void);
muslcsys_fd_t *get_fd_struct(int fd);
|
/*
* Copyright 2014, NICTA
*
* This software may be distributed and modified according to the terms of
* the BSD 2-Clause license. Note that NO WARRANTY is provided.
* See "LICENSE_BSD2.txt" for details.
*
* @TAG(NICTA_BSD)
*/
#ifndef __LIBSEL4MUSLCCAMKES_H__
#define __LIBSEL4MUSLCCAMKES_H__
#include <utils/page.h>
#define STDOUT_FD 1
#define STDERR_FD 2
#define FIRST_USER_FD 3
#define FILE_TYPE_CPIO 0
#define FILE_TYPE_SOCKET 1
#define FD_TABLE_SIZE(x) (sizeof(muslcsys_fd_t) * (x))
/* this implementation does not allow users to close STDOUT or STDERR, so they can't be freed */
#define FREE_FD_TABLE_SIZE(x) (sizeof(int) * ((x) - FIRST_USER_FD))
typedef struct muslcsys_fd {
int filetype;
void *data;
} muslcsys_fd_t;
int allocate_fd(void);
muslcsys_fd_t *get_fd_struct(int fd);
#endif
|
Add include guard and retrieve PAGE_SIZE_4K definition from libutils
|
Add include guard and retrieve PAGE_SIZE_4K definition from libutils
|
C
|
bsd-2-clause
|
smaccm/camkes-tool,smaccm/camkes-tool,smaccm/camkes-tool,smaccm/camkes-tool
|
6692b58d8121ebc82f4f8625b41d52261e37a1e9
|
src/main.c
|
src/main.c
|
/*
* Copyright 2019 Andrey Terekhov, Victor Y. Fadeev
*
* 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.
*/
#ifdef _MSC_VER
#pragma comment(linker, "/STACK:268435456")
#endif
#include "compiler.h"
#include "workspace.h"
const char *name = "../tests/executable/structures/SELECT_9459.c";
// "../tests/mips/0test.c";
int main(int argc, const char *argv[])
{
workspace ws = ws_parse_args(argc, argv);
if (argc < 2)
{
ws_add_file(&ws, name);
ws_set_output(&ws, "export.txt");
}
#ifdef TESTING_EXIT_CODE
return compile(&ws) ? TESTING_EXIT_CODE : 0;
#else
return compile(&ws);
#endif
}
|
/*
* Copyright 2019 Andrey Terekhov, Victor Y. Fadeev
*
* 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.
*/
#ifdef _MSC_VER
#pragma comment(linker, "/STACK:268435456")
#endif
#include "compiler.h"
#include "workspace.h"
const char *name = "../tests/executable/structures/SELECT_9459.c";
// "../tests/mips/0test.c";
int main(int argc, const char *argv[])
{
workspace ws = ws_parse_args(argc, argv);
if (argc < 2)
{
ws_add_file(&ws, name);
ws_add_flag(&ws, "-Wno");
ws_set_output(&ws, "export.txt");
}
#ifdef TESTING_EXIT_CODE
return compile(&ws) ? TESTING_EXIT_CODE : 0;
#else
return compile(&ws);
#endif
}
|
Add default flag for Xcode usage
|
Add default flag for Xcode usage
|
C
|
apache-2.0
|
andrey-terekhov/RuC,andrey-terekhov/RuC,andrey-terekhov/RuC
|
b99a32d6435babff2f8dec6498252f088ea176cc
|
src/uwatec.h
|
src/uwatec.h
|
#ifndef UWATEC_H
#define UWATEC_H
#include "device.h"
#define UWATEC_SUCCESS 0
#define UWATEC_ERROR -1
#define UWATEC_ERROR_IO -2
#define UWATEC_ERROR_MEMORY -3
#define UWATEC_ERROR_PROTOCOL -4
#define UWATEC_ERROR_TIMEOUT -5
#include "uwatec_aladin.h"
#include "uwatec_memomouse.h"
#include "uwatec_smart.h"
#endif /* UWATEC_H */
|
#ifndef UWATEC_H
#define UWATEC_H
#include "uwatec_aladin.h"
#include "uwatec_memomouse.h"
#include "uwatec_smart.h"
#endif /* UWATEC_H */
|
Remove all remaining pieces of the legacy api from the Uwatec code.
|
Remove all remaining pieces of the legacy api from the Uwatec code.
|
C
|
lgpl-2.1
|
Poltsi/libdivecomputer-vms,josh-wambua/libdivecomputer,andysan/libdivecomputer,andysan/libdivecomputer,henrik242/libdivecomputer,glance-/libdivecomputer,venkateshshukla/libdivecomputer,glance-/libdivecomputer,henrik242/libdivecomputer,josh-wambua/libdivecomputer,venkateshshukla/libdivecomputer
|
37fa82f138043b8503c2a05b5959145da46b5062
|
Alc/evtqueue.h
|
Alc/evtqueue.h
|
#ifndef AL_EVTQUEUE_H
#define AL_EVTQUEUE_H
#include "AL/al.h"
typedef struct MidiEvent {
ALuint time;
ALuint event;
ALuint param[2];
} MidiEvent;
typedef struct EvtQueue {
MidiEvent *events;
ALsizei pos;
ALsizei size;
ALsizei maxsize;
} EvtQueue;
void InitEvtQueue(EvtQueue *queue);
void ResetEvtQueue(EvtQueue *queue);
ALenum InsertEvtQueue(EvtQueue *queue, const MidiEvent *evt);
#endif /* AL_EXTQUEUE_H */
|
#ifndef AL_EVTQUEUE_H
#define AL_EVTQUEUE_H
#include "AL/al.h"
#include "alMain.h"
typedef struct MidiEvent {
ALuint64 time;
ALuint event;
ALuint param[2];
} MidiEvent;
typedef struct EvtQueue {
MidiEvent *events;
ALsizei pos;
ALsizei size;
ALsizei maxsize;
} EvtQueue;
void InitEvtQueue(EvtQueue *queue);
void ResetEvtQueue(EvtQueue *queue);
ALenum InsertEvtQueue(EvtQueue *queue, const MidiEvent *evt);
#endif /* AL_EVTQUEUE_H */
|
Use a 64-bit uint for MIDI event times
|
Use a 64-bit uint for MIDI event times
|
C
|
lgpl-2.1
|
alexxvk/openal-soft,mmozeiko/OpenAL-Soft,irungentoo/openal-soft-tox,franklixuefei/openal-soft,Wemersive/openal-soft,BeamNG/openal-soft,franklixuefei/openal-soft,aaronmjacobs/openal-soft,aaronmjacobs/openal-soft,arkana-fts/openal-soft,BeamNG/openal-soft,arkana-fts/openal-soft,Wemersive/openal-soft,alexxvk/openal-soft,mmozeiko/OpenAL-Soft,irungentoo/openal-soft-tox
|
176939282e3097fd8b597ca6dcfdbc733a2ce1b0
|
vm/scope.h
|
vm/scope.h
|
#ifndef SCOPE_DEF
#define SCOPE_DEF
#include "hashmap.h"
#include <stdint.h>
typedef struct Scope
{
V file;
V func;
V parent;
int index;
bool is_func_scope;
bool is_error_handler;
uint32_t linenr;
uint32_t* pc;
struct HashMap hm;
} Scope;
typedef struct
{
Value v;
Scope sc;
} ValueScope;
#define MAXCACHE 1024
ValueScope SCOPECACHE[MAXCACHE];
int MAXSCOPE;
V new_scope(V);
V new_function_scope(V);
V new_file_scope(V);
V new_global_scope(void);
#endif
|
#ifndef SCOPE_DEF
#define SCOPE_DEF
#include "hashmap.h"
#include <stdint.h>
typedef struct Scope
{
V file;
V func;
V parent;
int index;
uint32_t is_func_scope : 4;
uint32_t is_error_handler : 4;
uint32_t linenr : 24;
uint32_t* pc;
struct HashMap hm;
} Scope;
typedef struct
{
Value v;
Scope sc;
} ValueScope;
#define MAXCACHE 1024
ValueScope SCOPECACHE[MAXCACHE];
int MAXSCOPE;
V new_scope(V);
V new_function_scope(V);
V new_file_scope(V);
V new_global_scope(void);
#endif
|
Make Scope 8 bytes smaller
|
Make Scope 8 bytes smaller
|
C
|
isc
|
gvx/deja,gvx/deja,gvx/deja
|
85786354597a8c195bcabdf264d5b9046fa51a99
|
zuzeelik.c
|
zuzeelik.c
|
#include <stdio.h>
static char input[2048]; //declaring buffer for user input, size 2048
int main(int argc, char** argv) {
puts("zuzeelik Version 0.0.0-0.0.1");
puts("Press Ctrl+c to Exit \n");
/* Starting REPL */
while(1){
/* output from the prompt*/
fputs("zuzeelik> ", stdout);
/* read a line of the user of max size 2048 */
fgets(input, 2048, stdin);
/* Echo the input back to the user */
printf("Got Input: %s", input);
}
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
#include <editline/readline.h>
#include <editline/history.h>
int main(int argc, char** argv) {
puts("zuzeelik [version: v0.0.0-0.0.2]");
puts("Press Ctrl+C to Exit \n");
/* Starting REPL */
while(1){
/* output from the prompt*/
char* input = readline("zuzeelik> ");
/*Add input to history */
add_history(input);
/* Echo the input back to the user */
printf("Got Input: %s \n", input);
free(input);
}
return 0;
}
|
Add support for line editing and arrow keys
|
Add support for line editing and arrow keys
Added support for line editing in REPL and also added support for
arrow keys.
|
C
|
bsd-3-clause
|
shadow-stranger/zuzeelik,Mr-Kumar-Abhishek/zuzeelik
|
c1870a489c914b4d32c561dc59991dd05768488f
|
src/tokenizer/string_piece.h
|
src/tokenizer/string_piece.h
|
// This file is part of MorphoDiTa.
//
// Copyright 2013 by Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// MorphoDiTa is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// MorphoDiTa 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 MorphoDiTa. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <cstring>
#include "common.h"
namespace ufal {
namespace morphodita {
struct string_piece {
const char* str;
size_t len;
string_piece() : str(nullptr), len(0) {}
string_piece(const char* str) : str(str), len(strlen(str)) {}
string_piece(const char* str, size_t len) : str(str), len(len) {}
string_piece(const std::string& str) : str(str.c_str()), len(str.size()) {}
};
} // namespace morphodita
}
|
// This file is part of MorphoDiTa.
//
// Copyright 2013 by Institute of Formal and Applied Linguistics, Faculty of
// Mathematics and Physics, Charles University in Prague, Czech Republic.
//
// MorphoDiTa is free software: you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation, either version 3 of
// the License, or (at your option) any later version.
//
// MorphoDiTa 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 MorphoDiTa. If not, see <http://www.gnu.org/licenses/>.
#pragma once
#include <cstring>
#include "common.h"
namespace ufal {
namespace morphodita {
struct string_piece {
const char* str;
size_t len;
string_piece() : str(nullptr), len(0) {}
string_piece(const char* str) : str(str), len(strlen(str)) {}
string_piece(const char* str, size_t len) : str(str), len(len) {}
string_piece(const std::string& str) : str(str.c_str()), len(str.size()) {}
};
} // namespace morphodita
} // namespace ufal
|
Add forgotten comment on namespace closing.
|
Add forgotten comment on namespace closing.
|
C
|
mpl-2.0
|
ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita,ufal/morphodita
|
6b2564c5d968657a35025239ee681f288d83be41
|
test/Sema/vla.c
|
test/Sema/vla.c
|
// RUN: clang %s -verify -fsyntax-only
int test1() {
typedef int x[test1()]; // vla
static int y = sizeof(x); // expected-error {{not constant}}
}
// PR2347
void f (unsigned int m)
{
extern int e[2][m];
e[0][0] = 0;
}
|
// RUN: clang %s -verify -fsyntax-only
int test1() {
typedef int x[test1()]; // vla
static int y = sizeof(x); // expected-error {{not constant}}
}
// PR2347
void f (unsigned int m)
{
int e[2][m];
e[0][0] = 0;
}
|
Fix this test so that it's valid; the point is to test for the crash, not the missing diagnostic.
|
Fix this test so that it's valid; the point is to test for the crash,
not the missing diagnostic.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@51365 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/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,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,apple/swift-clang,apple/swift-clang
|
1b64723ef89dc74d6b6079332dfc1a6aacf81a5a
|
timeout_getaline.c
|
timeout_getaline.c
|
#include "leafnode.h"
#include "ln_log.h"
#include <signal.h>
#include <setjmp.h>
#include <unistd.h>
static jmp_buf to;
static void
timer(int sig)
{
(void)sig;
longjmp(to, 1);
}
/*
* call getaline with timeout
*/
char *
timeout_getaline(FILE * f, int timeout)
{
char *l;
if (setjmp(to)) {
ln_log(LNLOG_SERR, LNLOG_CTOP, "timeout reading.");
return NULL;
}
(void)signal(SIGALRM, timer);
(void)alarm(timeout);
l = getaline(f);
(void)alarm(0U);
return l;
}
char *
mgetaline(FILE * f)
{
return timeout_getaline(f, 120);
}
|
#include "leafnode.h"
#include "ln_log.h"
#include <signal.h>
#include <setjmp.h>
#include <unistd.h>
static jmp_buf to;
static void
timer(int sig)
{
(void)sig;
longjmp(to, 1);
}
/*
* call getaline with timeout
*/
char *
timeout_getaline(FILE * f, int timeout)
{
char *l;
if (setjmp(to)) {
ln_log(LNLOG_SERR, LNLOG_CTOP, "timeout reading.");
return NULL;
}
(void)signal(SIGALRM, timer);
(void)alarm(timeout);
l = getaline(f);
(void)alarm(0U);
return l;
}
char *
mgetaline(FILE * f)
{
return timeout_getaline(f, 300);
}
|
Change timeout from 2 to 5 minutes, Jörg Dietrich had suggested to Change timeout from 2 to 5 minutes, Jörg Dietrich had suggested to increase it to 3 minutes, to correspond with current NNTP drafts.
|
Change timeout from 2 to 5 minutes, Jörg Dietrich had suggested to
Change timeout from 2 to 5 minutes, Jörg Dietrich had suggested to
increase it to 3 minutes, to correspond with current NNTP drafts.
|
C
|
lgpl-2.1
|
BackupTheBerlios/leafnode,BackupTheBerlios/leafnode,BackupTheBerlios/leafnode,BackupTheBerlios/leafnode
|
c11b389556d4feec943ced7eeb3125a598d3bba4
|
test/Driver/darwin-eabi.c
|
test/Driver/darwin-eabi.c
|
// RUN: %clang -arch armv7 -target thumbv7-apple-darwin-eabi -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-AAPCS
// RUN: %clang -arch armv7 -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-APCS
// RUN: %clang -arch armv7s -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-APCS
// RUN: %clang -arch armv7s -target thumbv7-apple-darwin -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-APCS
// CHECK-AAPCS: "-target-abi" "aapcs"
// CHECK-APCS: "-target-abi" "apcs-gnu"
|
// RUN: %clang -arch armv7 -target thumbv7-apple-darwin-eabi -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-AAPCS
// RUN: %clang -arch armv7s -target thumbv7-apple-ios -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-APCS
// RUN: %clang -arch armv7s -target thumbv7-apple-darwin -### -c %s 2>&1 | FileCheck %s --check-prefix=CHECK-APCS
// CHECK-AAPCS: "-target-abi" "aapcs"
// CHECK-APCS: "-target-abi" "apcs-gnu"
|
Fix test to work on Linux hosts by specifying triple.
|
Fix test to work on Linux hosts by specifying triple.
Thought I'd checked that before
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@191901 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-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,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang
|
c665d9cee82b12dc9ab1eff25d445eb74a6e5863
|
test/CodeGen/thinlto-debug-pm.c
|
test/CodeGen/thinlto-debug-pm.c
|
// Test to ensure -fdebug-pass-manager works when invoking the
// ThinLTO backend path with the new PM.
// RUN: %clang -O2 %s -flto=thin -c -o %t.o
// RUN: llvm-lto -thinlto -o %t %t.o
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-obj -O2 -o %t2.o -x ir %t.o -fthinlto-index=%t.thinlto.bc -fdebug-pass-manager -fexperimental-new-pass-manager 2>&1 | FileCheck %s
// CHECK: Running pass:
void foo() {
}
|
// Test to ensure -fdebug-pass-manager works when invoking the
// ThinLTO backend path with the new PM.
// REQUIRES: x86-registered-target
// RUN: %clang -O2 %s -flto=thin -c -o %t.o
// RUN: llvm-lto -thinlto -o %t %t.o
// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -emit-obj -O2 -o %t2.o -x ir %t.o -fthinlto-index=%t.thinlto.bc -fdebug-pass-manager -fexperimental-new-pass-manager 2>&1 | FileCheck %s
// CHECK: Running pass:
void foo() {
}
|
Add x86-registered-target to REQUIRES for new test
|
Add x86-registered-target to REQUIRES for new test
Should fix test added in r317951.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@317952 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/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,apple/swift-clang,llvm-mirror/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
|
cb63e07c588dc7030f3f41812dea73f3571e449a
|
test/Frontend/diagnostic-name.c
|
test/Frontend/diagnostic-name.c
|
// RUN: %clang -Wunused-parameter -fdiagnostics-show-name %s 2>&1 | grep "\[warn_unused_parameter\]" | count 1
// RUN: %clang -Wunused-parameter -fno-diagnostics-show-name %s 2>&1 | grep "\[warn_unused_parameter\]" | count 0
int main(int argc, char *argv[]) {
return argc;
}
|
// RUN: %clang -fsyntax-only -Wunused-parameter -fdiagnostics-show-name %s 2>&1 | grep "\[warn_unused_parameter\]" | count 1
// RUN: %clang -fsyntax-only -Wunused-parameter -fno-diagnostics-show-name %s 2>&1 | grep "\[warn_unused_parameter\]" | count 0
int main(int argc, char *argv[]) {
return argc;
}
|
Stop leaving a.out files around.
|
Stop leaving a.out files around.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@131396 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-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,llvm-mirror/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,apple/swift-clang,llvm-mirror/clang
|
88cd7aa7965d5a7bade3f943e1419cf0c59d225b
|
config_vc.h
|
config_vc.h
|
#ifndef HMLIB_CONFIGVC_INC
#define HMLIB_CONFIGVC_INC 101
#
/*===config_vc===
VisualStudio C/C++の設定用マクロ
config_vc_v1_01/121204 hmIto
拡張子をhppからhに変更
インクルードガードマクロの不要なアンダーバーを消去
*/
#ifdef _MSC_VER
# //windows.hのmin,maxを使わせない
# ifndef NOMINMAX
# define NOMINMAX
# endif
# //古いunsafeな関数群使用による警告回避
# define _CRT_SECURE_NO_WARNINGS
# define _AFX_SECURE_NO_WARNINGS
# define _ATL_SECURE_NO_WARNINGS
# define _SCL_SECURE_NO_WARNINGS
#endif
#
#endif
|
#ifndef HMLIB_CONFIGVC_INC
#define HMLIB_CONFIGVC_INC 101
#
/*===config_vc===
VisualStudio C/C++の設定用マクロ
config_vc_v1_01/121204 hmIto
拡張子をhppからhに変更
インクルードガードマクロの不要なアンダーバーを消去
*/
#ifdef _MSC_VER
# //windows.hのmin,maxを使わせない
# ifndef NOMINMAX
# define NOMINMAX
# endif
# //古いunsafeな関数群使用による警告回避
# define _CRT_SECURE_NO_WARNINGS
# define _AFX_SECURE_NO_WARNINGS
# define _ATL_SECURE_NO_WARNINGS
# define _SCL_SECURE_NO_WARNINGS
# define _SILENCE_CXX17_ITERATOR_BASE_CLASS_DEPRECATION_WARNING
# define _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
#endif
#
#endif
|
Add C++17 depricated error ignore tag.
|
Add C++17 depricated error ignore tag.
|
C
|
mit
|
hmito/hmLib,hmito/hmLib
|
a7089ed884ed2227fc45671eda3fe979e43545b9
|
tests/files/transpiler/base_class.h
|
tests/files/transpiler/base_class.h
|
#ifndef BASE_CLASS_H_
#define BASE_CLASS_H_
class BaseAutoFunction {
public:
bool Init(CitrusRobot *robot, std::vector<void *>);
bool Periodic(CitrusRobot *robot, std::vector<void *>);
private:
//none
};
#endif
|
#ifndef BASE_CLASS_H_
#define BASE_CLASS_H_
class CitrusRobot;
class BaseAutoFunction {
public:
bool Init(CitrusRobot *robot, std::vector<void *>);
bool Periodic(CitrusRobot *robot, std::vector<void *>);
private:
//none
};
#endif
|
Fix compilation issue in tests by forward-declaring CitrusRobot
|
Fix compilation issue in tests by forward-declaring CitrusRobot
|
C
|
mit
|
WesleyAC/lemonscript-transpiler,WesleyAC/lemonscript-transpiler,WesleyAC/lemonscript-transpiler
|
60288500c0eca5d620a81637bc4d0d7e290befd4
|
lib/qtcamimagemode.h
|
lib/qtcamimagemode.h
|
// -*- c++ -*-
#ifndef QT_CAM_IMAGE_MODE_H
#define QT_CAM_IMAGE_MODE_H
#include "qtcammode.h"
#include <gst/pbutils/encoding-profile.h>
class QtCamDevicePrivate;
class QtCamImageModePrivate;
class QtCamImageSettings;
class QtCamImageMode : public QtCamMode {
Q_OBJECT
public:
QtCamImageMode(QtCamDevicePrivate *d, QObject *parent = 0);
~QtCamImageMode();
virtual bool canCapture();
virtual void applySettings();
bool capture(const QString& fileName);
bool setSettings(const QtCamImageSettings& settings);
void setProfile(GstEncodingProfile *profile);
signals:
void imageSaved(const QString& fileName);
protected:
virtual void start();
virtual void stop();
private:
QtCamImageModePrivate *d_ptr;
};
#endif /* QT_CAM_IMAGE_MODE_H */
|
// -*- c++ -*-
#ifndef QT_CAM_IMAGE_MODE_H
#define QT_CAM_IMAGE_MODE_H
#include "qtcammode.h"
#include <gst/pbutils/encoding-profile.h>
class QtCamDevicePrivate;
class QtCamImageModePrivate;
class QtCamImageSettings;
class QtCamImageMode : public QtCamMode {
Q_OBJECT
public:
QtCamImageMode(QtCamDevicePrivate *d, QObject *parent = 0);
~QtCamImageMode();
virtual bool canCapture();
virtual void applySettings();
bool capture(const QString& fileName);
bool setSettings(const QtCamImageSettings& settings);
void setProfile(GstEncodingProfile *profile);
protected:
virtual void start();
virtual void stop();
private:
QtCamImageModePrivate *d_ptr;
};
#endif /* QT_CAM_IMAGE_MODE_H */
|
Remove imageSaved() signal as it is old code.
|
Remove imageSaved() signal as it is old code.
|
C
|
lgpl-2.1
|
mlehtima/cameraplus,mer-hybris-kis3/cameraplus,mer-hybris-kis3/cameraplus,alinelena/cameraplus,mer-hybris-kis3/cameraplus,alinelena/cameraplus,mlehtima/cameraplus,alinelena/cameraplus,foolab/cameraplus,mer-hybris-kis3/cameraplus,foolab/cameraplus,foolab/cameraplus,mlehtima/cameraplus,foolab/cameraplus,mlehtima/cameraplus,alinelena/cameraplus
|
43e98256254baeacdbc6a9af90385ec68c1cda3d
|
include/rocksdb/utilities/convenience.h
|
include/rocksdb/utilities/convenience.h
|
// Copyright (c) 2014, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
#pragma once
#include "utilities/pragma_error.h"
// TODO(agiardullo): need to figure out how to make this portable
// ROCKSDB_WARNING("This file was moved to rocksdb/convenience.h")
#include "rocksdb/convenience.h"
|
// Copyright (c) 2014, Facebook, Inc. All rights reserved.
// This source code is licensed under the BSD-style license found in the
// LICENSE file in the root directory of this source tree. An additional grant
// of patent rights can be found in the PATENTS file in the same directory.
#pragma once
// #include "utilities/pragma_error.h"
// TODO(agiardullo): need to figure out how to make this portable
// ROCKSDB_WARNING("This file was moved to rocksdb/convenience.h")
#include "rocksdb/convenience.h"
|
Fix mongo build -take 2
|
Fix mongo build -take 2
Summary: quick fix for now. will figure out a better fix soon
Test Plan: build
Reviewers: sdong, igor, kradhakrishnan
Subscribers: dhruba, leveldb
Differential Revision: https://reviews.facebook.net/D42381
|
C
|
bsd-3-clause
|
flabby/rocksdb,wenduo/rocksdb,vmx/rocksdb,kaschaeffer/rocksdb,anagav/rocksdb,biddyweb/rocksdb,JohnPJenkins/rocksdb,SunguckLee/RocksDB,wskplho/rocksdb,anagav/rocksdb,JohnPJenkins/rocksdb,luckywhu/rocksdb,RyanTech/rocksdb,anagav/rocksdb,norton/rocksdb,dkorolev/rocksdb,JackLian/rocksdb,JohnPJenkins/rocksdb,RyanTech/rocksdb,siddhartharay007/rocksdb,facebook/rocksdb,kaschaeffer/rocksdb,makelivedotnet/rocksdb,SunguckLee/RocksDB,jalexanderqed/rocksdb,SunguckLee/RocksDB,makelivedotnet/rocksdb,mbarbon/rocksdb,biddyweb/rocksdb,mbarbon/rocksdb,luckywhu/rocksdb,lgscofield/rocksdb,skunkwerks/rocksdb,hobinyoon/rocksdb,dkorolev/rocksdb,mbarbon/rocksdb,alihalabyah/rocksdb,ryneli/rocksdb,hobinyoon/rocksdb,biddyweb/rocksdb,temicai/rocksdb,flabby/rocksdb,anagav/rocksdb,ryneli/rocksdb,caijieming-baidu/rocksdb,facebook/rocksdb,wenduo/rocksdb,Applied-Duality/rocksdb,wenduo/rocksdb,OverlordQ/rocksdb,zhangpng/rocksdb,Andymic/rocksdb,Vaisman/rocksdb,dkorolev/rocksdb,kaschaeffer/rocksdb,tsheasha/rocksdb,norton/rocksdb,temicai/rocksdb,SunguckLee/RocksDB,geraldoandradee/rocksdb,flabby/rocksdb,norton/rocksdb,wat-ze-hex/rocksdb,wat-ze-hex/rocksdb,ylong/rocksdb,tsheasha/rocksdb,RyanTech/rocksdb,jalexanderqed/rocksdb,fengshao0907/rocksdb,siddhartharay007/rocksdb,caijieming-baidu/rocksdb,bbiao/rocksdb,alihalabyah/rocksdb,alihalabyah/rocksdb,geraldoandradee/rocksdb,RyanTech/rocksdb,makelivedotnet/rocksdb,Vaisman/rocksdb,jalexanderqed/rocksdb,JoeWoo/rocksdb,ylong/rocksdb,flabby/rocksdb,caijieming-baidu/rocksdb,hobinyoon/rocksdb,kaschaeffer/rocksdb,biddyweb/rocksdb,skunkwerks/rocksdb,wenduo/rocksdb,kaschaeffer/rocksdb,bbiao/rocksdb,geraldoandradee/rocksdb,anagav/rocksdb,Applied-Duality/rocksdb,Applied-Duality/rocksdb,caijieming-baidu/rocksdb,wskplho/rocksdb,luckywhu/rocksdb,JackLian/rocksdb,tsheasha/rocksdb,JackLian/rocksdb,facebook/rocksdb,hobinyoon/rocksdb,wenduo/rocksdb,wskplho/rocksdb,norton/rocksdb,Vaisman/rocksdb,tizzybec/rocksdb,lgscofield/rocksdb,wskplho/rocksdb,ylong/rocksdb,JohnPJenkins/rocksdb,hobinyoon/rocksdb,wenduo/rocksdb,tizzybec/rocksdb,siddhartharay007/rocksdb,ylong/rocksdb,mbarbon/rocksdb,sorphi/rocksdb,JackLian/rocksdb,anagav/rocksdb,lgscofield/rocksdb,kaschaeffer/rocksdb,Vaisman/rocksdb,wat-ze-hex/rocksdb,anagav/rocksdb,vmx/rocksdb,zhangpng/rocksdb,Andymic/rocksdb,Andymic/rocksdb,fengshao0907/rocksdb,hobinyoon/rocksdb,facebook/rocksdb,SunguckLee/RocksDB,norton/rocksdb,vashstorm/rocksdb,ryneli/rocksdb,wat-ze-hex/rocksdb,biddyweb/rocksdb,fengshao0907/rocksdb,flabby/rocksdb,fengshao0907/rocksdb,skunkwerks/rocksdb,JoeWoo/rocksdb,wskplho/rocksdb,Andymic/rocksdb,JohnPJenkins/rocksdb,wlqGit/rocksdb,wat-ze-hex/rocksdb,vashstorm/rocksdb,siddhartharay007/rocksdb,Applied-Duality/rocksdb,norton/rocksdb,luckywhu/rocksdb,wlqGit/rocksdb,siddhartharay007/rocksdb,norton/rocksdb,wenduo/rocksdb,ryneli/rocksdb,SunguckLee/RocksDB,fengshao0907/rocksdb,tsheasha/rocksdb,makelivedotnet/rocksdb,JoeWoo/rocksdb,facebook/rocksdb,wskplho/rocksdb,luckywhu/rocksdb,skunkwerks/rocksdb,OverlordQ/rocksdb,dkorolev/rocksdb,vashstorm/rocksdb,jalexanderqed/rocksdb,geraldoandradee/rocksdb,facebook/rocksdb,RyanTech/rocksdb,makelivedotnet/rocksdb,JackLian/rocksdb,bbiao/rocksdb,hobinyoon/rocksdb,tsheasha/rocksdb,zhangpng/rocksdb,Andymic/rocksdb,bbiao/rocksdb,OverlordQ/rocksdb,lgscofield/rocksdb,vashstorm/rocksdb,wlqGit/rocksdb,alihalabyah/rocksdb,skunkwerks/rocksdb,OverlordQ/rocksdb,Vaisman/rocksdb,ryneli/rocksdb,Vaisman/rocksdb,jalexanderqed/rocksdb,JohnPJenkins/rocksdb,mbarbon/rocksdb,sorphi/rocksdb,sorphi/rocksdb,alihalabyah/rocksdb,skunkwerks/rocksdb,alihalabyah/rocksdb,SunguckLee/RocksDB,dkorolev/rocksdb,wat-ze-hex/rocksdb,facebook/rocksdb,zhangpng/rocksdb,JackLian/rocksdb,biddyweb/rocksdb,RyanTech/rocksdb,wenduo/rocksdb,dkorolev/rocksdb,OverlordQ/rocksdb,temicai/rocksdb,geraldoandradee/rocksdb,wat-ze-hex/rocksdb,ylong/rocksdb,temicai/rocksdb,wlqGit/rocksdb,ylong/rocksdb,fengshao0907/rocksdb,lgscofield/rocksdb,bbiao/rocksdb,Vaisman/rocksdb,vmx/rocksdb,zhangpng/rocksdb,mbarbon/rocksdb,caijieming-baidu/rocksdb,sorphi/rocksdb,Andymic/rocksdb,temicai/rocksdb,tizzybec/rocksdb,tsheasha/rocksdb,ryneli/rocksdb,vmx/rocksdb,JoeWoo/rocksdb,kaschaeffer/rocksdb,vashstorm/rocksdb,tizzybec/rocksdb,vmx/rocksdb,luckywhu/rocksdb,OverlordQ/rocksdb,Applied-Duality/rocksdb,Andymic/rocksdb,Andymic/rocksdb,vashstorm/rocksdb,sorphi/rocksdb,caijieming-baidu/rocksdb,siddhartharay007/rocksdb,makelivedotnet/rocksdb,wskplho/rocksdb,sorphi/rocksdb,wlqGit/rocksdb,tsheasha/rocksdb,zhangpng/rocksdb,RyanTech/rocksdb,tizzybec/rocksdb,flabby/rocksdb,zhangpng/rocksdb,facebook/rocksdb,bbiao/rocksdb,JohnPJenkins/rocksdb,tsheasha/rocksdb,temicai/rocksdb,temicai/rocksdb,norton/rocksdb,flabby/rocksdb,lgscofield/rocksdb,ylong/rocksdb,bbiao/rocksdb,dkorolev/rocksdb,jalexanderqed/rocksdb,tizzybec/rocksdb,Applied-Duality/rocksdb,geraldoandradee/rocksdb,vmx/rocksdb,OverlordQ/rocksdb,luckywhu/rocksdb,tizzybec/rocksdb,caijieming-baidu/rocksdb,makelivedotnet/rocksdb,JoeWoo/rocksdb,JoeWoo/rocksdb,wlqGit/rocksdb,Applied-Duality/rocksdb,geraldoandradee/rocksdb,SunguckLee/RocksDB,sorphi/rocksdb,skunkwerks/rocksdb,wlqGit/rocksdb,hobinyoon/rocksdb,jalexanderqed/rocksdb,mbarbon/rocksdb,alihalabyah/rocksdb,bbiao/rocksdb,vmx/rocksdb,lgscofield/rocksdb,fengshao0907/rocksdb,vmx/rocksdb,JoeWoo/rocksdb,JackLian/rocksdb,ryneli/rocksdb,wat-ze-hex/rocksdb,siddhartharay007/rocksdb,vashstorm/rocksdb,biddyweb/rocksdb
|
0829a30f266284d58acfc0e03f37d08be733ae02
|
test/CFrontend/2004-11-27-StaticFunctionRedeclare.c
|
test/CFrontend/2004-11-27-StaticFunctionRedeclare.c
|
// RUN: %llvmgcc -c -emit-llvm 2004-11-27-StaticFunctionRedeclare.c -o - | \
// RUN: opt -std-compile-opts | llvm-dis | not grep {declare int.*func}
// There should not be an unresolved reference to func here. Believe it or not,
// the "expected result" is a function named 'func' which is internal and
// referenced by bar().
// This is PR244
static int func();
void bar() {
int func();
foo(func);
}
static int func(char** A, char ** B) {}
|
// RUN: %llvmgcc -c -emit-llvm %s -o - | \
// RUN: opt -std-compile-opts | llvm-dis | not grep {declare int.*func}
// There should not be an unresolved reference to func here. Believe it or not,
// the "expected result" is a function named 'func' which is internal and
// referenced by bar().
// This is PR244
static int func();
void bar() {
int func();
foo(func);
}
static int func(char** A, char ** B) {}
|
Use %s, not explicit name.
|
Use %s, not explicit name.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@36136 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
bsd-2-clause
|
dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,chubbymaggie/asap,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm
|
35a8f748863cccdbd2b97c4cbbfc57c3757dfedc
|
demo/main.c
|
demo/main.c
|
#include <stdio.h>
#include "TM4C123GH6PM.h"
#include "lm4f120h5qr.h"
#include "interrupt.h"
#include "larson.h"
#include "led.h"
#include "UART.h"
int main(void){
UART_Init(); // Initialize UART before outputting...
printf("%s\n", "Initializing...");
LED_Init(); // Initialize LEDs on GPIOF
Larson_Init(); // Initialize Larson scanner on GPIOB.
GPIOA_Pin_Init(); // Initialize GPIOA Pins and interrupts.
SysTick_Init(); // Initialize SysTick interrupts.
// Loop forever.
while (1) {}
}
|
#include <stdio.h>
#include "TM4C123GH6PM.h"
#include "lm4f120h5qr.h"
#include "interrupt.h"
#include "larson.h"
#include "led.h"
#include "UART.h"
int main(void){
UART_Init(); // Initialize UART before outputting...
printf("%s\n", "Initializing...");
LED_Init(); // Initialize LEDs on GPIOF
Larson_Init(); // Initialize Larson scanner on GPIOB.
GPIOA_Pin_Init(); // Initialize GPIOA Pins and interrupts.
SysTick_Init(); // Initialize SysTick interrupts.
// Loop forever.
while (1) {
/* AAPCS Demo */
__asm volatile (
" mov r0,#0x11111111\n\t"
" mov r1,#0x22222222\n\t"
" mov r2,#0x33333333\n\t"
" mov r3,#0x44444444\n\t"
);
}
}
|
Add unique and obvious register values for AAPCS demo.
|
Add unique and obvious register values for AAPCS demo.
|
C
|
mit
|
eigenholser/embedded_programming_intro,eigenholser/embedded_programming_intro
|
ea1cb775db1666406796f506da0fa98e21dccbad
|
experiment.c
|
experiment.c
|
#include "stdio.h"
#include "stdlib.h"
#define TRIALS 4
#define MATRIX_SIZE 2048
short A[MATRIX_SIZE][MATRIX_SIZE],
B[MATRIX_SIZE][MATRIX_SIZE],
C[MATRIX_SIZE][MATRIX_SIZE] = {{0}};
int main(int argc, char* argv[])
{
// Initalize array A and B with '1's
for (int i = 0; i < MATRIX_SIZE; ++i)
for (int k = 0; k < MATRIX_SIZE; ++k)
A[i][k] = B[i][k] = 1;
// Iterate through the block sizes
for (int block_size = 4; block_size <= 256; block_size *= 2)
{
// Run TRIALS number of trials for each block size
for (int trial = 0; trial < TRIALS; ++trial)
{
printf("size: %d\n", block_size);
}
}
return 0;
}
|
#include "stdio.h"
#include "stdlib.h"
#include "sys/time.h"
#define TRIALS 4
#define MATRIX_SIZE 2048
short A[MATRIX_SIZE][MATRIX_SIZE],
B[MATRIX_SIZE][MATRIX_SIZE],
C[MATRIX_SIZE][MATRIX_SIZE] = {{0}};
int main(int argc, char* argv[])
{
// Initalize array A and B with '1's
for (int i = 0; i < MATRIX_SIZE; ++i)
for (int k = 0; k < MATRIX_SIZE; ++k)
A[i][k] = B[i][k] = 1;
// Show headings
for (int trial = 0; trial < TRIALS; ++trial)
printf(" run%d ,", trial);
puts(" avrg ");
// Iterate through the block sizes
for (int block_size = 4; block_size <= 256; block_size *= 2)
{
// Keep track of the times for this block
time_t block_times[TRIALS];
// Run TRIALS number of trials for each block size
for (int trial = 0; trial < TRIALS; ++trial)
{
struct timeval time_start;
gettimeofday(&time_start, NULL);
// Do work..
struct timeval time_end;
gettimeofday(&time_end, NULL);
// Keep track of the time to do statistics on
block_times[trial] = time_end.tv_usec - time_start.tv_usec;
printf("%06d,", (int) block_times[trial]);
}
int average = 0;
for (int i = 0; i < TRIALS; ++i)
average += (int) block_times[i];
printf("%06d\n", average / TRIALS);
}
return 0;
}
|
Add timing and formating for times
|
Add timing and formating for times
|
C
|
mit
|
EvanPurkhiser/CS-Matrix-Multiplication
|
7aa8ff477b577c147adc723c6f3029b4d01a544f
|
example/linux/main.c
|
example/linux/main.c
|
/* INCLUDES */
#include <stdio.h>
#include "commands.h"
#define MAX_MSG_LENGTH 200 //For the receiving frame... (circular buffer)
int main(int argc, char *argv[]) {
char input_buffer[MAX_MSG_LENGTH];
int input_argc;
char *input_argv[CMD_MAX_N_OPTIONS+CMD_MAX_N_OPTIONS_WITH_ARGS];
int i;
char command_available = 0;
if (argc > 1) {
execute_command(argc-1, &argv[1]);
} else {
while (TRUE) {
// Terminal prompt
printf("\n> ");
// Terminal input
fgets(input_buffer, MAX_MSG_LENGTH-3, stdin);
// Detect end of the command
for (i=0; input_buffer[i]; i++) {
if (input_buffer[i] == '\n' || input_buffer[i] == '\r')
input_buffer[i] = 0;
command_available = 1;
}
if (command_available) {
// Get the command and the arguments in a list
input_argc = separate_args(input_buffer, input_argv);
// Execute the command
if (input_argc) execute_command(input_argc, input_argv);
command_available = 0;
}
}
}
return 0;
}
|
/* INCLUDES */
#include <stdio.h>
#include "commands.h"
#define MAX_MSG_LENGTH 200 //For the receiving frame... (circular buffer)
int main(int argc, char *argv[]) {
char input_buffer[MAX_MSG_LENGTH];
int input_argc;
char *input_argv[CMD_MAX_N_OPTIONS+CMD_MAX_N_OPTIONS_WITH_ARGS];
int i;
char command_available = 0;
if (argc > 1) {
execute_command(argc-1, &argv[1]);
} else {
while (TRUE) {
// Terminal prompt
printf("\n> ");
// Terminal input
fgets(input_buffer, MAX_MSG_LENGTH-3, stdin);
// Detect end of the command
for (i=0; input_buffer[i]; i++) {
if (input_buffer[i] == '\n' || input_buffer[i] == '\r') {}
input_buffer[i] = 0;
command_available = 1;
}
}
if (command_available) {
// Get the command and the arguments in a list
input_argc = separate_args(input_buffer, input_argv);
// Execute the command
if (input_argc) execute_command(input_argc, input_argv);
command_available = 0;
}
}
}
return 0;
}
|
Solve a bug with line endings
|
Solve a bug with line endings
|
C
|
mit
|
guyikcgg/UniversalShellBuilder,guyikcgg/UniversalShellBuilder
|
afc9778e858677d6cbadfbe80cbc2e4d00e96bec
|
SSPSolution/SSPSolution/DoorEntity.h
|
SSPSolution/SSPSolution/DoorEntity.h
|
#ifndef SSPAPPLICATION_ENTITIES_DOORENTITY_H
#define SSPAPPLICATION_ENTITIES_DOORENTITY_H
#include "Entity.h"
#include <vector>
class DoorEntity :
public Entity
{
private:
/*struct ElementState {
int entityID;
EVENT desiredState;
bool desiredStateReached;
};
std::vector<ElementState> m_elementStates;*/
bool m_isOpened;
float m_minRotation;
float m_maxRotation;
float m_rotateTime;
float m_rotatePerSec;
public:
DoorEntity();
virtual ~DoorEntity();
int Initialize(int entityID, PhysicsComponent* pComp, GraphicsComponent* gComp, float rotateTime = 1.0f, float minRotation = 0.0f, float maxRotation = DirectX::XM_PI / 2.0f);
int Update(float dT, InputHandler* inputHandler);
int React(int entityID, EVENT reactEvent);
bool SetIsOpened(bool isOpened);
bool GetIsOpened();
};
#endif
|
#ifndef SSPAPPLICATION_ENTITIES_DOORENTITY_H
#define SSPAPPLICATION_ENTITIES_DOORENTITY_H
#include "Entity.h"
#include <vector>
class DoorEntity :
public Entity
{
private:
struct ElementState {
int entityID;
EVENT desiredState;
bool desiredStateReached;
};
std::vector<ElementState> m_elementStates;
bool m_isOpened;
float m_minRotation;
float m_maxRotation;
float m_rotateTime;
float m_rotatePerSec;
public:
DoorEntity();
virtual ~DoorEntity();
int Initialize(int entityID, PhysicsComponent* pComp, GraphicsComponent* gComp, float rotateTime = 1.0f, float minRotation = 0.0f, float maxRotation = DirectX::XM_PI / 2.0f);
int Update(float dT, InputHandler* inputHandler);
int React(int entityID, EVENT reactEvent);
bool SetIsOpened(bool isOpened);
bool GetIsOpened();
};
#endif
|
UPDATE Uncommented door variables for reacting
|
UPDATE Uncommented door variables for reacting
|
C
|
apache-2.0
|
Chringo/SSP,Chringo/SSP
|
3a8226f5bc42f17478a59e63827a5e646527cf5f
|
ionGUI/imGUI.h
|
ionGUI/imGUI.h
|
#pragma once
#include <ionMath.h>
//---- Define constructor and implicit cast operators to convert back<>forth from your math types and ImVec2/ImVec4.
#define IM_VEC2_CLASS_EXTRA \
ImVec2(const ion::vec2f& f) { x = f.X; y = f.Y; } \
operator ion::vec2f() const { return ion::vec2f(x,y); }
#define IM_VEC4_CLASS_EXTRA \
ImVec4(const ion::vec4f& f) { x = f.X; y = f.Y; z = f.Z; w = f.W; } \
operator ion::vec4f() const { return ion::vec4f(x,y,z,w); }
#include <imgui.h>
|
#pragma once
#include <ionCore.h>
//---- Define constructor and implicit cast operators to convert back<>forth from your math types and ImVec2/ImVec4.
#define IM_VEC2_CLASS_EXTRA \
ImVec2(const ion::vec2f& f) { x = f.X; y = f.Y; } \
operator ion::vec2f() const { return ion::vec2f(x,y); }
#define IM_VEC4_CLASS_EXTRA \
ImVec4(const ion::vec4f& f) { x = f.X; y = f.Y; z = f.Z; w = f.W; } \
operator ion::vec4f() const { return ion::vec4f(x,y,z,w); }
//---- Use 32-bit vertex indices (instead of default: 16-bit) to allow meshes with more than 64K vertices
#define ImDrawIdx unsigned int
#include <imgui.h>
|
Switch to 32bit indices for gui rendering
|
[ionGUI] Switch to 32bit indices for gui rendering
|
C
|
mit
|
iondune/ionEngine,iondune/ionEngine
|
dd6237b0e8aa8b3d80f05e9fa4a225fd80d2d84c
|
dec/types.h
|
dec/types.h
|
/* Copyright 2013 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or 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.
Common types
*/
#ifndef BROTLI_DEC_TYPES_H_
#define BROTLI_DEC_TYPES_H_
#include <stddef.h> /* for size_t */
#ifndef _MSC_VER
#include <inttypes.h>
#ifdef __STRICT_ANSI__
#define BROTLI_INLINE
#else /* __STRICT_ANSI__ */
#define BROTLI_INLINE inline
#endif
#else
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef unsigned long long int uint64_t;
typedef long long int int64_t;
#define BROTLI_INLINE __forceinline
#endif /* _MSC_VER */
#endif /* BROTLI_DEC_TYPES_H_ */
|
/* Copyright 2013 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or 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.
Common types
*/
#ifndef BROTLI_DEC_TYPES_H_
#define BROTLI_DEC_TYPES_H_
#include <stddef.h> /* for size_t */
#ifndef _MSC_VER
#include <inttypes.h>
#if defined(__cplusplus) || !defined(__STRICT_ANSI__) \
|| __STDC_VERSION__ >= 199901L
#define BROTLI_INLINE inline
#else
#define BROTLI_INLINE
#endif
#else
typedef signed char int8_t;
typedef unsigned char uint8_t;
typedef signed short int16_t;
typedef unsigned short uint16_t;
typedef signed int int32_t;
typedef unsigned int uint32_t;
typedef unsigned long long int uint64_t;
typedef long long int int64_t;
#define BROTLI_INLINE __forceinline
#endif /* _MSC_VER */
#endif /* BROTLI_DEC_TYPES_H_ */
|
Allow use of inline keyword in c++/c99 mode.
|
Allow use of inline keyword in c++/c99 mode.
|
C
|
apache-2.0
|
luzhongtong/brotli,koolhazz/brotli,yonchev/brotli,Bulat-Ziganshin/brotli,google/brotli,rgordeev/brotli,daltonmaag/brotli,BuildAPE/brotli,emil-io/brotli,yonchev/brotli,PritiKumr/brotli,andrebellafronte/brotli,iamjbn/brotli,anthrotype/brotli,ya7lelkom/brotli,silky/brotli,archiveds/brotli,google/brotli,chinanjjohn2012/brotli,shadowkun/brotli,smourier/brotli,lvandeve/brotli,mark2007081021/brotli,dwdm/brotli,nicksay/brotli,archiveds/brotli,nicksay/brotli,samtechie/brotli,QuantumFractal/brotli,kaushik94/brotli,anthrotype/brotli,anthrotype/brotli,Abhikos/brotli,lzq8272587/brotli,samtechie/brotli,jqk6/brotli,abhishekgahlot/brotli,anthrotype/brotli,stamhe/brotli,yiliaofan/brotli,Mojang/brotli,WenyuDeng/brotli,ebiggers/brotli,bunnyblue/brotli,mcanthony/brotli,WenyuDeng/brotli,lvandeve/brotli,zofuthan/brotli,ruo91/brotli,s0ne0me/brotli,caidongyun/brotli,agordon/brotli,iamjbn/brotli,yonchev/brotli,archiveds/brotli,szabadka/brotli,emil-io/brotli,nicksay/brotli,fllsouto/brotli,rajathkumarmp/brotli,lzq8272587/brotli,daltonmaag/brotli,smourier/brotli,letup/brotli,jacklicn/brotli,google/brotli,thurday/brotli,andrebellafronte/brotli,rasata/brotli,mark2007081021/brotli,PritiKumr/brotli,rafaelbc/brotli,s0ne0me/brotli,google/brotli,datachand/brotli,silky/brotli,Bulat-Ziganshin/brotli,rasata/brotli,emil-io/brotli,merckhung/brotli,fllsouto/brotli,fllsouto/brotli,IIoTeP9HuY/brotli,shadowkun/brotli,shaunstanislaus/brotli,szabadka/brotli,rajat1994/brotli,CedarLogic/brotli,shadowkun/brotli,windhorn/brotli,hemel-cse/brotli,matsprea/brotli,QuantumFractal/brotli,fouzelddin/brotli,Endika/brotli,madhudskumar/brotli,minhlongdo/brotli,caidongyun/brotli,WenyuDeng/brotli,IIoTeP9HuY/brotli,cosmicwomp/brotli,chinanjjohn2012/brotli,Merterm/brotli,minhlongdo/brotli,thurday/brotli,dragon788/brotli,johnnycastilho/brotli,jacklicn/brotli,yiliaofan/brotli,PritiKumr/brotli,zhaohuaw/brotli,eric-seekas/brotli,PritiKumr/brotli,mk525/Code,rgordeev/brotli,shaunstanislaus/brotli,stamhe/brotli,sonivaibhv/brotli,CedarLogic/brotli,google/brotli,bunnyblue/brotli,chrislucas/brotli,cosmicwomp/brotli,IIoTeP9HuY/brotli,ya7lelkom/brotli,Abhikos/brotli,shadowkun/brotli,gk23/brotli,zofuthan/brotli,dwdm/brotli,google/brotli,shilpi230/brotli,FarhanHaque/brotli,noname007/brotli,Merterm/brotli,matsprea/brotli,dwdm/brotli,leo237/brotli,W3SS/brotli,Bulat-Ziganshin/brotli,Mojang/brotli,abhishekgahlot/brotli,hcxiong/brotli,bunnyblue/brotli,WenyuDeng/brotli,W3SS/brotli,CedarLogic/brotli,iamjbn/brotli,tml/brotli,koolhazz/brotli,datachand/brotli,karpinski/brotli,caidongyun/brotli,emil-io/brotli,mcanthony/brotli,shaunstanislaus/brotli,josl/brotli,johnnycastilho/brotli,fxfactorial/brotli,smourier/brotli,lukw00/brotli,letup/brotli,google/brotli,rajat1994/brotli,kaushik94/brotli,Endika/brotli,agordon/brotli,kasper93/brotli,luzhongtong/brotli,hemel-cse/brotli,tml/brotli,erichub/brotli,mcanthony/brotli,szabadka/brotli,BuildAPE/brotli,dragon788/brotli,josl/brotli,minhlongdo/brotli,nicksay/brotli,erichub/brotli,panaroma/brotli,kasper93/brotli,CedarLogic/brotli,hemel-cse/brotli,agordon/brotli,rayning0/brotli,minhlongdo/brotli,BuildAPE/brotli,sajith4u/brotli,tml/brotli,nicksay/brotli,QuantumFractal/brotli,szabadka/brotli,luzhongtong/brotli,windhorn/brotli,Mojang/brotli,datachand/brotli,datachand/brotli,rajathkumarmp/brotli,kaushik94/brotli,eric-seekas/brotli,stamhe/brotli,yonchev/brotli,yiliaofan/brotli,Endika/brotli,matsprea/brotli,madhudskumar/brotli,dragon788/brotli,google/brotli,fxfactorial/brotli,merckhung/brotli,gk23/brotli,hcxiong/brotli,gk23/brotli,erichub/brotli,mark2007081021/brotli,johnnycastilho/brotli,rasata/brotli,samtechie/brotli,sajith4u/brotli,ruo91/brotli,karpinski/brotli,madhudskumar/brotli,yiliaofan/brotli,IIoTeP9HuY/brotli,iamjbn/brotli,W3SS/brotli,matsprea/brotli,smourier/brotli,fxfactorial/brotli,koolhazz/brotli,FarhanHaque/brotli,fxfactorial/brotli,rgordeev/brotli,caidongyun/brotli,mcanthony/brotli,silky/brotli,FarhanHaque/brotli,hcxiong/brotli,panaroma/brotli,hcxiong/brotli,rajathkumarmp/brotli,panaroma/brotli,mk525/Code,abhishekgahlot/brotli,Endika/brotli,luzhongtong/brotli,ya7lelkom/brotli,Merterm/brotli,lvandeve/brotli,letup/brotli,ya7lelkom/brotli,jacklicn/brotli,rasata/brotli,QuantumFractal/brotli,jqk6/brotli,hemel-cse/brotli,nicksay/brotli,zofuthan/brotli,carlhuting/brotli,lzq8272587/brotli,rafaelbc/brotli,leo237/brotli,lukw00/brotli,rayning0/brotli,leo237/brotli,kaushik94/brotli,Merterm/brotli,panaroma/brotli,rafaelbc/brotli,zofuthan/brotli,smourier/brotli,bunnyblue/brotli,silky/brotli,erichub/brotli,archiveds/brotli,chrislucas/brotli,karpinski/brotli,carlhuting/brotli,jqk6/brotli,Mojang/brotli,Abhikos/brotli,andrebellafronte/brotli,king-jw/brotli,merckhung/brotli,daltonmaag/brotli,chinanjjohn2012/brotli,eric-seekas/brotli,cosmicwomp/brotli,abhishekgahlot/brotli,sonivaibhv/brotli,letup/brotli,eric-seekas/brotli,noname007/brotli,rayning0/brotli,kasper93/brotli,lzq8272587/brotli,carlhuting/brotli,ebiggers/brotli,leo237/brotli,andrebellafronte/brotli,dwdm/brotli,shilpi230/brotli,fouzelddin/brotli,rajathkumarmp/brotli,lvandeve/brotli,rgordeev/brotli,madhudskumar/brotli,rafaelbc/brotli,shilpi230/brotli,johnnycastilho/brotli,noname007/brotli,rajat1994/brotli,lukw00/brotli,mk525/Code,fouzelddin/brotli,shilpi230/brotli,thurday/brotli,ruo91/brotli,noname007/brotli,Bulat-Ziganshin/brotli,sajith4u/brotli,nicksay/brotli,king-jw/brotli,fouzelddin/brotli,thurday/brotli,ebiggers/brotli,fllsouto/brotli,sajith4u/brotli,tml/brotli,carlhuting/brotli,ruo91/brotli,mark2007081021/brotli,FarhanHaque/brotli,josl/brotli,zhaohuaw/brotli,BuildAPE/brotli,cosmicwomp/brotli,kasper93/brotli,jqk6/brotli,stamhe/brotli,merckhung/brotli,windhorn/brotli,mk525/Code,gk23/brotli,chinanjjohn2012/brotli,s0ne0me/brotli,zhaohuaw/brotli,Abhikos/brotli,rayning0/brotli,daltonmaag/brotli,chrislucas/brotli,chrislucas/brotli,shaunstanislaus/brotli,koolhazz/brotli,samtechie/brotli,s0ne0me/brotli,sonivaibhv/brotli,karpinski/brotli,sonivaibhv/brotli,agordon/brotli,ebiggers/brotli,rajat1994/brotli,jacklicn/brotli,josl/brotli,king-jw/brotli,zhaohuaw/brotli,king-jw/brotli,windhorn/brotli,lukw00/brotli,W3SS/brotli,dragon788/brotli,anthrotype/brotli
|
bfff8b87632f5ab450243a0a4e7c7f2ed83f9e68
|
src/common/common.h
|
src/common/common.h
|
#ifndef BERRY_COMMON_COMMON_H
#define BERRY_COMMON_COMMON_H
#if defined(__APPLE__)
#include "TargetConditionals.h"
#if ANGEL_MOBILE
#include <sys/time.h>
#import <Availability.h>
#ifndef __IPHONE_5_0
#warning "This project uses features only available in iPhone SDK 5.0 and later."
#endif
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#else
#include <CoreFoundation/CoreFoundation.h>
#endif
#else
#ifndef __OBJC__
#include <CoreFoundation/CoreFoundation.h>
#endif
#endif
#endif
#if defined(__APPLE__) || defined(__linux__)
#include <ext/hash_map>
//GCC is picky about what types are allowed to be used as indices to hashes.
// Defining this here lets us use std::strings to index, which is useful.
#define hashmap_ns __gnu_cxx
namespace hashmap_ns
{
template<> struct hash< std::string >
{
size_t operator()( const std::string& x ) const
{
return hash< const char* >()( x.c_str() );
}
};
}
#endif
#endif
|
#ifndef BERRY_COMMON_COMMON_H
#define BERRY_COMMON_COMMON_H
#if defined(__APPLE__)
#include "TargetConditionals.h"
#if ANGEL_MOBILE
#include <sys/time.h>
#import <Availability.h>
#ifndef __IPHONE_5_0
#warning "This project uses features only available in iPhone SDK 5.0 and later."
#endif
#ifdef __OBJC__
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#else
#include <CoreFoundation/CoreFoundation.h>
#endif
#else
#ifndef __OBJC__
#include <CoreFoundation/CoreFoundation.h>
#endif
#endif
#endif
#if defined(__APPLE__)
#include <unordered_map>
#elif defined(__linux__)
#include <ext/hash_map>
//GCC is picky about what types are allowed to be used as indices to hashes.
// Defining this here lets us use std::strings to index, which is useful.
#define hashmap_ns __gnu_cxx
namespace hashmap_ns
{
template<> struct hash< std::string >
{
size_t operator()( const std::string& x ) const
{
return hash< const char* >()( x.c_str() );
}
};
}
#endif
#endif
|
Fix compile warning of hash_map in OS X
|
Fix compile warning of hash_map in OS X
|
C
|
mit
|
pixelpicosean/Mural-Deprecated,pixelpicosean/Mural-Deprecated,pixelpicosean/Mural-Deprecated,pixelpicosean/Mural-Deprecated,pixelpicosean/Mural-Deprecated
|
6ff0b90eca9ac6021e18692a5a747ae14ac01c69
|
Source/ObjectiveDropboxOfficial/Shared/Handwritten/OAuth/DBSDKKeychain.h
|
Source/ObjectiveDropboxOfficial/Shared/Handwritten/OAuth/DBSDKKeychain.h
|
///
/// Copyright (c) 2016 Dropbox, Inc. All rights reserved.
///
#import <Foundation/Foundation.h>
#import "DBHandlerTypes.h"
///
/// Keychain class for storing OAuth tokens.
///
@interface DBSDKKeychain : NSObject
/// Stores a key / value pair in the keychain.
+ (BOOL)storeValueWithKey:(NSString * _Nonnull)key value:(NSString * _Nonnull)value;
/// Retrieves a value from the corresponding key from the keychain.
+ (NSString * _Nullable)retrieveTokenWithKey:(NSString * _Nonnull)key;
/// Retrieves all token uids from the keychain.
+ (NSArray<NSString *> * _Nonnull)retrieveAllTokenIds;
/// Deletes a key / value pair in the keychain.
+ (BOOL)deleteTokenWithKey:(NSString * _Nonnull)key;
/// Deletes all key / value pairs in the keychain.
+ (BOOL)clearAllTokens;
/// Checks if performing a v1 token migration is necessary, and if so, performs it.
+ (BOOL)checkAndPerformV1TokenMigration:(DBTokenMigrationResponseBlock _Nonnull)responseBlock
queue:(NSOperationQueue * _Nullable)queue
appKey:(NSString * _Nonnull)appKey
appSecret:(NSString * _Nonnull)appSecret;
@end
|
///
/// Copyright (c) 2016 Dropbox, Inc. All rights reserved.
///
#import <Foundation/Foundation.h>
#import "DBHandlerTypes.h"
NS_ASSUME_NONNULL_BEGIN
///
/// Keychain class for storing OAuth tokens.
///
@interface DBSDKKeychain : NSObject
/// Stores a key / value pair in the keychain.
+ (BOOL)storeValueWithKey:(NSString *)key value:(NSString *)value;
/// Retrieves a value from the corresponding key from the keychain.
+ (NSString * _Nullable)retrieveTokenWithKey:(NSString *)key;
/// Retrieves all token uids from the keychain.
+ (NSArray<NSString *> *)retrieveAllTokenIds;
/// Deletes a key / value pair in the keychain.
+ (BOOL)deleteTokenWithKey:(NSString *)key;
/// Deletes all key / value pairs in the keychain.
+ (BOOL)clearAllTokens;
/// Checks if performing a v1 token migration is necessary, and if so, performs it.
+ (BOOL)checkAndPerformV1TokenMigration:(DBTokenMigrationResponseBlock)responseBlock
queue:(NSOperationQueue * _Nullable)queue
appKey:(NSString *)appKey
appSecret:(NSString *)appSecret;
@end
NS_ASSUME_NONNULL_END
|
Switch to NS_ASSUME_NONNULL_BEGIN and _END
|
Switch to NS_ASSUME_NONNULL_BEGIN and _END
This leaves us free to only define the nullable parameters in each method signature.
|
C
|
mit
|
dropbox/dropbox-sdk-obj-c,dropbox/dropbox-sdk-obj-c,dropbox/dropbox-sdk-obj-c,dropbox/dropbox-sdk-obj-c
|
de6d353302c812e4345de6eb44c4b890ff5cff14
|
src/classes/Window.h
|
src/classes/Window.h
|
#ifndef WINDOW_H
#define WINDOW_H
#include <ncurses.h>
#include <array>
#include "../game.h"
// Used to define a datatype for calls to wborder
struct Border {
chtype ls, rs, ts, bs;
chtype tl, tr, bl, br;
};
class Window {
public:
Window(rect dim); // ctor
~Window(); // dtor
void bindWin(WINDOW *newW);
int getChar();
void refresh();
void update();
void clear();
void close();
void cursorPos(vec2ui pos);
void draw(vec2ui pos, char ch, chtype colo);
void draw(vec2ui pos, char ch, chtype colo, int attr);
void drawBorder();
void drawBox();
void write(std::string str);
void write(vec2ui pos, std::string str);
void coloSplash(chtype colo);
rect getDim() { return dim; }
void setBorder(Border b);
protected:
WINDOW *w;
rect dim;
Border border { 0,0,0,0,0,0,0,0 }; // Init to default
};
#endif
|
#ifndef WINDOW_H
#define WINDOW_H
#include <ncurses.h>
#include <string>
#include <array>
#include "../game.h"
// Used to define a datatype for calls to wborder
struct Border {
chtype ls, rs, ts, bs;
chtype tl, tr, bl, br;
};
class Window {
public:
Window(rect dim); // ctor
~Window(); // dtor
void bindWin(WINDOW *newW);
int getChar();
void refresh();
void update();
void clear();
void close();
void cursorPos(vec2ui pos);
void draw(vec2ui pos, char ch, chtype colo);
void draw(vec2ui pos, char ch, chtype colo, int attr);
void drawBorder();
void drawBox();
void write(std::string str);
void write(vec2ui pos, std::string str);
void coloSplash(chtype colo);
rect getDim() { return dim; }
void setBorder(Border b);
protected:
WINDOW *w;
rect dim;
Border border { 0,0,0,0,0,0,0,0 }; // Init to default
};
#endif
|
Fix missing string in namespace std compiler error
|
Fix missing string in namespace std compiler error
On some systems
|
C
|
mit
|
jm-janzen/termq,jm-janzen/termq,jm-janzen/termq
|
4d9532bedbb71796ace2833aeb3d279b8a18df57
|
Clue/Classes/Extensions/Views/UIView+CLUViewRecordableAdditions.h
|
Clue/Classes/Extensions/Views/UIView+CLUViewRecordableAdditions.h
|
//
// UIView+CLUViewRecordableAdditions.h
// Clue
//
// Created by Ahmed Sulaiman on 5/27/16.
// Copyright © 2016 Ahmed Sulaiman. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "CLUViewRecordableProperties.h"
@interface UIView (CLUViewRecordableAdditions) <CLUViewRecordableProperties>
- (NSDictionary *)clue_colorPropertyDictionaryForColor:(UIColor *)color;
- (NSDictionary *)clue_sizePropertyDictionaryForSize:(CGSize)size;
- (NSDictionary *)clue_fontPropertyDictionaryForFont:(UIFont *)font;
- (NSDictionary *)clue_attributedTextPropertyDictionaryForAttributedString:(NSAttributedString *)attributedText;
@end
|
//
// UIView+CLUViewRecordableAdditions.h
// Clue
//
// Created by Ahmed Sulaiman on 5/27/16.
// Copyright © 2016 Ahmed Sulaiman. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "CLUViewRecordableProperties.h"
@interface UIView (CLUViewRecordableAdditions) <CLUViewRecordableProperties>
- (NSDictionary *)clue_colorPropertyDictionaryForColor:(UIColor *)color;
- (NSDictionary *)clue_sizePropertyDictionaryForSize:(CGSize)size;
- (NSDictionary *)clue_fontPropertyDictionaryForFont:(UIFont *)font;
- (NSDictionary *)clue_attributedTextPropertyDictionaryForAttributedString:(NSAttributedString *)attributedText;
- (NSDictionary *)clue_layoutMarginsPropertyDictionary;
- (NSDictionary *)clue_frameProprtyDictionary;
@end
|
Move layoutMargin method and Frame method to public interface of UIView additions category. (mostly for testing purposes and those method should be public IMO anyway)
|
Move layoutMargin method and Frame method to public interface of UIView additions category. (mostly for testing purposes and those method should be public IMO anyway)
|
C
|
mit
|
Geek-1001/Clue,Geek-1001/Clue,Geek-1001/Clue,Geek-1001/Clue
|
d5fe78a66aa26ae430c9137ce5c7244b06d550b2
|
experiments.h
|
experiments.h
|
/*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_EXPERIMENTS_H_
#define WEBRTC_EXPERIMENTS_H_
#include "webrtc/typedefs.h"
namespace webrtc {
struct RemoteBitrateEstimatorMinRate {
RemoteBitrateEstimatorMinRate() : min_rate(30000) {}
RemoteBitrateEstimatorMinRate(uint32_t min_rate) : min_rate(min_rate) {}
uint32_t min_rate;
};
struct SkipEncodingUnusedStreams {
SkipEncodingUnusedStreams() : enabled(false) {}
explicit SkipEncodingUnusedStreams(bool set_enabled)
: enabled(set_enabled) {}
virtual ~SkipEncodingUnusedStreams() {}
const bool enabled;
};
struct AimdRemoteRateControl {
AimdRemoteRateControl() : enabled(false) {}
explicit AimdRemoteRateControl(bool set_enabled)
: enabled(set_enabled) {}
virtual ~AimdRemoteRateControl() {}
const bool enabled;
};
} // namespace webrtc
#endif // WEBRTC_EXPERIMENTS_H_
|
/*
* Copyright (c) 2013 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
#ifndef WEBRTC_EXPERIMENTS_H_
#define WEBRTC_EXPERIMENTS_H_
#include "webrtc/typedefs.h"
namespace webrtc {
struct RemoteBitrateEstimatorMinRate {
RemoteBitrateEstimatorMinRate() : min_rate(30000) {}
RemoteBitrateEstimatorMinRate(uint32_t min_rate) : min_rate(min_rate) {}
uint32_t min_rate;
};
struct AimdRemoteRateControl {
AimdRemoteRateControl() : enabled(false) {}
explicit AimdRemoteRateControl(bool set_enabled)
: enabled(set_enabled) {}
virtual ~AimdRemoteRateControl() {}
const bool enabled;
};
} // namespace webrtc
#endif // WEBRTC_EXPERIMENTS_H_
|
Remove no longer used SkipEncodingUnusedStreams.
|
Remove no longer used SkipEncodingUnusedStreams.
R=andrew@webrtc.org
Review URL: https://webrtc-codereview.appspot.com/18829004
Cr-Mirrored-From: https://chromium.googlesource.com/external/webrtc
Cr-Mirrored-Commit: b0c8228755e6d86a77f3a74999216b31feb44a6b
|
C
|
bsd-3-clause
|
sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc,sippet/webrtc
|
bb47d7db349b6de54440b2298fb0c6377a4a7e0a
|
thingc/thingc/thingc/NumberInstance.h
|
thingc/thingc/thingc/NumberInstance.h
|
#pragma once
#include <string>
#include "Program.h"
#include "ThingInstance.h"
class NumberInstance : public ThingInstance {
public:
NumberInstance(int val) : val(val), ThingInstance(NumberInstance::methods) {};
virtual std::string text() const override {
return std::to_string(val);
}
const int val;
static const std::vector<InternalMethod> methods;
};
|
#pragma once
#include <string>
#include "Program.h"
#include "ThingInstance.h"
class NumberInstance : public ThingInstance {
public:
NumberInstance(int val) : val(val), ThingInstance(NumberInstance::methods) {};
virtual std::string text() const override {
return std::to_string(val);
}
static void add() {
auto lhs = static_cast<NumberInstance*>(Program::pop().get());
auto rhs = static_cast<NumberInstance*>(Program::pop().get());
auto ptr = PThingInstance(new NumberInstance(lhs->val + rhs->val));
Program::push(ptr);
}
const int val;
static const std::vector<InternalMethod> methods;
};
|
Implement + support in numbers
|
Implement + support in numbers
|
C
|
mit
|
ytanay/thinglang,ytanay/thinglang,ytanay/thinglang,ytanay/thinglang
|
bbef5652aa760beb83ef3116ecec3bd5eb76af35
|
src/hash/mdx_hash/mdx_hash.h
|
src/hash/mdx_hash/mdx_hash.h
|
/**
* MDx Hash Function
* (C) 1999-2008 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_MDX_BASE_H__
#define BOTAN_MDX_BASE_H__
#include <botan/hash.h>
namespace Botan {
/**
* MDx Hash Function Base Class
*/
class BOTAN_DLL MDx_HashFunction : public HashFunction
{
public:
MDx_HashFunction(u32bit, u32bit, bool, bool, u32bit = 8);
virtual ~MDx_HashFunction() {}
protected:
void clear() throw();
SecureVector<byte> buffer;
u64bit count;
u32bit position;
private:
void add_data(const byte[], u32bit);
void final_result(byte output[]);
virtual void compress_n(const byte block[], u32bit block_n) = 0;
virtual void copy_out(byte[]) = 0;
virtual void write_count(byte[]);
const bool BIG_BYTE_ENDIAN, BIG_BIT_ENDIAN;
const u32bit COUNT_SIZE;
};
}
#endif
|
/**
* MDx Hash Function
* (C) 1999-2008 Jack Lloyd
*
* Distributed under the terms of the Botan license
*/
#ifndef BOTAN_MDX_BASE_H__
#define BOTAN_MDX_BASE_H__
#include <botan/hash.h>
namespace Botan {
/**
* MDx Hash Function Base Class
*/
class BOTAN_DLL MDx_HashFunction : public HashFunction
{
public:
MDx_HashFunction(u32bit, u32bit, bool, bool, u32bit = 8);
virtual ~MDx_HashFunction() {}
protected:
void add_data(const byte[], u32bit);
void final_result(byte output[]);
virtual void compress_n(const byte block[], u32bit block_n) = 0;
void clear() throw();
virtual void copy_out(byte[]) = 0;
virtual void write_count(byte[]);
private:
SecureVector<byte> buffer;
u64bit count;
u32bit position;
const bool BIG_BYTE_ENDIAN, BIG_BIT_ENDIAN;
const u32bit COUNT_SIZE;
};
}
#endif
|
Make the member variables of MDx_HashFunction private instead of protected - no subclass needs access to any of these variables.
|
Make the member variables of MDx_HashFunction private instead of protected -
no subclass needs access to any of these variables.
|
C
|
bsd-2-clause
|
Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,randombit/botan,randombit/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan
|
b4bf84df34dd90041f076eb777454d01c41042c0
|
SVNetworking/SVNetworking/SVNetworking.h
|
SVNetworking/SVNetworking/SVNetworking.h
|
//
// SVNetworking.h
// SVNetworking
//
// Created by Nate Stedman on 3/14/14.
// Copyright (c) 2014 Svpply. All rights reserved.
//
#import "NSObject+SVBindings.h"
#import "NSObject+SVMultibindings.h"
#import "SVDataRequest.h"
#import "SVDiskCache.h"
#import "SVFunctional.h"
#import "SVImageView.h"
#import "SVJSONRequest.h"
#import "SVRemoteImage.h"
#import "SVRemoteImageProtocol.h"
#import "SVRemoteDataRequestResource.h"
#import "SVRemoteDataResource.h"
#import "SVRemoteJSONRequestResource.h"
#import "SVRemoteJSONResource.h"
#import "SVRemoteProxyResource.h"
#import "SVRemoteResource.h"
#import "SVRemoteRetainedScaledImage.h"
#import "SVRemoteScaledImage.h"
#import "SVRemoteScaledImageProtocol.h"
#import "SVRequest.h"
|
//
// SVNetworking.h
// SVNetworking
//
// Created by Nate Stedman on 3/14/14.
// Copyright (c) 2014 Svpply. All rights reserved.
//
#import "NSObject+SVBindings.h"
#import "NSObject+SVMultibindings.h"
#import "SVDataRequest.h"
#import "SVDiskCache.h"
#import "SVFunctional.h"
#import "SVImageView.h"
#import "SVJSONRequest.h"
#import "SVRemoteArray.h"
#import "SVRemoteImage.h"
#import "SVRemoteImageProtocol.h"
#import "SVRemoteDataRequestResource.h"
#import "SVRemoteDataResource.h"
#import "SVRemoteJSONArray.h"
#import "SVRemoteJSONRequestResource.h"
#import "SVRemoteJSONResource.h"
#import "SVRemoteProxyResource.h"
#import "SVRemoteResource.h"
#import "SVRemoteRetainedScaledImage.h"
#import "SVRemoteScaledImage.h"
#import "SVRemoteScaledImageProtocol.h"
#import "SVRequest.h"
|
Add remote array classes to headers.
|
Add remote array classes to headers.
|
C
|
bsd-3-clause
|
eBay/SVNetworking,eBay/SVNetworking
|
5e33ef4b6724a72188da87ddc7e8af98c4658671
|
src/tests/uiomux_tests.h
|
src/tests/uiomux_tests.h
|
/*
* UIOMux: a conflict manager for system resources, including UIO devices.
* Copyright (C) 2009 Renesas Technology Corp.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library 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
*/
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#define INFO(str) \
{ printf ("---- %s ...\n", (str)); }
#define WARN(str) \
{ printf ("%s:%d: warning: %s\n", __FILE__, __LINE__, (str)); }
#define FAIL(str) \
{ printf ("%s:%d: %s\n", __FILE__, __LINE__, (str)); exit(1); }
|
/*
* UIOMux: a conflict manager for system resources, including UIO devices.
* Copyright (C) 2009 Renesas Technology Corp.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Library General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at 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
* Library General Public License for more details.
*
* You should have received a copy of the GNU Library 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 <stdio.h>
#include <stdlib.h>
#define INFO(str) \
{ printf ("---- %s ...\n", (str)); }
#define WARN(str) \
{ printf ("%s:%d: warning: %s\n", __FILE__, __LINE__, (str)); }
#define FAIL(str) \
{ printf ("%s:%d: %s\n", __FILE__, __LINE__, (str)); exit(1); }
|
Apply HAVE_CONFIG_H condition in src/tests/uiomux_test.h
|
Apply HAVE_CONFIG_H condition in src/tests/uiomux_test.h
config.h should be included only if HAVE_CONFIG_H defined
when autoconf used.
|
C
|
lgpl-2.1
|
kfish/libuiomux,kfish/libuiomux
|
c55016bbab62ac77c8314cc79ece5aca87483e9f
|
ch1/ex3/farh_to_celsius_v2.c
|
ch1/ex3/farh_to_celsius_v2.c
|
#include <stdio.h>
float K_5_BY_9 = 5.0 / 9.0;
float K_32 = 32;
int SUCCESS = 0;
int main(void)
{
float fahrenheit, celsius;
int lower, upper, step;
lower = 0;
upper = 300;
step = 20;
printf("|-----------|\n");
printf("|%4s|%6s|\n", "F", "C");
printf("|-----------|\n");
fahrenheit = lower;
while (fahrenheit <= upper) {
celsius = K_5_BY_9 * (fahrenheit - K_32);
printf("|%4.0f|%6.1f|\n", fahrenheit, celsius);
fahrenheit = fahrenheit + step;
}
printf("|-----------|\n");
return SUCCESS;
}
|
#include <stdio.h>
float K_5_BY_9 = 5.0 / 9.0;
float K_32 = 32.0;
int SUCCESS = 0;
int main(void)
{
float fahrenheit, celsius;
int lower, upper, step;
lower = 0;
upper = 300;
step = 20;
printf("|-----------|\n");
printf("|%4s|%6s|\n", "F", "C");
printf("|-----------|\n");
fahrenheit = lower;
while (fahrenheit <= upper) {
celsius = K_5_BY_9 * (fahrenheit - K_32);
printf("|%4.0f|%6.1f|\n", fahrenheit, celsius);
fahrenheit = fahrenheit + step;
}
printf("|-----------|\n");
return SUCCESS;
}
|
Change K_32 const value to more readable (with floating point)
|
Change K_32 const value to more readable (with floating point)
|
C
|
bsd-3-clause
|
rmk135/the-c-programming-language
|
8e5e8a7b8355cf0132b16dbaf3387845da13475c
|
rt/cgen/cowgol-cgen.c
|
rt/cgen/cowgol-cgen.c
|
#include "cowgol-cgen.h"
static i8 ram[0x10000 / 8];
i8* __top = (i8*) ram;
i8* __himem = (i8*) ((i1*)ram + sizeof(ram));
i8* global_argv;
extern void cmain(void);
int main(int argc, const char* argv[])
{
/* Remember that Cowgol is built for 64-bit systems, so we need
* to copy the argv array as we could be running on a 32-bit system. */
global_argv = calloc(argc+1, 8);
for (int i=0; i<argc; i++)
global_argv[i] = (i8)(intptr_t)argv[i];
cmain();
return 0;
}
|
#include "cowgol-cgen.h"
/* Really we should only have 64kB of RAM, but cgen intptr is 8 bytes which
* quickly gobbles through it (cowlink can't load the entire compiler at
* once). So, use 128kB. */
static i8 ram[0x20000 / 8];
i8* __top = (i8*) ram;
i8* __himem = (i8*) ((i1*)ram + sizeof(ram));
i8* global_argv;
extern void cmain(void);
int main(int argc, const char* argv[])
{
/* Remember that Cowgol is built for 64-bit systems, so we need
* to copy the argv array as we could be running on a 32-bit system. */
global_argv = calloc(argc+1, 8);
for (int i=0; i<argc; i++)
global_argv[i] = (i8)(intptr_t)argv[i];
cmain();
return 0;
}
|
Increase the amount of memory available to cgen --- those 8-byte pointers really add up.
|
Increase the amount of memory available to cgen --- those 8-byte pointers
really add up.
|
C
|
bsd-2-clause
|
davidgiven/cowgol,davidgiven/cowgol
|
71e936386443d7e71382dc6d0b9cfeccf47a89ea
|
base/sha1.h
|
base/sha1.h
|
// LAF Base Library
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SHA1_H_INCLUDED
#define BASE_SHA1_H_INCLUDED
#pragma once
#include <vector>
#include <string>
extern "C" struct SHA1Context;
namespace base {
class Sha1 {
public:
enum { HashSize = 20 };
Sha1();
explicit Sha1(const std::vector<uint8_t>& digest);
// Calculates the SHA1 of the given file or string.
static Sha1 calculateFromFile(const std::string& fileName);
static Sha1 calculateFromString(const std::string& text);
bool operator==(const Sha1& other) const;
bool operator!=(const Sha1& other) const;
uint8_t operator[](int index) const {
return m_digest[index];
}
private:
std::vector<uint8_t> m_digest;
};
} // namespace base
#endif // BASE_SHA1_H_INCLUDED
|
// LAF Base Library
// Copyright (c) 2001-2016 David Capello
//
// This file is released under the terms of the MIT license.
// Read LICENSE.txt for more information.
#ifndef BASE_SHA1_H_INCLUDED
#define BASE_SHA1_H_INCLUDED
#pragma once
#include <vector>
#include <string>
extern "C" struct SHA1Context;
namespace base {
class Sha1 {
public:
enum { HashSize = 20 };
Sha1();
explicit Sha1(const std::vector<uint8_t>& digest);
// Calculates the SHA1 of the given file or string.
static Sha1 calculateFromFile(const std::string& fileName);
static Sha1 calculateFromString(const std::string& text);
bool operator==(const Sha1& other) const;
bool operator!=(const Sha1& other) const;
uint8_t operator[](int index) const {
return m_digest[index];
}
const uint8_t *digest() const {
return m_digest.data();
}
size_t size() const {
return m_digest.size();
}
private:
std::vector<uint8_t> m_digest;
};
} // namespace base
#endif // BASE_SHA1_H_INCLUDED
|
Add Sha1 class methods digest() and size()
|
Add Sha1 class methods digest() and size()
|
C
|
mit
|
aseprite/laf,aseprite/laf
|
486fb2162080c695511c1708946b737524b5e8f2
|
qocoa_mac.h
|
qocoa_mac.h
|
/*
Copyright (C) 2011 by Mike McQuaid
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.
*/
#include <Foundation/NSString.h>
#include <QString>
static NSString* fromQString(const QString &string)
{
char* cString = string.toUtf8().data();
return [[NSString alloc] initWithUTF8String:cString];
}
static QString toQString(NSString *string)
{
if (!string)
return QString();
return QString::fromUtf8([string UTF8String]);
}
|
/*
Copyright (C) 2011 by Mike McQuaid
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.
*/
#include <Foundation/NSString.h>
#include <QString>
static inline NSString* fromQString(const QString &string)
{
char* cString = string.toUtf8().data();
return [[NSString alloc] initWithUTF8String:cString];
}
static inline QString toQString(NSString *string)
{
if (!string)
return QString();
return QString::fromUtf8([string UTF8String]);
}
|
Make shared functions inline to avoid warnings.
|
Make shared functions inline to avoid warnings.
|
C
|
mit
|
ArnaudBienner/Qocoa,mikemcquaid/Qocoa
|
59c2b1f63b7c5756ff95538ef2277fd9262ee8a4
|
security/nss/macbuild/NSSCommon.h
|
security/nss/macbuild/NSSCommon.h
|
/* Defines common to all versions of NSS */
#define NSPR20 1
#define MP_API_COMPATIBLE 1
|
/* Defines common to all versions of NSS */
#define NSPR20 1
#define MP_API_COMPATIBLE 1
#define NSS_3_4_CODE 1 /* Remove this when we start building NSS 4.0 by default */
|
Define NSS_3_4 so that we get the right code and not Stan code that isn't quite ready.
|
Define NSS_3_4 so that we get the right code and not Stan code that isn't quite ready.
|
C
|
mpl-2.0
|
nmav/nss,nmav/nss,ekr/nss-old,ekr/nss-old,ekr/nss-old,nmav/nss,ekr/nss-old,nmav/nss,ekr/nss-old,nmav/nss,ekr/nss-old,ekr/nss-old,nmav/nss,nmav/nss
|
23f9a8486cea1af4de8fca84fe5393114c9272a8
|
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 51
#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 52
#endif
|
Update Skia milestone to 52
|
Update Skia milestone to 52
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1868893003
TBR=reed@google.com
Review URL: https://codereview.chromium.org/1868893003
|
C
|
apache-2.0
|
qrealka/skia-hc,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,tmpvar/skia.cc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,HalCanary/skia-hc,google/skia,google/skia,google/skia,tmpvar/skia.cc,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,qrealka/skia-hc,rubenvb/skia,google/skia,qrealka/skia-hc,qrealka/skia-hc,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,tmpvar/skia.cc,qrealka/skia-hc,tmpvar/skia.cc,Hikari-no-Tenshi/android_external_skia,tmpvar/skia.cc,google/skia,rubenvb/skia,rubenvb/skia,tmpvar/skia.cc,HalCanary/skia-hc,tmpvar/skia.cc,rubenvb/skia,tmpvar/skia.cc,aosp-mirror/platform_external_skia,qrealka/skia-hc,HalCanary/skia-hc,HalCanary/skia-hc,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,tmpvar/skia.cc,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,google/skia,google/skia,HalCanary/skia-hc,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,qrealka/skia-hc,HalCanary/skia-hc,qrealka/skia-hc,rubenvb/skia
|
bf9fcbf6fa42d204f3f6657f493061801546dc0a
|
misc/misc.h
|
misc/misc.h
|
#ifndef MISC__H__
#define MISC__H__
#include <sysdeps.h>
extern void random_init(uint32 seed);
extern uint32 random_int(void);
#define random_float() (random_int() * (double)(1.0/4294967296.0))
#define random_scale(S) ((unsigned int)(random_float() * (S)))
unsigned long strtou(const char* str, const char** end);
const char* utoa(unsigned long);
char* utoa2(unsigned long, char*);
#endif
|
#ifndef MISC__H__
#define MISC__H__
#include <sysdeps.h>
extern void random_init(uint32 seed);
extern uint32 random_int(void);
#define random_float() (random_int() * (double)(1.0/4294967296.0))
#define random_scale(S) ((unsigned int)(random_float() * (S)))
#define random_trunc(T) (random_int() % (T))
unsigned long strtou(const char* str, const char** end);
const char* utoa(unsigned long);
char* utoa2(unsigned long, char*);
#endif
|
Add random_trunc function, which truncates (with integer modulus) instead of scaling (with floating point divide and multiply) the base random number.
|
Add random_trunc function, which truncates (with integer modulus)
instead of scaling (with floating point divide and multiply) the base
random number.
|
C
|
lgpl-2.1
|
bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs,bruceg/bglibs
|
9abb92a67240364f96c7e0408f2231600d6dd20d
|
enhanced/drlvm/trunk/vm/port/src/misc/linux/sysencoding.c
|
enhanced/drlvm/trunk/vm/port/src/misc/linux/sysencoding.c
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you 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.
*/
#include "port_sysencoding.h"
#include <string.h>
int port_get_utf8_converted_system_message_length(char *system_message)
{
return strlen(system_message) + 1;
}
void port_convert_system_error_message_to_utf8(char *converted_message,
int buffer_size,
char *system_message)
{
strncpy(converted_message, system_message, buffer_size - 1);
}
|
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you 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.
*/
#include "port_sysencoding.h"
#include <string.h>
int port_get_utf8_converted_system_message_length(char *system_message)
{
return strlen(system_message) + 1;
}
void port_convert_system_error_message_to_utf8(char *converted_message,
int buffer_size,
char *system_message)
{
strncpy(converted_message, system_message, buffer_size - 1);
converted_message[buffer_size - 1] = '\0';
}
|
Make sure that the copy of the string is always null terminated
|
Make sure that the copy of the string is always null terminated
svn path=/harmony/; revision=601274
|
C
|
apache-2.0
|
freeVM/freeVM,freeVM/freeVM,freeVM/freeVM,freeVM/freeVM,freeVM/freeVM
|
5a2ed7d4ffe3a0d471c8865fe0a89044d0269891
|
DicomCli/readquery.h
|
DicomCli/readquery.h
|
/*=========================================================================
Program: DICOM for VTK
Copyright (c) 2012-2015 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef __readquery_h
#define __readquery_h
#include "vtkDICOMItem.h"
#include "vtkDICOMTagPath.h"
#include <vector>
typedef std::vector<vtkDICOMTagPath> QueryTagList;
//! Read a query file, return 'true' on success.
/*!
* The query file is read into the supplied vtkDICOMItem as a set of
* attribute values. If the ordering within the file is important,
* then a QueryTagList can also be provided. The tags will be pushed
* onto the QueryTagList in the same order as they are encountered in
* the file.
*/
bool dicomcli_readquery(
const char *fname, vtkDICOMItem *query, QueryTagList *ql=0);
//! Read a single query key, return 'true' on success.
bool dicomcli_readkey(
const char *key, vtkDICOMItem *query, QueryTagList *ql=0);
#endif /* __readquery_h */
|
/*=========================================================================
Program: DICOM for VTK
Copyright (c) 2012-2015 David Gobbi
All rights reserved.
See Copyright.txt or http://dgobbi.github.io/bsd3.txt for details.
This software is distributed WITHOUT ANY WARRANTY; without even
the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE. See the above copyright notice for more information.
=========================================================================*/
#ifndef readquery_h
#define readquery_h
#include "vtkDICOMItem.h"
#include "vtkDICOMTagPath.h"
#include <vector>
typedef std::vector<vtkDICOMTagPath> QueryTagList;
//! Read a query file, return 'true' on success.
/*!
* The query file is read into the supplied vtkDICOMItem as a set of
* attribute values. If the ordering within the file is important,
* then a QueryTagList can also be provided. The tags will be pushed
* onto the QueryTagList in the same order as they are encountered in
* the file.
*/
bool dicomcli_readquery(
const char *fname, vtkDICOMItem *query, QueryTagList *ql=0);
//! Read a single query key, return 'true' on success.
bool dicomcli_readkey(
const char *key, vtkDICOMItem *query, QueryTagList *ql=0);
#endif /* readquery_h */
|
Remove double underscore from include guard.
|
Remove double underscore from include guard.
|
C
|
bsd-3-clause
|
hendradarwin/vtk-dicom,hendradarwin/vtk-dicom,hendradarwin/vtk-dicom,dgobbi/vtk-dicom,dgobbi/vtk-dicom,dgobbi/vtk-dicom
|
9e522dbd0bb17233bcb504c2d06c0889d0de33d9
|
samplecode/GMSampleView.h
|
samplecode/GMSampleView.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 GMSampleView_DEFINED
#define GMSampleView_DEFINED
#include "SampleCode.h"
#include "gm.h"
class GMSampleView : public SampleView {
private:
typedef skiagm::GM GM;
public:
GMSampleView(GM* gm)
: fGM(gm) {}
virtual ~GMSampleView() {
delete fGM;
}
protected:
virtual bool onQuery(SkEvent* evt) {
if (SampleCode::TitleQ(*evt)) {
SkString name("GM ");
name.append(fGM->shortName());
SampleCode::TitleR(evt, name.c_str());
return true;
}
return this->INHERITED::onQuery(evt);
}
virtual void onDrawContent(SkCanvas* canvas) {
fGM->drawContent(canvas);
}
virtual void onDrawBackground(SkCanvas* canvas) {
fGM->drawBackground(canvas);
}
private:
GM* fGM;
typedef SampleView INHERITED;
};
#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 GMSampleView_DEFINED
#define GMSampleView_DEFINED
#include "SampleCode.h"
#include "gm.h"
class GMSampleView : public SampleView {
private:
typedef skiagm::GM GM;
public:
GMSampleView(GM* gm)
: fGM(gm) {}
virtual ~GMSampleView() {
delete fGM;
}
protected:
virtual bool onQuery(SkEvent* evt) {
if (SampleCode::TitleQ(*evt)) {
SkString name("GM:");
name.append(fGM->shortName());
SampleCode::TitleR(evt, name.c_str());
return true;
}
return this->INHERITED::onQuery(evt);
}
virtual void onDrawContent(SkCanvas* canvas) {
fGM->drawContent(canvas);
}
virtual void onDrawBackground(SkCanvas* canvas) {
fGM->drawBackground(canvas);
}
private:
GM* fGM;
typedef SampleView INHERITED;
};
#endif
|
Use : as separator between "GM" and slide name in SampleApp. This makes it easier to jump to a GM slide using command line args on windows.
|
Use : as separator between "GM" and slide name in SampleApp. This makes it easier to jump to a GM slide using command line args on windows.
git-svn-id: e8541e15acce502a64c929015570ad1648e548cd@2846 2bbb7eff-a529-9590-31e7-b0007b416f81
|
C
|
bsd-3-clause
|
mrobinson/skia,mrobinson/skia,metajack/skia,Cue/skia,mrobinson/skia,Cue/skia,metajack/skia,metajack/skia,Cue/skia,metajack/skia,mrobinson/skia,mrobinson/skia,Cue/skia
|
f762c741121a89c387071563b167e8f580bedb8f
|
src/config.h
|
src/config.h
|
/*****************************************************************************/
/* */
/* Logswan 2.0.2 */
/* Copyright (c) 2015-2018, Frederic Cambus */
/* https://www.logswan.org */
/* */
/* Created: 2015-05-31 */
/* Last Updated: 2018-08-05 */
/* */
/* Logswan is released under the BSD 2-Clause license. */
/* See LICENSE file for details. */
/* */
/*****************************************************************************/
#ifndef CONFIG_H
#define CONFIG_H
#define VERSION "Logswan 2.0.2"
enum {
HLL_BITS = 20,
LINE_LENGTH_MAX = 65536,
STATUS_CODE_MAX = 512,
CONTINENTS = 7,
COUNTRIES = 251,
METHODS = 9,
PROTOCOLS = 2
};
extern char *continentsId[];
extern char *continentsNames[];
extern char *countriesId[];
extern char *countriesNames[];
extern char *methodsNames[];
extern char *protocolsNames[];
#endif /* CONFIG_H */
|
/*****************************************************************************/
/* */
/* Logswan 2.0.2 */
/* Copyright (c) 2015-2018, Frederic Cambus */
/* https://www.logswan.org */
/* */
/* Created: 2015-05-31 */
/* Last Updated: 2018-08-05 */
/* */
/* Logswan is released under the BSD 2-Clause license. */
/* See LICENSE file for details. */
/* */
/*****************************************************************************/
#ifndef CONFIG_H
#define CONFIG_H
#define VERSION "Logswan 2.0.2"
enum {
HLL_BITS = 20,
LINE_LENGTH_MAX = 65536,
STATUS_CODE_MAX = 512,
CONTINENTS = 7,
COUNTRIES = 251,
METHODS = 9,
PROTOCOLS = 3
};
extern char *continentsId[];
extern char *continentsNames[];
extern char *countriesId[];
extern char *countriesNames[];
extern char *methodsNames[];
extern char *protocolsNames[];
#endif /* CONFIG_H */
|
Enable support for parsing HTTP/2.0 requests, for real this time
|
Enable support for parsing HTTP/2.0 requests, for real this time
|
C
|
bsd-2-clause
|
fcambus/logswan,fcambus/logswan
|
4beb18c788dfa988297e6604a51b572692f938da
|
sledge/model/llair_intrinsics.h
|
sledge/model/llair_intrinsics.h
|
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <stdbool.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
/* allocation that cannot fail */
void* __llair_alloc(unsigned size);
/* non-deterministic choice */
int __llair_choice();
/* executions that call __llair_unreachable are assumed to be impossible */
__attribute__((noreturn)) void __llair_unreachable();
/* assume a condition */
#define __llair_assume(condition) \
if (!(condition)) \
__llair_unreachable()
/* throw an exception */
__attribute__((noreturn)) void __llair_throw(void* thrown_exception);
/* glibc version */
#define __assert_fail(assertion, file, line, function) abort()
/* macos version */
#define __assert_rtn(function, file, line, assertion) abort()
/*
* threads
*/
typedef int thread_t;
typedef int (*thread_create_routine)(void*);
thread_t sledge_thread_create(thread_create_routine entry, void* arg);
void sledge_thread_resume(thread_t thread);
int sledge_thread_join(thread_t thread);
/*
* cct
*/
void cct_point(void);
#ifdef __cplusplus
}
#endif
|
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <stdbool.h>
#include <stdlib.h>
#ifdef __cplusplus
extern "C" {
#endif
/* allocation that cannot fail */
void* __llair_alloc(long size);
/* non-deterministic choice */
long __llair_choice();
/* executions that call __llair_unreachable are assumed to be impossible */
__attribute__((noreturn)) void __llair_unreachable();
/* assume a condition */
#define __llair_assume(condition) \
if (!(condition)) \
__llair_unreachable()
/* throw an exception */
__attribute__((noreturn)) void __llair_throw(void* thrown_exception);
/* glibc version */
#define __assert_fail(assertion, file, line, function) abort()
/* macos version */
#define __assert_rtn(function, file, line, assertion) abort()
/*
* threads
*/
typedef int thread_t;
typedef int (*thread_create_routine)(void*);
thread_t sledge_thread_create(thread_create_routine entry, void* arg);
void sledge_thread_resume(thread_t thread);
int sledge_thread_join(thread_t thread);
/*
* cct
*/
void cct_point(void);
#ifdef __cplusplus
}
#endif
|
Adjust declared types of llair intrinsics
|
[sledge] Adjust declared types of llair intrinsics
Summary:
Internally __llair_alloc and __llair_choice are treated as full-width
signed integers, so use the `long` C type.
Differential Revision: D39136450
fbshipit-source-id: 1ebeff4fe2dcd3cb75d7d13e2798a82c275218a4
|
C
|
mit
|
facebook/infer,facebook/infer,facebook/infer,facebook/infer,facebook/infer,facebook/infer,facebook/infer
|
d2a6fe1cda60bf6dd025b24160e47707229e34fc
|
arc/arc/Model/FileObject.h
|
arc/arc/Model/FileObject.h
|
//
// FileObject.h
// arc
//
// Created by Jerome Cheng on 19/3/13.
// Copyright (c) 2013 nus.cs3217. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface FileObject : NSObject {
@protected
NSURL* _url;
id _contents;
BOOL _needsRefresh;
}
// The name of this object.
@property (strong, nonatomic) NSString* name;
// The full file path of this object.
@property (strong, nonatomic) NSString* path;
// The parent of this object (if any.)
@property (weak, nonatomic) FileObject* parent;
// Creates a FileObject to represent the given URL.
// url should be an object on the file system.
- (id)initWithURL:(NSURL*)url;
// Creates a FileObject to represent the given URL,
// with its parent set to the given FileObject.
- (id)initWithURL:(NSURL*)url parent:(FileObject*)parent;
// Refreshes the contents of this object by reloading
// them from the file system.
// Returns the contents when done.
- (id)refreshContents;
// Flags this object as needing its contents refreshed.
- (void)flagForRefresh;
// Gets the contents of this object.
- (id)getContents;
// Removes this object from the file system.
// Returns YES if successful, NO otherwise.
- (BOOL)remove;
@end
|
//
// FileObject.h
// arc
//
// Created by Jerome Cheng on 19/3/13.
// Copyright (c) 2013 nus.cs3217. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface FileObject : NSObject {
@protected
NSURL* _url;
id _contents;
BOOL _needsRefresh;
}
// The name of this object.
@property (strong, nonatomic) NSString* name;
// The full file path of this object. Can be used
// to recreate an NSURL.
@property (strong, nonatomic) NSString* path;
// The parent of this object (if any.)
@property (weak, nonatomic) FileObject* parent;
// Creates a FileObject to represent the given URL.
// url should be an object on the file system.
- (id)initWithURL:(NSURL*)url;
// Creates a FileObject to represent the given URL,
// with its parent set to the given FileObject.
- (id)initWithURL:(NSURL*)url parent:(FileObject*)parent;
// Refreshes the contents of this object by reloading
// them from the file system.
// Returns the contents when done.
- (id)refreshContents;
// Flags this object as needing its contents refreshed.
- (void)flagForRefresh;
// Gets the contents of this object.
- (id)getContents;
// Removes this object from the file system.
// Returns YES if successful, NO otherwise.
- (BOOL)remove;
@end
|
Add explaining comment for path property.
|
Add explaining comment for path property.
|
C
|
mit
|
BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc,BenTobias/arc
|
158a3e9064a37f46d22b3ff4012da72489d2d381
|
src/status.h
|
src/status.h
|
/**
* File: status.h
* Author: Alex Savarda
*/
#ifndef STATUS_H
#define STATUS_H
typedef struct {
unsigned int m_stat;
unsigned int W_stat;
} statusType;
#endif /* STATUS_H */
|
/*
* File: status.h
* Author: Alex Savarda
*/
#ifndef STATUS_H
#define STATUS_H
typedef struct {
unsigned int m_stat;
unsigned int W_stat;
} statusType;
#endif /* STATUS_H */
|
Change file header to C style
|
Change file header to C style
|
C
|
isc
|
sbennett1990/YESS,sbennett1990/YESS,sbennett1990/YESS
|
46058a38137b55bace74a60ff9cdc1418e7ea440
|
tmpmon_base/config.h
|
tmpmon_base/config.h
|
// Global configuration information
//
// Connection information
#define SERIAL_BAUD 115200
|
// Global configuration information
//
// Connection information
#define SERIAL_BAUD 9600
|
FIX - Lowered baud rates to 9600
|
FIX - Lowered baud rates to 9600
|
C
|
mit
|
gauravmm/Remote-Temperature-Monitor,gauravmm/Remote-Temperature-Monitor,gauravmm/Remote-Temperature-Monitor,gauravmm/Remote-Temperature-Monitor
|
bcb54520eb9aaf2c25660380f7301ff3f4d284d5
|
test/CodeGen/pr9614.c
|
test/CodeGen/pr9614.c
|
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
extern void foo_alias (void) __asm ("foo");
inline void foo (void) {
return foo_alias ();
}
extern void bar_alias (void) __asm ("bar");
inline __attribute__ ((__always_inline__)) void bar (void) {
return bar_alias ();
}
void f(void) {
foo();
bar();
}
// CHECK: define void @f()
// CHECK-NEXT: entry:
// CHECK-NEXT: call void @foo()
// CHECK-NEXT: call void @bar()
// CHECK-NEXT: ret void
// CHECK: declare void @foo()
// CHECK: declare void @bar()
|
// RUN: %clang_cc1 -emit-llvm %s -O1 -o - | FileCheck %s
extern void foo_alias (void) __asm ("foo");
inline void foo (void) {
return foo_alias ();
}
extern void bar_alias (void) __asm ("bar");
inline __attribute__ ((__always_inline__)) void bar (void) {
return bar_alias ();
}
void f(void) {
foo();
bar();
}
// CHECK: define void @f()
// CHECK: call void @foo()
// CHECK-NEXT: call void @bar()
// CHECK-NEXT: ret void
// CHECK: declare void @foo()
// CHECK: declare void @bar()
|
Fix this on the bots and make the test more complete by enabling optimizations.
|
Fix this on the bots and make the test more complete by enabling optimizations.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@143223 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/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,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang
|
a23dcce1d04354a1fa4bd0a794e60ff74521db1b
|
test/Sema/128bitint.c
|
test/Sema/128bitint.c
|
// RUN: clang-cc -fsyntax-only -verify %s
typedef int i128 __attribute__((__mode__(TI)));
typedef unsigned u128 __attribute__((__mode__(TI)));
int a[((i128)-1 ^ (i128)-2) == 1 ? 1 : -1];
int a[(u128)-1 > 1LL ? 1 : -1];
// PR5435
__uint128_t b = (__uint128_t)-1;
|
// RUN: clang-cc -fsyntax-only -verify -triple x86_64-apple-darwin9 %s
typedef int i128 __attribute__((__mode__(TI)));
typedef unsigned u128 __attribute__((__mode__(TI)));
int a[((i128)-1 ^ (i128)-2) == 1 ? 1 : -1];
int a[(u128)-1 > 1LL ? 1 : -1];
// PR5435
__uint128_t b = (__uint128_t)-1;
|
Add a triple to try to fix the buildbot error.
|
Add a triple to try to fix the buildbot error.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@86563 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang
|
65a04e22843f7777fe8e20a1433c033a44a30198
|
DMNotificationObserver.h
|
DMNotificationObserver.h
|
//
// DMNotificationObserver.h
// Library
//
// Created by Jonathon Mah on 2011-07-11.
// Copyright 2011 Delicious Monster Software. All rights reserved.
//
#import <Foundation/Foundation.h>
/* The action block is passed the notification, the owner as a parameter (to avoid retain cycles),
* and the triggering observer (so it can easiliy invalidate it if it needs to). */
@class DMNotificationObserver;
typedef void(^DMNotificationActionBlock)(NSNotification *notification, id localOwner, DMNotificationObserver *observer);
@interface DMNotificationObserver : NSObject
+ (id)observerForName:(NSString *)notificationName
object:(id)notificationSender
owner:(id)owner
action:(DMNotificationActionBlock)actionBlock
__attribute__((__nonnull__(1,3,4)));
- (id)initWithName:(NSString *)notificationName
object:(id)notificationSender
owner:(id)owner
action:(DMNotificationActionBlock)actionBlock
__attribute__((__nonnull__(1,3,4)));
- (void)fireAction:(NSNotification *)notification;
- (void)invalidate;
@end
|
//
// DMNotificationObserver.h
// Library
//
// Created by Jonathon Mah on 2011-07-11.
// Copyright 2011 Delicious Monster Software. All rights reserved.
//
#import <Foundation/Foundation.h>
/* The action block is passed the notification, the owner as a parameter (to avoid retain cycles),
* and the triggering observer (so it can easiliy invalidate it if it needs to). */
@class DMNotificationObserver;
typedef void(^DMNotificationActionBlock)(NSNotification *notification, id localOwner, DMNotificationObserver *observer);
@interface DMNotificationObserver : NSObject
+ (id)observerForName:(NSString *)notificationName
object:(id)notificationSender
owner:(id)owner
action:(DMNotificationActionBlock)actionBlock
__attribute__((nonnull(1,3,4)));
- (id)initWithName:(NSString *)notificationName
object:(id)notificationSender
owner:(id)owner
action:(DMNotificationActionBlock)actionBlock
__attribute__((nonnull(1,3,4)));
- (void)fireAction:(NSNotification *)notification;
- (void)invalidate;
@end
|
Standardize on nonnull attribute (vs __nonnull__)
|
Standardize on nonnull attribute (vs __nonnull__)
|
C
|
apache-2.0
|
delicious-monster/DMAutoInvalidation
|
0b963c5a4eccde9050903d6859faee9096d3ce2b
|
test/entrytestsuite.h
|
test/entrytestsuite.h
|
#ifndef ENTRYTESTSUITE
#define ENTRYTESTSUITE
#include <cxxtest/TestSuite.h>
#include "../src/entry.h"
class EntryTestSuite : public CxxTest::TestSuite
{
public:
void testEntryHasGivenTitle(void)
{
testEntry.setTitle("testTitle");
TS_ASSERT_SAME_DATA(testEntry.title().c_str(), "testTitle", 9);
}
diaryengine::Entry testEntry;
};
#endif // ENTRYTESTSUITE
|
#ifndef ENTRYTESTSUITE
#define ENTRYTESTSUITE
#include <cxxtest/TestSuite.h>
#include <qt5/QtCore/QDateTime>
#include "../src/entry.h"
class EntryTestSuite : public CxxTest::TestSuite
{
public:
void testTitleCanBeSetCorrectly(void)
{
testEntry.setTitle("testTitle");
TS_ASSERT_SAME_DATA(testEntry.title().c_str(), "testTitle", 9);
}
void testDateCanBeSetCorrectlyWithISOString(void)
{
testEntry.setDate("2007-03-01T13:00:00Z");
TS_ASSERT(testEntry.date() == "2007-03-01T13:00:00Z");
}
void testDateUnderstandsTimeZone(void)
{
testEntry.setDate("2007-03-01T13:00:00+02:00");
TS_ASSERT(testEntry.date() == "2007-03-01T13:00:00+02:00");
}
void testIdRegenerationGeneratesDifferentUUID()
{
testEntry.regenerateId();
long id = testEntry.id();
testEntry.regenerateId();
TS_ASSERT_DIFFERS(testEntry.id(), id);
}
diaryengine::Entry testEntry;
};
#endif // ENTRYTESTSUITE
|
Add tests for id generation and ISO date strings
|
Add tests for id generation and ISO date strings
|
C
|
bsd-3-clause
|
Acce0ss/diary-engine
|
543e3925dae7dbe3fb2d5f81b193f2f796e0cd8f
|
tree/treeplayer/inc/DataFrameLinkDef.h
|
tree/treeplayer/inc/DataFrameLinkDef.h
|
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __ROOTCLING__
// All these are there for the autoloading
#pragma link C++ class ROOT::Experimental::TDataFrame-;
#pragma link C++ class ROOT::Experimental::TDataFrameInterface<ROOT::Detail::TDataFrameFilterBase>-;
#pragma link C++ class ROOT::Experimental::TDataFrameInterface<ROOT::Detail::TDataFrameBranchBase>-;
#endif
|
/*************************************************************************
* Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
* All rights reserved. *
* *
* For the licensing terms see $ROOTSYS/LICENSE. *
* For the list of contributors see $ROOTSYS/README/CREDITS. *
*************************************************************************/
#ifdef __ROOTCLING__
// All these are there for the autoloading
#pragma link C++ class ROOT::Experimental::TDataFrame-;
#pragma link C++ class ROOT::Experimental::TDataFrameInterface<ROOT::Detail::TDataFrameFilterBase>-;
#pragma link C++ class ROOT::Experimental::TDataFrameInterface<ROOT::Detail::TDataFrameBranchBase>-;
#pragma link C++ class ROOT::Detail::TDataFrameImpl-;
#endif
|
Add another autoload key for TDataFrameImpl'
|
[TDF] Add another autoload key for TDataFrameImpl'
|
C
|
lgpl-2.1
|
olifre/root,root-mirror/root,BerserkerTroll/root,bbockelm/root,BerserkerTroll/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root,simonpf/root,olifre/root,simonpf/root,bbockelm/root,bbockelm/root,zzxuanyuan/root,BerserkerTroll/root,zzxuanyuan/root,mhuwiler/rootauto,bbockelm/root,zzxuanyuan/root,agarciamontoro/root,mhuwiler/rootauto,simonpf/root,olifre/root,mhuwiler/rootauto,olifre/root,mhuwiler/rootauto,beniz/root,davidlt/root,mhuwiler/rootauto,mhuwiler/rootauto,bbockelm/root,karies/root,zzxuanyuan/root-compressor-dummy,simonpf/root,mhuwiler/rootauto,olifre/root,buuck/root,mhuwiler/rootauto,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,mhuwiler/rootauto,beniz/root,zzxuanyuan/root,davidlt/root,zzxuanyuan/root,buuck/root,BerserkerTroll/root,satyarth934/root,bbockelm/root,karies/root,beniz/root,agarciamontoro/root,zzxuanyuan/root-compressor-dummy,satyarth934/root,zzxuanyuan/root-compressor-dummy,davidlt/root,olifre/root,karies/root,buuck/root,davidlt/root,root-mirror/root,root-mirror/root,karies/root,agarciamontoro/root,simonpf/root,buuck/root,root-mirror/root,simonpf/root,bbockelm/root,satyarth934/root,mhuwiler/rootauto,davidlt/root,karies/root,zzxuanyuan/root,bbockelm/root,zzxuanyuan/root,simonpf/root,satyarth934/root,satyarth934/root,satyarth934/root,buuck/root,satyarth934/root,BerserkerTroll/root,satyarth934/root,zzxuanyuan/root-compressor-dummy,zzxuanyuan/root-compressor-dummy,satyarth934/root,karies/root,agarciamontoro/root,satyarth934/root,BerserkerTroll/root,bbockelm/root,root-mirror/root,olifre/root,karies/root,zzxuanyuan/root-compressor-dummy,buuck/root,buuck/root,simonpf/root,BerserkerTroll/root,mhuwiler/rootauto,karies/root,agarciamontoro/root,bbockelm/root,davidlt/root,agarciamontoro/root,beniz/root,bbockelm/root,agarciamontoro/root,zzxuanyuan/root,simonpf/root,beniz/root,root-mirror/root,zzxuanyuan/root,karies/root,zzxuanyuan/root,satyarth934/root,buuck/root,davidlt/root,olifre/root,zzxuanyuan/root-compressor-dummy,beniz/root,olifre/root,davidlt/root,zzxuanyuan/root-compressor-dummy,beniz/root,agarciamontoro/root,davidlt/root,olifre/root,karies/root,agarciamontoro/root,root-mirror/root,root-mirror/root,root-mirror/root,BerserkerTroll/root,agarciamontoro/root,root-mirror/root,simonpf/root,beniz/root,agarciamontoro/root,BerserkerTroll/root,root-mirror/root,davidlt/root,olifre/root,zzxuanyuan/root,beniz/root,buuck/root,simonpf/root,beniz/root,buuck/root,karies/root,beniz/root,davidlt/root,BerserkerTroll/root,buuck/root,BerserkerTroll/root
|
7638cf06ae8312e7f8407354b5aae2eba318fa84
|
test/Analysis/html-diags-multifile.c
|
test/Analysis/html-diags-multifile.c
|
// RUN: mkdir -p %t.dir
// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t.dir
// RUN: ls %t.dir | not grep report
// RUN: rm -fR %t.dir
// This tests that we do not currently emit HTML diagnostics for reports that
// cross file boundaries.
#include "html-diags-multifile.h"
#define CALL_HAS_BUG(q) has_bug(q)
void test_call_macro() {
CALL_HAS_BUG(0);
}
|
// RUN: mkdir -p %t.dir
// RUN: %clang_cc1 -analyze -analyzer-output=html -analyzer-checker=core -o %t.dir %s
// RUN: ls %t.dir | not grep report
// RUN: rm -fR %t.dir
// This tests that we do not currently emit HTML diagnostics for reports that
// cross file boundaries.
#include "html-diags-multifile.h"
#define CALL_HAS_BUG(q) has_bug(q)
void test_call_macro() {
CALL_HAS_BUG(0);
}
|
Fix test that wasn't testing anything
|
Fix test that wasn't testing anything
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@194069 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
apple/swift-clang,llvm-mirror/clang,apple/swift-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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang
|
3340e66e82e74a89a5d81763b4ed7b21acb810ff
|
PKRevealController/PKAppDelegate.h
|
PKRevealController/PKAppDelegate.h
|
/*
PKRevealController - Copyright (C) 2012 Philip Kluz (Philip.Kluz@zuui.org)
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 <UIKit/UIKit.h>
@class PKRevealController;
@interface PKAppDelegate : UIResponder <UIApplicationDelegate>
@property (nonatomic, strong, readwrite) PKRevealController *revealController;
@property (strong, nonatomic) UIWindow *window;
@end
|
/*
PKRevealController - Copyright (C) 2012 Philip Kluz (Philip.Kluz@zuui.org)
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 <UIKit/UIKit.h>
@class PKRevealController;
@interface PKAppDelegate : UIResponder <UIApplicationDelegate>
@property (nonatomic, strong, readwrite) PKRevealController *revealController;
@property (nonatomic, strong) UIWindow *window;
@end
|
Use right order of nonatomic and strong
|
Use right order of nonatomic and strong
|
C
|
mit
|
xiaotaijun/PKRevealController,ramoslin02/PKRevealController,SuPair/PKRevealController,wjszf/PKRevealController,adonoho/PKRevealController,BlessNeo/PKRevealController,SummerHF/PKRevealController,duanhjlt/PKRevealController,AlanJN/PKRevealController,pkluz/PKRevealController,cnbin/PKRevealController,andyFang1688/PKRevealController,libiao88/PKRevealController,wpostma/PKRevealControllerWP,adonoho/PKRevealController,policp/PKRevealController,RyanTech/PKRevealController,wayne798/PKRevealController,leasual/PKRevealController,emodeqidao/PKRevealController,chengkaizone/PKRevealController,adonoho/PKRevealController,hanangellove/PKRevealController,SanChain/PKRevealController,AbooJan/PKRevealController,chieryw/PKRevealController,wubangjunjava/PKRevealController,xingyuniu/PKRevealController,nitxc/PKRevealController,pengleelove/PKRevealController
|
3f431df8ec46b86090ad59ee153872c45d4d429d
|
usr.bin/systat/devs.h
|
usr.bin/systat/devs.h
|
int dsinit(int, struct statinfo *, struct statinfo *, struct statinfo *);
int dscmd(char *, char *, int, struct statinfo *);
|
/*-
* Copyright (c) 1998 David E. O'Brien
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id$
*/
int dsinit(int, struct statinfo *, struct statinfo *, struct statinfo *);
int dscmd(char *, char *, int, struct statinfo *);
|
Add copyright and RCS/CVS Id.
|
Add copyright and RCS/CVS Id.
Noticed by: ken
|
C
|
bsd-3-clause
|
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
|
6df016fb205bec2c07872597ad126856b341cff7
|
src/java/org_bitcoin_NativeSecp256k1.c
|
src/java/org_bitcoin_NativeSecp256k1.c
|
#include "org_bitcoin_NativeSecp256k1.h"
#include "include/secp256k1.h"
JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify
(JNIEnv* env, jclass classObject, jobject byteBufferObject)
{
unsigned char* data = (unsigned char*) env->GetDirectBufferAddress(byteBufferObject);
int sigLen = *((int*)(data + 32));
int pubLen = *((int*)(data + 32 + 4));
return secp256k1_ecdsa_verify(data, 32, data+32+8, sigLen, data+32+8+sigLen, pubLen);
}
static void __javasecp256k1_attach(void) __attribute__((constructor));
static void __javasecp256k1_detach(void) __attribute__((destructor));
static void __javasecp256k1_attach(void) {
secp256k1_start();
}
static void __javasecp256k1_detach(void) {
secp256k1_stop();
}
|
#include "org_bitcoin_NativeSecp256k1.h"
#include "include/secp256k1.h"
JNIEXPORT jint JNICALL Java_org_bitcoin_NativeSecp256k1_secp256k1_1ecdsa_1verify
(JNIEnv* env, jclass classObject, jobject byteBufferObject)
{
unsigned char* data = (unsigned char*) (*env)->GetDirectBufferAddress(env, byteBufferObject);
int sigLen = *((int*)(data + 32));
int pubLen = *((int*)(data + 32 + 4));
return secp256k1_ecdsa_verify(data, 32, data+32+8, sigLen, data+32+8+sigLen, pubLen);
}
static void __javasecp256k1_attach(void) __attribute__((constructor));
static void __javasecp256k1_detach(void) __attribute__((destructor));
static void __javasecp256k1_attach(void) {
secp256k1_start();
}
static void __javasecp256k1_detach(void) {
secp256k1_stop();
}
|
Fix JNI for C instead of C++
|
Fix JNI for C instead of C++
(because apparently there is a significant difference...)
|
C
|
mit
|
ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,BWallet/secp256k1,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,kleetus/secp256k1,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,Gustav-Simonsson/secp256k1,pmienk/secp256k1,01BTC10/secp256k1,pmienk/secp256k1,voisine/secp256k1,sipa/secp256k1-zkp,01BTC10/secp256k1,kleetus/secp256k1,martindale/secp256k1,chfast/secp256k1,martindale/secp256k1-zkp,Bitcoin-com/BUcash,Justaphf/BitcoinUnlimited,BitcoinUnlimited/BitcoinUnlimited,Justaphf/BitcoinUnlimited,bitcoin/secp256k1,BitcoinUnlimited/BitcoinUnlimited,libbitcoin/secp256k1,Justaphf/BitcoinUnlimited,sipa/secp256k1-zkp,krzysztofwos/BitcoinUnlimited,ryancdotorg/secp256k1,marcusdiaz/BitcoinUnlimited,cddjr/BitcoinUnlimited,shea256/secp256k1-zkp,krzysztofwos/BitcoinUnlimited,marcusdiaz/BitcoinUnlimited,ryancdotorg/secp256k1,libmetrocoin/secp256k1,GSongHashrate/secp256k1,cddjr/BitcoinUnlimited,randy-waterhouse/secp256k1,martindale/secp256k1,bitcoin/secp256k1,BitcoinUnlimited/BitcoinUnlimited,afk11/secp256k1,vlajos/secp256k1,Gustav-Simonsson/secp256k1,digitalbitbox/secp256k1,bitcoin-core/secp256k1,jonasschnelli/secp256k1,sipa/secp256k1-zkp,ChrisXin/secp256k1,ryancdotorg/secp256k1,01BTC10/secp256k1,krzysztofwos/BitcoinUnlimited,libmetrocoin/secp256k1,cddjr/BitcoinUnlimited,ChrisXin/secp256k1,martindale/secp256k1,Justaphf/BitcoinUnlimited,randy-waterhouse/secp256k1,digitalbitbox/secp256k1,instagibbs/secp256k1,evoskuil/secp256k1,BWallet/secp256k1,bitcoin/secp256k1,Gustav-Simonsson/secp256k1,Bitcoin-com/BUcash,libbitcoin/secp256k1,instagibbs/secp256k1,luke-jr/secp256k1,Justaphf/BitcoinUnlimited,evoskuil/secp256k1,Justaphf/BitcoinUnlimited,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,pmienk/secp256k1,sipa/secp256k1,apoelstra/secp256k1,evoskuil/secp256k1,rustyrussell/secp256k1,evoskuil/secp256k1,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,martindale/secp256k1-zkp,ChrisXin/secp256k1,pmienk/secp256k1,ElementsProject/secp256k1-zkp,BWallet/secp256k1,bitcoin-core/secp256k1,BWallet/secp256k1,Bitcoin-com/BUcash,instagibbs/secp256k1,ChrisXin/secp256k1,krzysztofwos/BitcoinUnlimited,afk11/secp256k1,cddjr/BitcoinUnlimited,peterdettman/secp256k1,krzysztofwos/BitcoinUnlimited,apoelstra/secp256k1,libmetrocoin/secp256k1,Bitcoin-com/BUcash,sipa/secp256k1,GSongHashrate/secp256k1,ryancdotorg/secp256k1,voisine/secp256k1,chfast/secp256k1,voisine/secp256k1,BTCfork/hardfork_prototype_1_mvf-bu,martindale/secp256k1-zkp,sipa/secp256k1-zkp,apoelstra/secp256k1,bitcoin/secp256k1,ftrader-bitcoinunlimited/hardfork_prototype_1_mvf-bu,voisine/secp256k1,libmetrocoin/secp256k1,instagibbs/secp256k1,evoskuil/secp256k1,pmienk/secp256k1,01BTC10/secp256k1,libbitcoin/secp256k1,afk11/secp256k1,GSongHashrate/secp256k1,sipa/secp256k1,Gustav-Simonsson/secp256k1,libbitcoin/secp256k1,vlajos/secp256k1,vlajos/secp256k1,cddjr/BitcoinUnlimited,sipa/secp256k1,chfast/secp256k1,GSongHashrate/secp256k1,digitalbitbox/secp256k1,jonasschnelli/secp256k1,BTCfork/hardfork_prototype_1_mvf-bu,apoelstra/secp256k1,BTCfork/hardfork_prototype_1_mvf-bu,shea256/secp256k1-zkp,rustyrussell/secp256k1,jonasschnelli/secp256k1,ElementsProject/secp256k1-zkp,chfast/secp256k1,randy-waterhouse/secp256k1,afk11/secp256k1,BitcoinUnlimited/BitcoinUnlimited,shea256/secp256k1-zkp,martindale/secp256k1,BTCfork/hardfork_prototype_1_mvf-bu,peterdettman/secp256k1,sipa/secp256k1-zkp,jonasschnelli/secp256k1,marcusdiaz/BitcoinUnlimited,rustyrussell/secp256k1,bitcoin/secp256k1,kleetus/secp256k1,shea256/secp256k1-zkp,randy-waterhouse/secp256k1,vlajos/secp256k1,BitcoinUnlimited/BitcoinUnlimited,apoelstra/secp256k1,rustyrussell/secp256k1,marcusdiaz/BitcoinUnlimited,luke-jr/secp256k1,martindale/secp256k1-zkp,luke-jr/secp256k1,BTCfork/hardfork_prototype_1_mvf-bu,krzysztofwos/BitcoinUnlimited,voisine/secp256k1,kleetus/secp256k1,marcusdiaz/BitcoinUnlimited,kleetus/secp256k1,digitalbitbox/secp256k1,Bitcoin-com/BUcash,BitcoinUnlimited/BitcoinUnlimited,cddjr/BitcoinUnlimited,Bitcoin-com/BUcash,digitalbitbox/secp256k1,BTCfork/hardfork_prototype_1_mvf-bu,afk11/secp256k1,marcusdiaz/BitcoinUnlimited,libbitcoin/secp256k1,instagibbs/secp256k1,chfast/secp256k1
|
a97b433223d22e3050a16d0473dc52d247b74dab
|
include/PixelProcessing.h
|
include/PixelProcessing.h
|
#pragma once
#include "MyImage.h"
#define MASK_SIZE 5
class Pixel {
private:
BYTE blue;
BYTE green;
BYTE red;
public:
Pixel(){
blue;
green;
red;
}
~Pixel(){}
BYTE GetBlue() { return blue; }
BYTE GetGreen() { return green; }
BYTE GetRed() { return red; }
void Set(int _b, int _g, int _r)
{
blue = _b;
green = _g;
red = _r;
}
};
class CPixelProcessing
{
public:
CPixelProcessing(CMyImage*, int, BYTE, BYTE);
~CPixelProcessing(void){}
CMyImage* start(BYTE**);
private:
int nWidth;
int nHeight;
int nBitDepth;
int nOutput;
BYTE nHotVal;
BYTE nDeadVal;
CMyImage *pResult;
BYTE** szResult;
BYTE *temp;
void _8bitImageCorrection(BYTE**);
void _24bitImageCorrection(BYTE**);
int GetMedian(vector<BYTE>);
bool GetPixelState(int, int, int);
bool GetPixelState(int, int, Pixel);
};
|
#pragma once
#include "MyImage.h"
#define MASK_SIZE 3
class Pixel {
private:
BYTE blue;
BYTE green;
BYTE red;
public:
Pixel(){
blue;
green;
red;
}
~Pixel(){}
BYTE GetBlue() { return blue; }
BYTE GetGreen() { return green; }
BYTE GetRed() { return red; }
void Set(int _b, int _g, int _r)
{
blue = _b;
green = _g;
red = _r;
}
};
class CPixelProcessing
{
public:
CPixelProcessing(CMyImage*, int, BYTE, BYTE);
~CPixelProcessing(void){}
CMyImage* start(BYTE**);
private:
int nWidth;
int nHeight;
int nBitDepth;
int nOutput;
BYTE nHotVal;
BYTE nDeadVal;
CMyImage *pResult;
BYTE** szResult;
BYTE *temp;
void _8bitImageCorrection(BYTE**);
void _24bitImageCorrection(BYTE**);
int GetMedian(vector<BYTE>);
bool GetPixelState(int, int, int);
bool GetPixelState(int, int, Pixel);
};
|
Change mask size from 5 to 3
|
Change mask size from 5 to 3
|
C
|
bsd-3-clause
|
mystesPF/Defect-Pixel-Corrector,mystesPF/Defect-Pixel-Corrector
|
7662ebe6de73bbada1f216590f3e8b15b496a46b
|
Src/lib/utils/swap.c
|
Src/lib/utils/swap.c
|
#include "swap.h"
#include <string.h>
/* Swap generic function */
void swap(void *vp1, void *vp2, int size)
{
char buffer[size];
memcpy(buffer, vp1, size);
memcpy(vp1,vp2,size);
memcpy(vp2,buffer,size);
}
|
#include "swap.h"
#include <stdlib.h>
#include <string.h>
/* Swap generic function */
void swap(void *vp1, void *vp2, int size)
{
char* buffer = (char*) malloc(size*sizeof(char));
memcpy(buffer, vp1, size);
memcpy(vp1,vp2,size);
memcpy(vp2,buffer,size);
free(buffer);
}
|
Use malloc/free as compile failed under MSVC. Ask rpmuller to check if okay.
|
Use malloc/free as compile failed under MSVC. Ask rpmuller to check if okay.
git-svn-id: 6e15fd90c9d760a7473dfa00402abf17076c345c@188 64417113-1622-0410-aef8-ef15d1a3721e
|
C
|
bsd-3-clause
|
berquist/PyQuante,berquist/PyQuante,berquist/PyQuante,berquist/PyQuante,berquist/PyQuante,berquist/PyQuante
|
610ff601af40fe5fb1978a7717eafe966b120dee
|
include/SafariServices/SFSafariViewControllerDelegate.h
|
include/SafariServices/SFSafariViewControllerDelegate.h
|
//******************************************************************************
//
// Copyright (c) 2016 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// 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.
//
//******************************************************************************
#pragma once
#import <SafariServices/SafariServicesExport.h>
#import <Foundation/NSObjCRuntime.h>
@class SFSafariViewController;
@class NSURL;
@class NSString;
@class NSArray;
@protocol SFSafariViewControllerDelegate <NSObject>
- (void)safariViewController:(SFSafariViewController*)controller didCompleteInitialLoad:(BOOL)didLoadSuccessfully;
- (NSArray*)safariViewController:(SFSafariViewController*)controller activityItemsForURL:(NSURL*)URL title:(NSString*)title;
- (void)safariViewControllerDidFinish:(SFSafariViewController*)controller;
@end
|
//******************************************************************************
//
// Copyright (c) 2016 Microsoft Corporation. All rights reserved.
//
// This code is licensed under the MIT License (MIT).
//
// 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.
//
//******************************************************************************
#pragma once
#import <SafariServices/SafariServicesExport.h>
#import <Foundation/NSObject.h>
@class SFSafariViewController;
@class NSURL;
@class NSString;
@class NSArray;
@protocol SFSafariViewControllerDelegate <NSObject>
- (void)safariViewController:(SFSafariViewController*)controller didCompleteInitialLoad:(BOOL)didLoadSuccessfully;
- (NSArray*)safariViewController:(SFSafariViewController*)controller activityItemsForURL:(NSURL*)URL title:(NSString*)title;
- (void)safariViewControllerDidFinish:(SFSafariViewController*)controller;
@end
|
Add missing NSObject protocol declaration.
|
Add missing NSObject protocol declaration.
|
C
|
mit
|
nathpete-msft/WinObjC,MSFTFox/WinObjC,Microsoft/WinObjC,pradipd/WinObjC,bbowman/WinObjC,rajsesh-msft/WinObjC,nathpete-msft/WinObjC,MSFTFox/WinObjC,rajsesh-msft/WinObjC,yweijiang/WinObjC,yweijiang/WinObjC,ehren/WinObjC,ehren/WinObjC,yweijiang/WinObjC,bbowman/WinObjC,Microsoft/WinObjC,autodesk-forks/WinObjC,rajsesh-msft/WinObjC,bbowman/WinObjC,vkvenkat/WinObjC,vkvenkat/WinObjC,pradipd/WinObjC,ehren/WinObjC,vkvenkat/WinObjC,nathpete-msft/WinObjC,Microsoft/WinObjC,Microsoft/WinObjC,autodesk-forks/WinObjC,yweijiang/WinObjC,bbowman/WinObjC,autodesk-forks/WinObjC,bbowman/WinObjC,ehren/WinObjC,nathpete-msft/WinObjC,pradipd/WinObjC,MSFTFox/WinObjC,nathpete-msft/WinObjC,rajsesh-msft/WinObjC,MSFTFox/WinObjC,pradipd/WinObjC,autodesk-forks/WinObjC,ehren/WinObjC,pradipd/WinObjC,vkvenkat/WinObjC
|
acc060f6ee491b1eed93b45df2f1b37fb710aa7a
|
test/CodeGen/wchar-const.c
|
test/CodeGen/wchar-const.c
|
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck %s
// This should pass for any endianness combination of host and target.
// This bit is taken from Sema/wchar.c so we can avoid the wchar.h include.
typedef __WCHAR_TYPE__ wchar_t;
#if defined(_WIN32) || defined(_M_IX86) || defined(__CYGWIN__) \
|| defined(_M_X64) || defined(SHORT_WCHAR)
#define WCHAR_T_TYPE unsigned short
#elif defined(__sun) || defined(__AuroraUX__)
#define WCHAR_T_TYPE long
#else /* Solaris or AuroraUX. */
#define WCHAR_T_TYPE int
#endif
// CHECK: @.str = private unnamed_addr constant [72 x i8] c"
extern void foo(const wchar_t* p);
int main (int argc, const char * argv[])
{
foo(L"This is some text");
return 0;
}
|
// RUN: %clang_cc1 -emit-llvm %s -o - -triple i386-pc-win32 | FileCheck %s --check-prefix=WIN
// RUN: %clang_cc1 -emit-llvm %s -o - -triple x86_64-apple-darwin | FileCheck %s --check-prefix=DAR
// This should pass for any endianness combination of host and target.
// This bit is taken from Sema/wchar.c so we can avoid the wchar.h include.
typedef __WCHAR_TYPE__ wchar_t;
#if defined(_WIN32) || defined(_M_IX86) || defined(__CYGWIN__) \
|| defined(_M_X64) || defined(SHORT_WCHAR)
#define WCHAR_T_TYPE unsigned short
#elif defined(__sun) || defined(__AuroraUX__)
#define WCHAR_T_TYPE long
#else /* Solaris or AuroraUX. */
#define WCHAR_T_TYPE int
#endif
// CHECK-DAR: private unnamed_addr constant [72 x i8] c"
// CHECK-WIN: private unnamed_addr constant [36 x i8] c"
extern void foo(const wchar_t* p);
int main (int argc, const char * argv[])
{
foo(L"This is some text");
return 0;
}
|
Handle different sized wchar_t for windows.
|
Handle different sized wchar_t for windows.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@136192 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
llvm-mirror/clang,apple/swift-clang,apple/swift-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,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang
|
9ed5a4910c477f418ba200252cd6696339ee5ba5
|
include/tablet_mode.h
|
include/tablet_mode.h
|
/* Copyright 2016 The Chromium OS Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
/* Header for tablet_mode.c */
#ifdef CONFIG_TABLET_MODE
/* Return 1 if in tablet mode, 0 otherwise */
int tablet_get_mode(void);
void tablet_set_mode(int mode);
/**
* Interrupt service routine for hall sensor.
*
* HALL_SENSOR_GPIO_L must be defined.
*
* @param signal: GPIO signal
*/
void hall_sensor_isr(enum gpio_signal signal);
/**
* Disables the interrupt on GPIO connected to hall sensor. Additionally, it
* disables the tablet mode switch sub-system and turns off tablet mode. This is
* useful when the same firmware is shared between convertible and clamshell
* devices to turn off hall sensor and tablet mode detection on clamshell.
*/
void hall_sensor_disable(void);
/*
* This must be defined when CONFIG_HALL_SENSOR_CUSTOM is defined. This allows
* a board to override the default behavior that determines if the 360 sensor is
* active: !gpio_get_level(HALL_SENSOR_GPIO_L).
*
* Returns 1 if the 360 sensor is active; otherwise 0.
*/
int board_sensor_at_360(void);
#endif
|
/* Copyright 2016 The Chromium OS 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 __CROS_EC_TABLET_MODE_H
#define __CROS_EC_TABLET_MODE_H
/**
* Get tablet mode state
*
* Return 1 if in tablet mode, 0 otherwise
*/
int tablet_get_mode(void);
/**
* Set tablet mode state
*
* @param mode 1: tablet mode. 0 clamshell mode.
*/
void tablet_set_mode(int mode);
/**
* Interrupt service routine for hall sensor.
*
* HALL_SENSOR_GPIO_L must be defined.
*
* @param signal: GPIO signal
*/
void hall_sensor_isr(enum gpio_signal signal);
/**
* Disables the interrupt on GPIO connected to hall sensor. Additionally, it
* disables the tablet mode switch sub-system and turns off tablet mode. This is
* useful when the same firmware is shared between convertible and clamshell
* devices to turn off hall sensor and tablet mode detection on clamshell.
*/
void hall_sensor_disable(void);
/**
* This must be defined when CONFIG_HALL_SENSOR_CUSTOM is defined. This allows
* a board to override the default behavior that determines if the 360 sensor is
* active: !gpio_get_level(HALL_SENSOR_GPIO_L).
*
* Returns 1 if the 360 sensor is active; otherwise 0.
*/
int board_sensor_at_360(void);
#endif /* __CROS_EC_TABLET_MODE_H */
|
Fix header file guard and API definitions
|
tablet-mode: Fix header file guard and API definitions
This patch adds a usual inclusion guard (#ifdef __CROS_EC_*_H) and
fixes API descriptions.
Signed-off-by: Daisuke Nojiri <fd5f93af191bf7e8f73ea71cc3c0f66b41b1dd49@chromium.org>
BUG=none
BRANCH=none
TEST=buildall
Change-Id: I96149cfe76cff7ab85be4785252a600b565e4a92
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1696913
Reviewed-by: Daisuke Nojiri <fd5f93af191bf7e8f73ea71cc3c0f66b41b1dd49@chromium.org>
Commit-Queue: Daisuke Nojiri <fd5f93af191bf7e8f73ea71cc3c0f66b41b1dd49@chromium.org>
Tested-by: Daisuke Nojiri <fd5f93af191bf7e8f73ea71cc3c0f66b41b1dd49@chromium.org>
Auto-Submit: Daisuke Nojiri <fd5f93af191bf7e8f73ea71cc3c0f66b41b1dd49@chromium.org>
|
C
|
bsd-3-clause
|
coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec,coreboot/chrome-ec
|
bac1e84578c9b1a9ddc961814db6d46cc03bfa6a
|
demo/src/input.h
|
demo/src/input.h
|
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in 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.
#pragma once
#include <cstdint>
uint32_t DoMath(uint32_t a);
uint32_t DoMath(uint32_t a) {
return a * 3;
}
|
// Copyright 2020 Google LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// https://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in 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.
#pragma once
#include <cstdint>
uint32_t DoMath(uint32_t a);
inline uint32_t DoMath(uint32_t a) {
return a * 3;
}
|
Fix another bug in demo
|
Fix another bug in demo
|
C
|
apache-2.0
|
google/autocxx,google/autocxx,google/autocxx,google/autocxx
|
87a6b78f84d1cc363fe7482ff0d7424a0477e26f
|
include/cssys/mac/osdefs.h
|
include/cssys/mac/osdefs.h
|
/*
This header file contains all definitions needed for compatibility issues
Most of them should be defined only if corresponding SYSDEF_XXX macro is
defined (see system/sysdef.h)
*/
#ifndef OSDEFS_H
#define OSDEFS_H
int strcasecmp (const char *str1, const char *str2);
int strncasecmp (char const *dst, char const *src, int maxLen);
char *strdup (const char *str);
#ifdef SYSDEF_ACCESS
int access (const char *path, int mode);
#endif
// The 2D graphics driver used by software renderer on this platform
#define SOFTWARE_2D_DRIVER "crystalspace.graphics2d.mac"
#define OPENGL_2D_DRIVER "crystalspace.graphics2d.defaultgl"
#define GLIDE_2D_DRIVER "crystalspace.graphics3d.glide.2x"
// Sound driver
#define SOUND_DRIVER "crystalspace.sound.driver.mac"
#if defined (SYSDEF_DIR)
# define __NEED_GENERIC_ISDIR
#endif
#define PORT_BYTESEX_BIG_ENDIAN 1
#endif // OSDEFS_H
|
/*
This header file contains all definitions needed for compatibility issues
Most of them should be defined only if corresponding SYSDEF_XXX macro is
defined (see system/sysdef.h)
*/
#ifndef OSDEFS_H
#define OSDEFS_H
int strcasecmp (const char *str1, const char *str2);
int strncasecmp (char const *dst, char const *src, int maxLen);
char *strdup (const char *str);
#ifdef SYSDEF_ACCESS
int access (const char *path, int mode);
#endif
// The 2D graphics driver used by software renderer on this platform
#define SOFTWARE_2D_DRIVER "crystalspace.graphics2d.mac"
#define OPENGL_2D_DRIVER "crystalspace.graphics2d.defaultgl"
#define GLIDE_2D_DRIVER "crystalspace.graphics3d.glide.2x"
// Sound driver
#define SOUND_DRIVER "crystalspace.sound.driver.mac"
#if defined (SYSDEF_DIR)
# define __NEED_GENERIC_ISDIR
#endif
#define PORT_BYTESEX_BIG_ENDIAN 1
#ifdef SYSDEF_2DDRIVER_DEFS
#define kArrowCursor 128
#define kGeneralErrorDialog 1026
#define kAskForDepthChangeDialog 1027
#define kErrorStrings 1025
#define kBadDepthString 1
#define kNoDSContext 2
#define kUnableToOpenDSContext 3
#define kUnableToReserveDSContext 4
#define kFatalErrorInGlide 5
#define kFatalErrorInOpenGL2D 6
#define kFatalErrorInOpenGL3D 7
#define kFatalErrorOutOfMemory 8
#define kFatalErrorInDriver2D 9
#endif
#endif // OSDEFS_H
|
Move defines for error strings and dialogs into this file for central tracking of ids.
|
Move defines for error strings and dialogs into this file for central tracking of ids.
git-svn-id: 28d9401aa571d5108e51b194aae6f24ca5964c06@483 8cc4aa7f-3514-0410-904f-f2cc9021211c
|
C
|
lgpl-2.1
|
crystalspace/CS,crystalspace/CS,crystalspace/CS,crystalspace/CS,crystalspace/CS,crystalspace/CS,crystalspace/CS,crystalspace/CS
|
96dea463e3cb261eb2625dc96a90b4993178580b
|
usr.sbin/nologin/nologin.c
|
usr.sbin/nologin/nologin.c
|
/*-
* This program is in the public domain. I couldn't bring myself to
* declare Copyright on a variant of Hello World.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <sys/types.h>
#include <sys/uio.h>
#include <syslog.h>
#include <unistd.h>
#define MESSAGE "This account is currently not available.\n"
int
main(int argc, char *argv[])
{
#ifndef NO_NOLOGIN_LOG
char *user, *tt;
if ((tt = ttyname(0)) == NULL)
tt = "UNKNOWN";
if ((user = getlogin()) == NULL)
user = "UNKNOWN";
openlog("nologin", LOG_CONS, LOG_AUTH);
syslog(LOG_CRIT, "Attempted login by %s on %s", user, tt);
closelog();
#endif /* NO_NOLOGIN_LOG */
write(STDOUT_FILENO, MESSAGE, sizeof(MESSAGE) - 1);
_exit(1);
}
|
/*-
* Copyright (c) 2004 The FreeBSD Project.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
__FBSDID("$FreeBSD$");
#include <stdio.h>
#include <syslog.h>
#include <unistd.h>
#define MESSAGE "This account is currently not available.\n"
int
main(int argc, char *argv[])
{
char *user, *tt;
if ((tt = ttyname(0)) == NULL)
tt = "UNKNOWN";
if ((user = getlogin()) == NULL)
user = "UNKNOWN";
openlog("nologin", LOG_CONS, LOG_AUTH);
syslog(LOG_CRIT, "Attempted login by %s on %s", user, tt);
closelog();
printf("%s", MESSAGE);
return 1;
}
|
Add standard copyright notice; fix style bugs. (Reported by bde) Remove NO_NOLOGIN_LOG option now that we're off the root partition.
|
Add standard copyright notice; fix style bugs. (Reported by bde)
Remove NO_NOLOGIN_LOG option now that we're off the root partition.
|
C
|
bsd-3-clause
|
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
|
38ee400049d579c60f3e0ddfb6c388093d53ac7a
|
Josh_Zane_Sebastian/src/parser/parser.c
|
Josh_Zane_Sebastian/src/parser/parser.c
|
#include types.c
#include <string.h>
/* We can:
Set something equal to something
Function calls
Function definitions
Returning things -- delimiter '<'
Printing things
Iffing */
struct call parseCall(char* statement);
struct function parseFunction(char* statement);
char* fixSpacing(char* code) {
char* fixedCode = calloc(sizeof(char), strlen(code) + 1);
fixedCode = strcpy(fixedCode, code);
int n = strlen(fixedCode);
char* doubleSpace = strstr(fixedCode, " ");
char* movingIndex;
for( ; doubleSpace; doubleSpace = strstr(fixedCode, " ")) {
for(movingIndex = doubleSpace; movingIndex&; movingIndex++) {
movingIndex[0] = movingIndex[1];
}
}
return fixedCode;
}
|
#include <stdlib.h>
#include <stdio.h>
#include types.c
#include <string.h>
/* We can:
Set something equal to something
Function calls
Function definitions
Returning things -- delimiter '<'
Printing things
Iffing */
struct call parseCall(char* statement);
struct function parseFunction(char* statement);
char* fixSpacing(char* code) {
char* fixedCode = calloc(sizeof(char), strlen(code) + 1);
fixedCode = strcpy(fixedCode, code);
char* doubleSpace = strstr(fixedCode, " ");
char* movingIndex;
for( ; doubleSpace; doubleSpace = strstr(fixedCode, " ")) {
for(movingIndex = doubleSpace; movingIndex&; movingIndex++) {
movingIndex[0] = movingIndex[1];
}
}
return fixedCode;
}
struct statement* parse(char* code) {
char* regCode = fixSpacing(code);
int n = 0;
int i;
for(i = 0; regCode[i]; i++) {
if(regCode[i] == ' ') {
n++;
}
}
char** spcTokens = calloc(sizeof(char*), n+1);
|
Make parse() count the spaces in the regularized code string.
|
Make parse() count the spaces in the regularized code string.
|
C
|
mit
|
aacoppa/final,aacoppa/final
|
2567fa8188b27b97d550c546f7a83211940e91a1
|
src/feng_utils.h
|
src/feng_utils.h
|
/* *
* This file is part of Feng
*
* Copyright (C) 2009 by LScube team <team@lscube.org>
* See AUTHORS for more details
*
* feng 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.
*
* feng 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 feng; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* */
#ifndef FN_UTILS_H
#define FN_UTILS_H
#include "config.h"
#include <time.h>
#include <sys/time.h>
#include <ctype.h>
#include <stdint.h>
#include <sys/types.h>
#include <math.h>
#include <string.h>
/*! autodescriptive error values */
#define ERR_NOERROR 0
#define ERR_GENERIC -1
#define ERR_ALLOC -4
#endif // FN_UTILS_H
|
/* *
* This file is part of Feng
*
* Copyright (C) 2009 by LScube team <team@lscube.org>
* See AUTHORS for more details
*
* feng 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.
*
* feng 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 feng; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* */
#ifndef FN_UTILS_H
#define FN_UTILS_H
#include "config.h"
#include <time.h>
#include <sys/time.h>
#include <ctype.h>
#include <stdint.h>
#include <sys/types.h>
#include <math.h>
#include <string.h>
#endif // FN_UTILS_H
|
Remove the remaining ERR_ constants that are never used or tested for.
|
Remove the remaining ERR_ constants that are never used or tested for.
|
C
|
lgpl-2.1
|
winlinvip/feng,lscube/feng,winlinvip/feng,lscube/feng,winlinvip/feng,lscube/feng
|
ba6d38ac0611239a1fa7d05b9c915dbff201c082
|
ext/librtlsdr/librtlsdr.c
|
ext/librtlsdr/librtlsdr.c
|
#include "ruby.h"
#include "rtl-sdr.h"
VALUE m_turtleshell = Qnil;
static VALUE m_rtlsdr;
static VALUE turtleshell_count() {
return INT2NUM(rtlsdr_get_device_count());
}
static VALUE turtleshell_new_device() {
char *name;
rtlsdr_dev_t *device = NULL;
int count = rtlsdr_get_device_count();
// ensure we have at least one device
if (!count) { return Qnil; }
name = rtlsdr_get_device_name(0);
device = rtlsdr_open(&device, 0);
VALUE device_hash = rb_hash_new();
rb_hash_aset(device_hash, rb_str_new2("name"), rb_str_new2(rtlsdr_get_device_name(0)));
rb_hash_aset(device_hash, rb_str_new2("device_handle"), device);
return device_hash;
}
void Init_librtlsdr() {
m_turtleshell = rb_define_module("TurtleShell");
m_rtlsdr = rb_define_module_under(m_turtleshell, "RTLSDR");
rb_define_module_function(m_rtlsdr, "count", turtleshell_count, 0);
rb_define_module_function(m_rtlsdr, "first_device", turtleshell_new_device, 0);
}
|
#include "ruby.h"
#include "rtl-sdr.h"
VALUE m_turtleshell = Qnil;
VALUE c_device;
static VALUE m_rtlsdr;
static VALUE turtleshell_count() {
return INT2NUM(rtlsdr_get_device_count());
}
static VALUE turtleshell_new_device() {
rtlsdr_dev_t *device = NULL;
VALUE wrapped_device;
VALUE hash;
int count = rtlsdr_get_device_count();
// ensure we have at least one device
if (!count) { return Qnil; }
device = rtlsdr_open(&device, 0);
wrapped_device = Data_Wrap_Struct(c_device, NULL, NULL, device);
hash = rb_hash_new();
rb_hash_aset(hash, rb_str_new2("name"), rb_str_new2(rtlsdr_get_device_name(0)));
rb_hash_aset(hash, rb_str_new2("device_handle"), wrapped_device);
return hash;
}
void Init_librtlsdr() {
m_turtleshell = rb_define_module("TurtleShell");
m_rtlsdr = rb_define_module_under(m_turtleshell, "RTLSDR");
c_device = rb_define_class_under(m_rtlsdr, "Device", rb_cObject);
rb_define_module_function(m_rtlsdr, "count", turtleshell_count, 0);
rb_define_module_function(m_rtlsdr, "first_device", turtleshell_new_device, 0);
}
|
Fix a few warnings that prevented Travis from compiling
|
Fix a few warnings that prevented Travis from compiling
|
C
|
mit
|
tjarratt/turtleshell,tjarratt/turtleshell
|
e4cb644925142ac45cdfb70244a2751f6cab1e21
|
backend-test.c
|
backend-test.c
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "expression.h"
#include "stream.h"
#include "parser.h"
#include "analyze.h"
#include "generator.h"
#include "backend.h"
#include "optimize.h"
int main(int argc, char *argv[]) {
if (argc < 3) {
fprintf(stderr, "usage: backend-test <input-file> <output-file>\n");
exit(1);
}
FILE *src = fopen(argv[1], "r");
if (src == NULL) {
fprintf(stderr, "backend-test: no such file or directory\n");
return 1;
}
stream *in = open_stream(src);
block_statement *block = parse(in);
close_stream(in);
fclose(src);
analyze(block);
code_system *system = generate(block);
optimize(system);
FILE *out = fopen(argv[2], "w");
if (out == NULL) {
fprintf(stderr, "backend-test: error opening output-file\n");
return 1;
}
backend_write(system, out);
fflush(out);
fclose(out);
return 0;
}
|
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include "expression.h"
#include "stream.h"
#include "parser.h"
#include "analyze.h"
#include "generator.h"
#include "backend.h"
#include "optimize.h"
int main(int argc, char *argv[]) {
if (argc < 3) {
fprintf(stderr, "usage: backend-test <input-file> <output-file>\n");
return 1;
}
FILE *src = fopen(argv[1], "r");
if (src == NULL) {
fprintf(stderr, "backend-test: no such file or directory\n");
return 1;
}
stream *in = open_stream(src);
block_statement *block = parse(in);
close_stream(in);
fclose(src);
analyze(block);
code_system *system = generate(block);
optimize(system);
FILE *out = fopen(argv[2], "w");
if (out == NULL) {
fprintf(stderr, "backend-test: error opening output-file\n");
return 1;
}
backend_write(system, out);
fflush(out);
fclose(out);
return 0;
}
|
Return with exit code from main functions
|
Return with exit code from main functions
Signed-off-by: Eli Skeggs <5085073edea185966a30aad7f06b91f6997b42e5@gmail.com>
|
C
|
mit
|
bearhub/cub,bearhub/cub,bearhub/cub,bearhub/cub
|
4b6c83f57874c2ac10b450ba0f57db0a0f22db67
|
drivers/scsi/qla4xxx/ql4_version.h
|
drivers/scsi/qla4xxx/ql4_version.h
|
/*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2006 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k1"
|
/*
* QLogic iSCSI HBA Driver
* Copyright (c) 2003-2006 QLogic Corporation
*
* See LICENSE.qla4xxx for copyright and licensing details.
*/
#define QLA4XXX_DRIVER_VERSION "5.02.00-k2"
|
Update driver version to 5.02.00-k2
|
[SCSI] qla4xxx: Update driver version to 5.02.00-k2
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,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,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs
|
73cfbf47cc0f13db91e461d98081503597d3d50b
|
Kiwi/KWFutureObject.h
|
Kiwi/KWFutureObject.h
|
//
// KWFutureObject.h
// iOSFalconCore
//
// Created by Luke Redpath on 13/01/2011.
// Copyright 2011 LJR Software Limited. All rights reserved.
//
#import <Foundation/Foundation.h>
typedef id (^KWFutureObjectBlock)(void);
@interface KWFutureObject : NSObject {
__weak id *objectPointer;
KWFutureObjectBlock block;
}
+ (id)objectWithObjectPointer:(id *)pointer;
+ (id)objectWithReturnValueOfBlock:(KWFutureObjectBlock)block;
- (id)initWithObjectPointer:(id *)pointer;
- (id)initWithBlock:(KWFutureObjectBlock)aBlock;
- (id)object;
@end
|
//
// KWFutureObject.h
// iOSFalconCore
//
// Created by Luke Redpath on 13/01/2011.
// Copyright 2011 LJR Software Limited. All rights reserved.
//
#import <Foundation/Foundation.h>
#ifdef __weak
#undef __weak
#define __weak __unsafe_unretained
#endif
typedef id (^KWFutureObjectBlock)(void);
@interface KWFutureObject : NSObject {
__weak id *objectPointer;
KWFutureObjectBlock block;
}
+ (id)objectWithObjectPointer:(id *)pointer;
+ (id)objectWithReturnValueOfBlock:(KWFutureObjectBlock)block;
- (id)initWithObjectPointer:(id *)pointer;
- (id)initWithBlock:(KWFutureObjectBlock)aBlock;
- (id)object;
@end
|
Work arounf use of weak when deployment target it iOS 4
|
Work arounf use of weak when deployment target it iOS 4
|
C
|
bsd-3-clause
|
carezone/Kiwi,carezone/Kiwi,tcirwin/Kiwi,TaemoonCho/Kiwi,howandhao/Kiwi,tcirwin/Kiwi,unisontech/Kiwi,tangwei6423471/Kiwi,iosRookie/Kiwi,TaemoonCho/Kiwi,ecaselles/Kiwi,indiegogo/Kiwi,ashfurrow/Kiwi,TaemoonCho/Kiwi,unisontech/Kiwi,LiuShulong/Kiwi,weslindsay/Kiwi,ecaselles/Kiwi,depop/Kiwi,JoistApp/Kiwi,indiegogo/Kiwi,iosRookie/Kiwi,ecaselles/Kiwi,alloy/Kiwi,allending/Kiwi,depop/Kiwi,LiuShulong/Kiwi,TaemoonCho/Kiwi,hyperoslo/Tusen,emodeqidao/Kiwi,tcirwin/Kiwi,howandhao/Kiwi,emodeqidao/Kiwi,PaulTaykalo/Kiwi,emodeqidao/Kiwi,tangwei6423471/Kiwi,weslindsay/Kiwi,tangwei6423471/Kiwi,iosRookie/Kiwi,PaulTaykalo/Kiwi,tonyarnold/Kiwi,PaulTaykalo/Kiwi,hyperoslo/Tusen,carezone/Kiwi,JoistApp/Kiwi,samkrishna/Kiwi,cookov/Kiwi,carezone/Kiwi,tonyarnold/Kiwi,PaulTaykalo/Kiwi,alloy/Kiwi,allending/Kiwi,LiuShulong/Kiwi,LiuShulong/Kiwi,cookov/Kiwi,tonyarnold/Kiwi,hyperoslo/Tusen,tonyarnold/Kiwi,samkrishna/Kiwi,tangwei6423471/Kiwi,unisontech/Kiwi,depop/Kiwi,emodeqidao/Kiwi,iosRookie/Kiwi,JoistApp/Kiwi,cookov/Kiwi,samkrishna/Kiwi,alloy/Kiwi,howandhao/Kiwi,ecaselles/Kiwi,hyperoslo/Tusen,unisontech/Kiwi,ashfurrow/Kiwi,ashfurrow/Kiwi,indiegogo/Kiwi,weslindsay/Kiwi,JoistApp/Kiwi,weslindsay/Kiwi,howandhao/Kiwi,indiegogo/Kiwi,allending/Kiwi,cookov/Kiwi,allending/Kiwi,depop/Kiwi,samkrishna/Kiwi,tcirwin/Kiwi
|
9e03ac35be0c5cf0a420b529752bbde619d60bac
|
src/collectionhashing.h
|
src/collectionhashing.h
|
// Copyright (c) 2017-2019 The Swipp developers
// Copyright (c) 2019-2020 The Neutron Developers
//
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING.daemon or http://www.opensource.org/licenses/mit-license.php.
#ifndef NEUTRON_COLLECTIONHASHING_H
#define NEUTRON_COLLECTIONHASHING_H
#include <cstddef>
#include <utility>
#include <tr1/functional>
#include <boost/functional/hash.hpp>
#include "robinhood.h"
#include "uint256.h"
namespace std
{
template<> struct hash<uint256>
{
size_t operator()(const uint256& v) const
{
return robin_hood::hash_bytes(v.begin(), v.size());
}
};
}
#endif
|
// Copyright (c) 2017-2019 The Swipp developers
// Copyright (c) 2019-2020 The Neutron Developers
//
// Distributed under the MIT/X11 software license, see the accompanying
// file COPYING.daemon or http://www.opensource.org/licenses/mit-license.php.
#ifndef NEUTRON_COLLECTIONHASHING_H
#define NEUTRON_COLLECTIONHASHING_H
#include <cstddef>
#include <utility>
#include <functional>
#include <boost/functional/hash.hpp>
#include "robinhood.h"
#include "uint256.h"
namespace std
{
template<> struct hash<uint256>
{
size_t operator()(const uint256& v) const
{
return robin_hood::hash_bytes(v.begin(), v.size());
}
};
}
#endif
|
Use <functional> instead of <tr/functional>
|
Use <functional> instead of <tr/functional>
This is deprecated and adopted by the standard since a long time.
|
C
|
mit
|
neutroncoin/neutron,neutroncoin/neutron,neutroncoin/neutron,neutroncoin/neutron
|
e7144a38b98164e74062c764747ce0ab1cbc514c
|
alura/c/adivinhacao.c
|
alura/c/adivinhacao.c
|
#include <stdio.h>
#define NUMERO_DE_TENTATIVAS 5
int main() {
// imprime o cabecalho do nosso jogo
printf("******************************************\n");
printf("* Bem vindo ao nosso jogo de adivinhação *\n");
printf("******************************************\n");
int numerosecreto = 42;
int chute;
for(int i = 1; i <= NUMERO_DE_TENTATIVAS; i++) {
printf("Tentativa %d de %d\n", i, NUMERO_DE_TENTATIVAS);
printf("Qual é o seu chute? ");
scanf("%d", &chute);
printf("Seu chute foi %d\n", chute);
if(chute < 0) {
printf("Você não pode chutar números negativos!\n");
i--;
continue;
}
int acertou = chute == numerosecreto;
int maior = chute > numerosecreto;
int menor = chute < numerosecreto;
if(acertou) {
printf("Parabéns! Você acertou!\n");
printf("Jogue de novo, você é um bom jogador!\n");
break;
}
else if(maior) {
printf("Seu chute foi maior que o número secreto\n");
}
else {
printf("Seu chute foi menor que o número secreto\n");
}
}
printf("Fim de jogo!\n");
}
|
#include <stdio.h>
int main() {
// imprime o cabecalho do nosso jogo
printf("******************************************\n");
printf("* Bem vindo ao nosso jogo de adivinhação *\n");
printf("******************************************\n");
int numerosecreto = 42;
int chute;
int tentativas = 1;
while(1) {
printf("Tentativa %d\n", tentativas);
printf("Qual é o seu chute? ");
scanf("%d", &chute);
printf("Seu chute foi %d\n", chute);
if(chute < 0) {
printf("Você não pode chutar números negativos!\n");
continue;
}
int acertou = chute == numerosecreto;
int maior = chute > numerosecreto;
if(acertou) {
printf("Parabéns! Você acertou!\n");
printf("Jogue de novo, você é um bom jogador!\n");
break;
}
else if(maior) {
printf("Seu chute foi maior que o número secreto\n");
}
else {
printf("Seu chute foi menor que o número secreto\n");
}
tentativas++;
}
printf("Fim de jogo!\n");
printf("Você acertou em %d tentativas!\n", tentativas);
}
|
Update files, Alura, Introdução a C, Aula 2.10
|
Update files, Alura, Introdução a C, Aula 2.10
|
C
|
mit
|
fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs,fabriciofmsilva/labs
|
0205d0b2e73e5bda5c045ae31edd05d5b9b688ec
|
ossfuzz/matio_wrap.h
|
ossfuzz/matio_wrap.h
|
// Copyright 2019 Google 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.
// Adapter utility from fuzzer input to a temporary file, for fuzzing APIs that
// require a file instead of an input buffer.
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include "matio.h"
int MatioRead(const char* file_name) {
mat_t* matfd = Mat_Open(file_name, MAT_ACC_RDONLY);
if (matfd == nullptr) {
return 0;
}
size_t n = 0;
Mat_GetDir(matfd, &n);
Mat_Rewind(matfd);
matvar_t* matvar = nullptr;
while ((matvar = Mat_VarReadNextInfo(matfd)) != nullptr) {
Mat_VarReadDataAll(matfd, matvar);
Mat_VarGetSize(matvar);
Mat_VarFree(matvar);
}
Mat_Close(matfd);
return 0;
}
|
// Copyright 2019 Google 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.
#ifndef MATIO_WRAP_H_
#define MATIO_WRAP_H_
#include <cstddef>
#include <cstdint>
#include <cstdlib>
#include "matio.h"
int MatioRead(const char* file_name) {
mat_t* matfd = Mat_Open(file_name, MAT_ACC_RDONLY);
if (matfd == nullptr) {
return 0;
}
size_t n = 0;
Mat_GetDir(matfd, &n);
Mat_Rewind(matfd);
matvar_t* matvar = nullptr;
while ((matvar = Mat_VarReadNextInfo(matfd)) != nullptr) {
Mat_VarReadDataAll(matfd, matvar);
Mat_VarGetSize(matvar);
Mat_VarFree(matvar);
}
Mat_Close(matfd);
return 0;
}
#endif
|
Remove comment and add include guard
|
Remove comment and add include guard
|
C
|
bsd-2-clause
|
tbeu/matio,MaartenBent/matio,tbeu/matio,tbeu/matio,MaartenBent/matio,tbeu/matio,MaartenBent/matio,MaartenBent/matio
|
980438ded0a0178799394a732c80c2d66817fe82
|
xchainer/cuda/cuda_runtime.h
|
xchainer/cuda/cuda_runtime.h
|
#pragma once
#include <cuda_runtime.h>
#include "xchainer/error.h"
namespace xchainer {
namespace cuda {
class RuntimeError : public XchainerError {
public:
explicit RuntimeError(cudaError_t error);
cudaError_t error() const noexcept { return error_; }
private:
cudaError_t error_;
};
void CheckError(cudaError_t error);
// Occupancy
#ifdef __CUDACC__
struct GridBlockSize {
int grid_size;
int block_size;
};
template <typename T>
GridBlockSize CudaOccupancyMaxPotentialBlockSize(T&& func, size_t dynamic_smem_size = 0, int block_size_limit = 0) {
GridBlockSize ret;
CheckError(
cudaOccupancyMaxPotentialBlockSize(&ret.grid_size, &ret.block_size, std::forward<T>(func), dynamic_smem_size, block_size_limit));
return ret;
}
#endif // __CUDACC__
} // namespace cuda
} // namespace xchainer
|
#pragma once
#include <cuda_runtime.h>
#include "xchainer/error.h"
namespace xchainer {
namespace cuda {
class RuntimeError : public XchainerError {
public:
explicit RuntimeError(cudaError_t error);
cudaError_t error() const noexcept { return error_; }
private:
cudaError_t error_;
};
void CheckError(cudaError_t error);
// Occupancy
#ifdef __CUDACC__
struct GridBlockSize {
int grid_size;
int block_size;
};
template <typename T>
GridBlockSize CudaOccupancyMaxPotentialBlockSize(const T& func, size_t dynamic_smem_size = 0, int block_size_limit = 0) {
GridBlockSize ret = {};
CheckError(
cudaOccupancyMaxPotentialBlockSize(&ret.grid_size, &ret.block_size, func, dynamic_smem_size, block_size_limit));
return ret;
}
#endif // __CUDACC__
} // namespace cuda
} // namespace xchainer
|
Use const T& instead of T&&
|
Use const T& instead of T&&
|
C
|
mit
|
tkerola/chainer,hvy/chainer,okuta/chainer,pfnet/chainer,ktnyt/chainer,wkentaro/chainer,niboshi/chainer,okuta/chainer,hvy/chainer,hvy/chainer,okuta/chainer,wkentaro/chainer,jnishi/chainer,ktnyt/chainer,hvy/chainer,chainer/chainer,keisuke-umezawa/chainer,wkentaro/chainer,niboshi/chainer,jnishi/chainer,jnishi/chainer,keisuke-umezawa/chainer,chainer/chainer,niboshi/chainer,keisuke-umezawa/chainer,ktnyt/chainer,niboshi/chainer,ktnyt/chainer,keisuke-umezawa/chainer,jnishi/chainer,wkentaro/chainer,chainer/chainer,okuta/chainer,chainer/chainer
|
07d0cafdf2018e8789e4e0671eb0ccc8bbc5c186
|
contrib/sendmail/mail.local/pathnames.h
|
contrib/sendmail/mail.local/pathnames.h
|
/*-
* Copyright (c) 1998 Sendmail, Inc. All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
*
* @(#)pathnames.h 8.5 (Berkeley) 5/19/1998
*/
#include <paths.h>
#define _PATH_LOCTMP "/tmp/local.XXXXXX"
|
/*-
* Copyright (c) 1998 Sendmail, Inc. All rights reserved.
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* By using this file, you agree to the terms and conditions set
* forth in the LICENSE file which can be found at the top level of
* the sendmail distribution.
*
*
* @(#)pathnames.h 8.5 (Berkeley) 5/19/1998
* $FreeBSD$
*/
#include <paths.h>
#define _PATH_LOCTMP "/var/tmp/local.XXXXXX"
|
Change location of temporary file from /tmp to /var/tmp. This is a repeat of an earlier commit which apparently got lost with the last import. It helps solve the frequently reported problem
|
Change location of temporary file from /tmp to /var/tmp. This is a
repeat of an earlier commit which apparently got lost with the last
import. It helps solve the frequently reported problem
pid 4032 (mail.local), uid 0 on /: file system full
(though there appears to be a lot of space) caused by idiots sending
30 MB mail messages.
Most-recently-reported-by: jahanur <jahanur@jjsoft.com>
Add $FreeBSD$ so that I can check the file back in.
Rejected-by: CVS
|
C
|
bsd-3-clause
|
jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase,jrobhoward/SCADAbase
|
83683ddd3d704e2d8c1fe9bef9eabb4639c0846a
|
plat/qemu/common/qemu_stack_protector.c
|
plat/qemu/common/qemu_stack_protector.c
|
/*
* Copyright (c) 2018, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdint.h>
#include <arch_helpers.h>
#include <plat/common/platform.h>
#define RANDOM_CANARY_VALUE ((u_register_t) 3288484550995823360ULL)
u_register_t plat_get_stack_protector_canary(void)
{
/*
* Ideally, a random number should be returned instead of the
* combination of a timer's value and a compile-time constant.
* As the virt platform does not have any random number generator,
* this is better than nothing but not necessarily really secure.
*/
return RANDOM_CANARY_VALUE ^ read_cntpct_el0();
}
|
/*
* Copyright (c) 2021, ARM Limited and Contributors. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#include <stdint.h>
#include <arch_helpers.h>
#include <arch_features.h>
#include <plat/common/platform.h>
#define RANDOM_CANARY_VALUE ((u_register_t) 3288484550995823360ULL)
u_register_t plat_get_stack_protector_canary(void)
{
#if ENABLE_FEAT_RNG
/* Use the RNDR instruction if the CPU supports it */
if (is_armv8_5_rng_present()) {
return read_rndr();
}
#endif
/*
* Ideally, a random number should be returned above. If a random
* number generator is not supported, return instead a
* combination of a timer's value and a compile-time constant.
* This is better than nothing but not necessarily really secure.
*/
return RANDOM_CANARY_VALUE ^ read_cntpct_el0();
}
|
Use RNDR in stack protector
|
plat/qemu: Use RNDR in stack protector
When getting a stack protector canary value, check
if cpu supports FEAT_RNG and use that. Fallback to
old method of using a (hardcoded value ^ timer).
Signed-off-by: Tomas Pilar <2bc6038c3dfca09b2da23c8b6da8ba884dc2dcc2@nuviainc.com>
Change-Id: I8181acf8e31661d4cc82bc3a4078f8751909e725
|
C
|
bsd-3-clause
|
achingupta/arm-trusted-firmware,achingupta/arm-trusted-firmware
|
0ef9cdb035524ebd26d350b364bb4b1520343f97
|
Clue/Classes/Protocols/CLUInteractionObserverDelegate.h
|
Clue/Classes/Protocols/CLUInteractionObserverDelegate.h
|
//
// CLUInteractionObserver.h
// Clue
//
// Created by Ahmed Sulaiman on 6/7/16.
// Copyright © 2016 Ahmed Sulaiman. All rights reserved.
//
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
@protocol CLUInteractionObserverDelegate <NSObject>
@required
- (void)touchesBegan:(NSSet<UITouch *> *)touches;
- (void)touchesMoved:(NSArray<UITouch *> *)touches;
- (void)touchesEnded:(NSSet<UITouch *> *)touches;
@end
|
//
// CLUInteractionObserver.h
// Clue
//
// Created by Ahmed Sulaiman on 6/7/16.
// Copyright © 2016 Ahmed Sulaiman. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "CLUTouch.h"
@protocol CLUInteractionObserverDelegate <NSObject>
@required
- (void)touchesBegan:(NSArray<CLUTouch *> *)touches;
- (void)touchesMoved:(NSArray<CLUTouch *> *)touches;
- (void)touchesEnded:(NSArray<CLUTouch *> *)touches;
@end
|
Change Interaction Observer Delegate to use Clue Touch model and NSArray instead of NSSet
|
Change Interaction Observer Delegate to use Clue Touch model and NSArray instead of NSSet
|
C
|
mit
|
Geek-1001/Clue,Geek-1001/Clue,Geek-1001/Clue,Geek-1001/Clue
|
43795e05bc7b112ba242ec7a9951f30dd4978a9e
|
io/file_descriptor.h
|
io/file_descriptor.h
|
#ifndef FILE_DESCRIPTOR_H
#define FILE_DESCRIPTOR_H
#include <io/channel.h>
class FileDescriptor : public Channel {
LogHandle log_;
protected:
int fd_;
public:
FileDescriptor(int);
~FileDescriptor();
Action *close(EventCallback *);
Action *read(size_t, EventCallback *);
Action *write(Buffer *, EventCallback *);
};
#endif /* !FILE_DESCRIPTOR_H */
|
#ifndef FILE_DESCRIPTOR_H
#define FILE_DESCRIPTOR_H
#include <io/channel.h>
class FileDescriptor : public Channel {
LogHandle log_;
protected:
int fd_;
public:
FileDescriptor(int);
~FileDescriptor();
virtual Action *close(EventCallback *);
virtual Action *read(size_t, EventCallback *);
virtual Action *write(Buffer *, EventCallback *);
};
#endif /* !FILE_DESCRIPTOR_H */
|
Make close, read and write virtual.
|
Make close, read and write virtual.
git-svn-id: 9e2532540f1574e817ce42f20b9d0fb64899e451@192 4068ffdb-0463-0410-8185-8cc71e3bd399
|
C
|
bsd-2-clause
|
diegows/wanproxy,diegows/wanproxy,splbio/wanproxy,splbio/wanproxy,splbio/wanproxy,diegows/wanproxy
|
bd08163aa2c0067a06638dcaefd1cd14461adea5
|
gass/file/source/globus_gass_file.h
|
gass/file/source/globus_gass_file.h
|
/******************************************************************************
globus_gass_file_api.h
Description:
This header contains the GASS File Access API definitions
CVS Information:
$Source$
$Date$
$Revision$
$Author$
******************************************************************************/
#ifndef _GLOBUS_GASS_INCLUDE_GLOBUS_GASS_FILE_API_H
#define _GLOBUS_GASS_INCLUDE_GLOBUS_GASS_FILE_API_H
#ifndef EXTERN_C_BEGIN
#ifdef __cplusplus
#define EXTERN_C_BEGIN extern "C" {
#define EXTERN_C_END }
#else
#define EXTERN_C_BEGIN
#define EXTERN_C_END
#endif
#endif
#include <stdio.h>
EXTERN_C_BEGIN
int globus_gass_open(char *file, int oflags, ...);
FILE *globus_gass_fopen(char *file, char *mode);
int globus_gass_close(int fd);
int globus_gass_fclose(FILE *f);
/******************************************************************************
* Module Definition
*****************************************************************************/
extern globus_module_descriptor_t globus_i_gass_file_module;
#define GLOBUS_GASS_FILE_MODULE (&globus_i_gass_file_module)
EXTERN_C_END
#endif
|
/******************************************************************************
globus_gass_file_api.h
Description:
This header contains the GASS File Access API definitions
CVS Information:
$Source$
$Date$
$Revision$
$Author$
******************************************************************************/
#ifndef _GLOBUS_GASS_INCLUDE_GLOBUS_GASS_FILE_API_H
#define _GLOBUS_GASS_INCLUDE_GLOBUS_GASS_FILE_API_H
#ifndef EXTERN_C_BEGIN
#ifdef __cplusplus
#define EXTERN_C_BEGIN extern "C" {
#define EXTERN_C_END }
#else
#define EXTERN_C_BEGIN
#define EXTERN_C_END
#endif
#endif
#include <stdio.h>
#include "globus_gass_common.h"
EXTERN_C_BEGIN
int globus_gass_open(char *file, int oflags, ...);
FILE *globus_gass_fopen(char *file, char *mode);
int globus_gass_close(int fd);
int globus_gass_fclose(FILE *f);
/******************************************************************************
* Module Definition
*****************************************************************************/
extern globus_module_descriptor_t globus_i_gass_file_module;
#define GLOBUS_GASS_FILE_MODULE (&globus_i_gass_file_module)
EXTERN_C_END
#endif
|
Add inclusion of globus_gass_common.h so end user does not need this inclusion
|
Add inclusion of globus_gass_common.h so end user does not need this inclusion
|
C
|
apache-2.0
|
ellert/globus-toolkit,ellert/globus-toolkit,ellert/globus-toolkit,globus/globus-toolkit,globus/globus-toolkit,ellert/globus-toolkit,gridcf/gct,gridcf/gct,globus/globus-toolkit,globus/globus-toolkit,globus/globus-toolkit,gridcf/gct,gridcf/gct,ellert/globus-toolkit,globus/globus-toolkit,ellert/globus-toolkit,globus/globus-toolkit,gridcf/gct,globus/globus-toolkit,ellert/globus-toolkit,ellert/globus-toolkit,gridcf/gct
|
0a2d85484ad324195537b20c7691a4b49868b76f
|
Sensorama/Sensorama/SRUtils.h
|
Sensorama/Sensorama/SRUtils.h
|
//
// SRUtils.h
// Sensorama
//
// Created by Wojciech Koszek (home) on 3/1/16.
// Copyright © 2016 Wojciech Adam Koszek. All rights reserved.
//
@import Foundation;
@import UIKit;
@interface SRUtils : NSObject
+ (UIColor *)mainColor;
+ (NSDictionary *)deviceInfo;
+ (NSString*)computeSHA256DigestForString:(NSString*)input;
+ (BOOL)isSimulator;
+ (NSString *)activityString:(CMMotionActivity *)activity;
+ (NSInteger)activityInteger:(CMMotionActivity *)activity;
@end
|
//
// SRUtils.h
// Sensorama
//
// Created by Wojciech Koszek (home) on 3/1/16.
// Copyright © 2016 Wojciech Adam Koszek. All rights reserved.
//
@import Foundation;
@import UIKit;
@import CoreMotion;
@interface SRUtils : NSObject
+ (UIColor *)mainColor;
+ (NSDictionary *)deviceInfo;
+ (NSString*)computeSHA256DigestForString:(NSString*)input;
+ (BOOL)isSimulator;
+ (NSString *)activityString:(CMMotionActivity *)activity;
+ (NSInteger)activityInteger:(CMMotionActivity *)activity;
@end
|
Add CoreMotion so that types can be detected
|
Add CoreMotion so that types can be detected
|
C
|
bsd-2-clause
|
wkoszek/sensorama-ios,wkoszek/sensorama-ios,wkoszek/sensorama-ios,wkoszek/sensorama-ios
|
bb45039fab4071893154345415ad961391733c2d
|
include/llvm/Transforms/SampleProfile.h
|
include/llvm/Transforms/SampleProfile.h
|
//===- Transforms/SampleProfile.h - SamplePGO pass--------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
/// \file
/// This file provides the interface for the sampled PGO loader pass.
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_SAMPLEPROFILE_H
#define LLVM_TRANSFORMS_SAMPLEPROFILE_H
#include "llvm/IR/PassManager.h"
namespace llvm {
/// The instrumentation (profile-instr-gen) pass for IR based PGO.
class SampleProfileLoaderPass : public PassInfoMixin<SampleProfileLoaderPass> {
public:
PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
};
} // End llvm namespace
#endif
|
//===- Transforms/SampleProfile.h - SamplePGO pass--------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
/// \file
/// This file provides the interface for the sampled PGO loader pass.
//===----------------------------------------------------------------------===//
#ifndef LLVM_TRANSFORMS_SAMPLEPROFILE_H
#define LLVM_TRANSFORMS_SAMPLEPROFILE_H
#include "llvm/IR/PassManager.h"
namespace llvm {
/// The sample profiler data loader pass.
class SampleProfileLoaderPass : public PassInfoMixin<SampleProfileLoaderPass> {
public:
PreservedAnalyses run(Module &M, AnalysisManager<Module> &AM);
};
} // End llvm namespace
#endif
|
Fix wrong comment in header /NFC
|
Fix wrong comment in header /NFC
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@271825 91177308-0d34-0410-b5e6-96231b3b80d8
|
C
|
apache-2.0
|
GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,llvm-mirror/llvm
|
ff2938e75c27521a0bfd13028ccd045a349f169b
|
gen-system.c
|
gen-system.c
|
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
printf("#include <stdint.h>\n"
"#include \"mako-vm.h\"\n"
"char *argv0;\n"
"int32_t mem[] = {");
while(!feof(stdin)) {
uint8_t buf[4];
int n = fread(buf, sizeof *buf, 4, stdin);
if(ferror(stdin)) goto onerr;
if(n == 0) break;
if(n != 4) {
fprintf(stderr, "%s: The file was invalid.\n", argv[0]);
exit(1);
}
printf("0x%04X,", (int32_t)buf[0] << 24 | (int32_t)buf[1] << 16 | (int32_t)buf[2] << 8 | (int32_t)buf[3]);
}
printf("0};\n"
"int main(int argc, char **argv)\n"
"{\n"
"\targv0 = argv[0];\n"
"\trun_vm(mem);\n"
"}\n");
exit(0);
onerr:
perror(argv[0]);
exit(1);
}
|
#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
int main(int argc, char **argv)
{
printf("#include <stdint.h>\n"
"#include <SDL.h>\n"
"#include \"mako-vm.h\"\n"
"char *argv0;\n"
"int32_t mem[] = {");
while(!feof(stdin)) {
uint8_t buf[4];
int n = fread(buf, sizeof *buf, 4, stdin);
if(ferror(stdin)) goto onerr;
if(n == 0) break;
if(n != 4) {
fprintf(stderr, "%s: The file was invalid.\n", argv[0]);
exit(1);
}
printf("0x%04X,", (int32_t)buf[0] << 24 | (int32_t)buf[1] << 16 | (int32_t)buf[2] << 8 | (int32_t)buf[3]);
}
printf("0};\n"
"int main(int argc, char **argv)\n"
"{\n"
"\targv0 = argv[0];\n"
"\trun_vm(mem);\n"
"}\n");
exit(0);
onerr:
perror(argv[0]);
exit(1);
}
|
Include <SDL.h> in the baked VMs, so Windows works.
|
Include <SDL.h> in the baked VMs, so Windows works.
|
C
|
mit
|
pikhq/cmako,pikhq/cmako
|
8c18fe2562c45180c407872d05857c55c1e5e37b
|
include/asm-arm/mach/map.h
|
include/asm-arm/mach/map.h
|
/*
* linux/include/asm-arm/map.h
*
* Copyright (C) 1999-2000 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.
*
* Page table mapping constructs and function prototypes
*/
struct map_desc {
unsigned long virtual;
unsigned long pfn;
unsigned long length;
unsigned int type;
};
struct meminfo;
#define MT_DEVICE 0
#define MT_CACHECLEAN 1
#define MT_MINICLEAN 2
#define MT_LOW_VECTORS 3
#define MT_HIGH_VECTORS 4
#define MT_MEMORY 5
#define MT_ROM 6
#define MT_IXP2000_DEVICE 7
#define __phys_to_pfn(paddr) (paddr >> PAGE_SHIFT)
#define __pfn_to_phys(pfn) (pfn << PAGE_SHIFT)
extern void create_memmap_holes(struct meminfo *);
extern void memtable_init(struct meminfo *);
extern void iotable_init(struct map_desc *, int);
extern void setup_io_desc(void);
|
/*
* linux/include/asm-arm/map.h
*
* Copyright (C) 1999-2000 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.
*
* Page table mapping constructs and function prototypes
*/
struct map_desc {
unsigned long virtual;
unsigned long pfn;
unsigned long length;
unsigned int type;
};
struct meminfo;
#define MT_DEVICE 0
#define MT_CACHECLEAN 1
#define MT_MINICLEAN 2
#define MT_LOW_VECTORS 3
#define MT_HIGH_VECTORS 4
#define MT_MEMORY 5
#define MT_ROM 6
#define MT_IXP2000_DEVICE 7
#define __phys_to_pfn(paddr) ((paddr) >> PAGE_SHIFT)
#define __pfn_to_phys(pfn) ((pfn) << PAGE_SHIFT)
extern void create_memmap_holes(struct meminfo *);
extern void memtable_init(struct meminfo *);
extern void iotable_init(struct map_desc *, int);
extern void setup_io_desc(void);
|
Fix buggy __phys_to_pfn / __pfn_to_phys
|
[ARM] Fix buggy __phys_to_pfn / __pfn_to_phys
Macro arguments should _always_ be surrounded by parentheses
when used to prevent unexpected problems with operator precedence.
Signed-off-by: Russell King <f6aa0246ff943bfa8602cdf60d40c481b38ed232@arm.linux.org.uk>
|
C
|
apache-2.0
|
TeamVee-Kanas/android_kernel_samsung_kanas,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,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.