commit
stringlengths 40
40
| old_file
stringlengths 4
112
| new_file
stringlengths 4
112
| old_contents
stringlengths 0
2.05k
| new_contents
stringlengths 28
3.9k
| subject
stringlengths 17
736
| message
stringlengths 18
4.78k
| lang
stringclasses 1
value | license
stringclasses 13
values | repos
stringlengths 7
111k
|
---|---|---|---|---|---|---|---|---|---|
610c36d3e6b6f9ef92cd9729f180415a3369ceae | components/clk/src/clk.c | components/clk/src/clk.c | /*
* 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)
*/
#include <stdint.h>
#include <platsupport/clock.h>
#include <clk.h>
clock_sys_t clock_sys;
unsigned int clktree_get_spi1_freq(void){
clk_t* clk;
clk = clk_get_clock(&clock_sys, CLK_SPI1);
return clk_get_freq(clk);
}
unsigned int clktree_set_spi1_freq(unsigned int rate){
clk_t* clk;
clk = clk_get_clock(&clock_sys, CLK_SPI1);
return clk_set_freq(clk, rate);
}
void clktree__init(void){
int err;
err = exynos5_clock_sys_init(cmu_cpu_clk,
cmu_core_clk,
NULL,
NULL,
cmu_top_clk,
NULL,
NULL,
NULL,
NULL,
&clock_sys);
assert(!err);
if(err){
printf("Failed to initialise clock tree\n");
}
}
| /*
* 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)
*/
#include <stdint.h>
#include <platsupport/clock.h>
#include <clk.h>
clock_sys_t clock_sys;
unsigned int clktree_get_spi1_freq(void){
clk_t* clk;
clk = clk_get_clock(&clock_sys, CLK_SPI1);
return clk_get_freq(clk);
}
unsigned int clktree_set_spi1_freq(unsigned int rate){
clk_t* clk;
clk = clk_get_clock(&clock_sys, CLK_SPI1);
return clk_set_freq(clk, rate);
}
void clktree__init(void){
int err;
err = exynos5_clock_sys_init(cmu_cpu_clk,
cmu_core_clk,
NULL,
NULL,
cmu_top_clk,
NULL,
NULL,
NULL,
NULL,
NULL,
&clock_sys);
assert(!err);
if(err){
printf("Failed to initialise clock tree\n");
}
}
| Fix due to the changes in libplatsupport. | Fix due to the changes in libplatsupport.
| C | bsd-2-clause | smaccm/camkes-apps-DARPA--devel |
c4497036cff93da286ae188cfd95aa3f01390c61 | test/CodeGen/bitfield-promote.c | test/CodeGen/bitfield-promote.c | // RUN: %clang -target i686-unknown-unknown -O3 -emit-llvm -S -o - %s | FileCheck %s
long long f0(void) {
struct { unsigned f0 : 32; } x = { 18 };
return (long long) (x.f0 - (int) 22);
}
// CHECK: @f0()
// CHECK: ret i64 4294967292
long long f1(void) {
struct { unsigned f0 : 31; } x = { 18 };
return (long long) (x.f0 - (int) 22);
}
// CHECK: @f1()
// CHECK: ret i64 -4
long long f2(void) {
struct { unsigned f0 ; } x = { 18 };
return (long long) (x.f0 - (int) 22);
}
// CHECK: @f2()
// CHECK: ret i64 4294967292
| // RUN: %clang -O3 -emit-llvm -S -o - %s | FileCheck %s
long long f0(void) {
struct { unsigned f0 : 32; } x = { 18 };
return (long long) (x.f0 - (int) 22);
}
// CHECK: @f0()
// CHECK: ret i64 4294967292
long long f1(void) {
struct { unsigned f0 : 31; } x = { 18 };
return (long long) (x.f0 - (int) 22);
}
// CHECK: @f1()
// CHECK: ret i64 -4
long long f2(void) {
struct { unsigned f0 ; } x = { 18 };
return (long long) (x.f0 - (int) 22);
}
// CHECK: @f2()
// CHECK: ret i64 4294967292
| Make ReadDataFromGlobal() and FoldReinterpretLoadFromConstPtr() Big-endian-aware. | llvm/ConstantFolding.cpp: Make ReadDataFromGlobal() and FoldReinterpretLoadFromConstPtr() Big-endian-aware.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@167595 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/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 |
be7a096ef7a305bed73421473c26313306d192a0 | uefi-sct/SctPkg/UEFI/Protocol/RiscVBoot.h | uefi-sct/SctPkg/UEFI/Protocol/RiscVBoot.h | /** @file
Copyright (c) 2022, Ventana Micro Systems Inc. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
/*++
Module Name:
RiscVBoot.h
Abstract:
This UEFI protocol for RISC-V systems provides early information to the bootloaders or Operating
Systems. Firmwares like EDK2/u-boot need to implement this protocol on RISC-V UEFI systems.
--*/
#ifndef _RISCV_BOOT_H_
#define _RISCV_BOOT_H_
//
// Global ID for the RISC-V Boot Protocol
//
#define RISCV_EFI_BOOT_PROTOCOL_GUID \
{ 0xccd15fec, 0x6f73, 0x4eec, { 0x83, 0x95, 0x3e, 0x69, 0xe4, 0xb9, 0x40, 0xbf } }
typedef struct _RISCV_EFI_BOOT_PROTOCOL RISCV_EFI_BOOT_PROTOCOL;
typedef
EFI_STATUS
(EFIAPI *EFI_GET_BOOT_HARTID) (
IN RISCV_EFI_BOOT_PROTOCOL *This,
OUT UINTN *BootHartId
)
/*++
Routine Description:
This interface provides the hartid of the boot cpu.
Arguments:
This - Protocol instance pointer.
BootHartId - Pointer to the variable receiving the hartid of the boot cpu.
Returns:
EFI_SUCCESS - The boot hart id could be returned.
EFI_INVALID_PARAMETER - This parameter is NULL or does not point to a valid
RISCV_EFI_BOOT_PROTOCOL implementation.
EFI_INVALID_PARAMETER - BootHartId parameter is NULL.
--*/
;
//
// Interface structure for the RISC-V Boot Protocol
//
struct _RISCV_EFI_BOOT_PROTOCOL {
UINTN Revision;
EFI_GET_BOOT_HARTID GetBootHartId;
};
extern EFI_GUID gBlackBoxEfiRiscVBootProtocolGuid;
#endif
| Add header file for RISCV_EFI_BOOT_PROTOCOL | uefi-sct/SctPkg: Add header file for RISCV_EFI_BOOT_PROTOCOL
REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3837
RISC-V platforms need to support new RISCV_EFI_BOOT_PROTOCOL
to communicate the boot hart ID to the operating system. Add
the required header file for this protocol.
The specification of the protocol is maintained at:
https://github.com/riscv-non-isa/riscv-uefi
Cc: G Edhaya Chandran <[email protected]>
Cc: Barton Gao <[email protected]>
Cc: Carolyn Gjertsen <[email protected]>
Cc: Samer El-Haj-Mahmoud <[email protected]>
Cc: Eric Jin <[email protected]>
Cc: Arvin Chen <[email protected]>
Cc: Supreeth Venkatesh <[email protected]>
Cc: Ard Biesheuvel <[email protected]>
Cc: Heinrich Schuchardt <[email protected]>
Cc: Abner Chang <[email protected]>
Signed-off-by: Sunil V L <[email protected]>
Reviewed-by: Heinrich Schuchardt <[email protected]>
Tested-by: Heinrich Schuchardt <[email protected]>
| C | bsd-2-clause | tianocore/edk2-test,tianocore/edk2-test,tianocore/edk2-test |
|
2f6d322b526ced2ffedb55af29179a87fbae4635 | ui/events/ozone/evdev/event_device_util.h | ui/events/ozone/evdev/event_device_util.h | // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_UTIL_H_
#define UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_UTIL_H_
#include <limits.h>
namespace ui {
#define EVDEV_LONG_BITS (CHAR_BIT * sizeof(long))
#define EVDEV_BITS_TO_LONGS(x) (((x) + EVDEV_LONG_BITS - 1) / EVDEV_LONG_BITS)
static inline int EvdevBitIsSet(const unsigned long* data, int bit) {
return data[bit / EVDEV_LONG_BITS] & (1UL << (bit % EVDEV_LONG_BITS));
}
} // namespace ui
#endif // UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_UTIL_H_
| // Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_UTIL_H_
#define UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_UTIL_H_
#include <limits.h>
namespace ui {
#define EVDEV_LONG_BITS (CHAR_BIT * sizeof(long))
#define EVDEV_BITS_TO_LONGS(x) (((x) + EVDEV_LONG_BITS - 1) / EVDEV_LONG_BITS)
static inline bool EvdevBitIsSet(const unsigned long* data, int bit) {
return data[bit / EVDEV_LONG_BITS] & (1UL << (bit % EVDEV_LONG_BITS));
}
} // namespace ui
#endif // UI_EVENTS_OZONE_EVDEV_EVENT_DEVICE_UTIL_H_
| Make EvdevBitIsSet return a bool | Make EvdevBitIsSet return a bool
Can't return an int since the result of the operation is a long, so it
can overflow an int leading to errors. Since all usages of EvdevBitIsSet
are looking for a boolean response change it to bool.
BUG=none
NOTRY=true
Review URL: https://codereview.chromium.org/643663003
Cr-Commit-Position: 972c6d2dc6dd5efdad1377c0d224e03eb8f276f7@{#298887}
| C | bsd-3-clause | dushu1203/chromium.src,Just-D/chromium-1,chuan9/chromium-crosswalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,M4sse/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,dednal/chromium.src,jaruba/chromium.src,Pluto-tv/chromium-crosswalk,dednal/chromium.src,ltilve/chromium,axinging/chromium-crosswalk,Jonekee/chromium.src,dushu1203/chromium.src,dushu1203/chromium.src,ltilve/chromium,PeterWangIntel/chromium-crosswalk,Just-D/chromium-1,M4sse/chromium.src,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,Chilledheart/chromium,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,jaruba/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,Jonekee/chromium.src,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,dednal/chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,fujunwei/chromium-crosswalk,Jonekee/chromium.src,fujunwei/chromium-crosswalk,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,ltilve/chromium,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,krieger-od/nwjs_chromium.src,dednal/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,Just-D/chromium-1,axinging/chromium-crosswalk,markYoungH/chromium.src,Fireblend/chromium-crosswalk,ltilve/chromium,ltilve/chromium,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,M4sse/chromium.src,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,Just-D/chromium-1,hgl888/chromium-crosswalk,ltilve/chromium,dushu1203/chromium.src,Chilledheart/chromium,Jonekee/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,Just-D/chromium-1,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,dushu1203/chromium.src,dednal/chromium.src,chuan9/chromium-crosswalk,Just-D/chromium-1,jaruba/chromium.src,Jonekee/chromium.src,jaruba/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,dushu1203/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,dushu1203/chromium.src,dednal/chromium.src,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,M4sse/chromium.src,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,dednal/chromium.src,dushu1203/chromium.src,chuan9/chromium-crosswalk,krieger-od/nwjs_chromium.src,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,dednal/chromium.src,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,jaruba/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,Chilledheart/chromium,M4sse/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,PeterWangIntel/chromium-crosswalk,chuan9/chromium-crosswalk,M4sse/chromium.src,chuan9/chromium-crosswalk,dednal/chromium.src,Chilledheart/chromium,jaruba/chromium.src,fujunwei/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,mohamed--abdel-maksoud/chromium.src,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,markYoungH/chromium.src,hgl888/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Chilledheart/chromium,Fireblend/chromium-crosswalk,Chilledheart/chromium,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk |
ad8bedc4b56f6376e32938c1cdbf7156817a9d17 | examples/ipv6/slip-radio/slip-radio-cooja.c | examples/ipv6/slip-radio/slip-radio-cooja.c | /*
* Copyright (c) 2011, Swedish Institute of Computer Science
* 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.
* 3. Neither the name of the Institute nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE INSTITUTE 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 INSTITUTE 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.
*
* This file is part of the Contiki operating system.
*
* Sets up some commands for the CC2420 radio chip.
*/
#include "contiki.h"
#include "contiki-net.h"
#include "cooja-radio.h"
#include "cmd.h"
#include <stdio.h>
#include <string.h>
#include "net/mac/frame802154.h"
int
cmd_handler_cooja(const uint8_t *data, int len)
{
if(data[0] == '!') {
if(data[1] == 'C' && len == 3) {
printf("cooja_cmd: setting channel: %d\n", data[2]);
radio_set_channel(data[2]);
return 1;
} else if(data[1] == 'M' && len == 10) {
printf("cooja_cmd: Got MAC\n");
memcpy(uip_lladdr.addr, data+2, sizeof(uip_lladdr.addr));
linkaddr_set_node_addr((linkaddr_t *) uip_lladdr.addr);
return 1;
}
} else if(data[0] == '?') {
if(data[1] == 'C' && len == 2) {
uint8_t buf[4];
printf("cooja_cmd: getting channel: %d\n", data[2]);
buf[0] = '!';
buf[1] = 'C';
buf[2] = 0;
cmd_send(buf, 3);
return 1;
}
}
return 0;
}
| Add slip-radio interface module for cooja-radio | Add slip-radio interface module for cooja-radio
| C | bsd-3-clause | bluerover/6lbr,bluerover/6lbr,bluerover/6lbr,bluerover/6lbr,bluerover/6lbr,bluerover/6lbr,bluerover/6lbr |
|
1398f48d8247d4cc3d11fff787d39e79228e6f04 | ios/template/GMPExample/AppDelegate.h | ios/template/GMPExample/AppDelegate.h | //
// Copyright (c) 2015 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.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (strong, nonatomic) UIWindow *window;
@end
| //
// Copyright (c) 2015 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.
//
#import <UIKit/UIKit.h>
@interface AppDelegate : UIResponder <UIApplicationDelegate>
@property (nonatomic, strong) UIWindow *window;
@end
| Fix order of property attributes | Fix order of property attributes
Change-Id: I7a313d25a6707bada03328b0799300f07a26ba3b
| C | apache-2.0 | ravifullestop/google-services,ardock/google-services,ardock/google-services,mashamaziuk/google-services,rahulbhati/google-services,shinhithi/google-services,dejavu1988/google-services,seecahkhing/google-services,cloudmine/android-gcm-example,wonderL0/second,javijuol/google-services,vinod-jaiswal18/google-services,hay12396/GoogleServices,tiembo/google-services,zubbles/-https-github.com-googlesamples-google-services,wonderL0/second,enba417/google-services,KozakOlegko/google-services,ardock/google-services,zubbles/-https-github.com-googlesamples-google-services,wonderL0/second,CSdummy24/Test,jlvivero/googlestuff,msoftware/google-services,ingdjason/google-services,jsavage/google-services,CloromiroJ/joanma,tranxuanloc/google-services,CloromiroJ/joanma,dejavu1988/google-services,vinod-jaiswal18/google-services,mgupta133/googlemohit,tiembo/google-services,adamhongmy/google-services,VenkataYerneni/Android-Push,CSdummy24/Test,rahulbhati/google-services,rokity/GCM-Sample,rishikksh20/google-services,fhaoquan/google-services,Belthazor2008/google-services,KozakOlegko/google-services,renekaigen/google-services,ton1n8o/GCM_Tutorial,whegreen/google-services,AdamRLukaitis/google-services,dandanthio/google-services,t9nf/google-services,skykelsey/google-services,t9nf/google-services,mucahitsidimi/google-services,tranxuanloc/google-services,LFSDeveloper/google-services,javijuol/google-services,googlesamples/google-services,mgupta133/googlemohit2,shilpasweth/google-services,AdamRLukaitis/google-services,ank5kumar/google-services,ank5kumar/google-services,LFSDeveloper/google-services,shilpasweth/google-services,VenkataYerneni/Android-Push,enba417/google-services,dandanthio/google-services,rokity/GCM-Sample,mucahitsidimi/google-services,Grimmjowjack/google-services,xerex09/google-login,rishikksh20/google-services,ank5kumar/google-services,bgdavidx/google-services,Syncano/google-services-example,lolkabagm/google-services,KozakOlegko/google-services,Belthazor2008/google-services,rishikksh20/google-services,ton1n8o/GCM_Tutorial,renekaigen/google-services,magicgoose/google-services,Jonadg91/google-services,rahulbhati/google-services,rafahells/google-services,Jonadg91/google-services,SunghanKim/google-services,fhaoquan/google-services,LFSDeveloper/google-services,suclike/google-services,CSdummy24/Test,msoftware/google-services,googlesamples/google-services,HaiLe/google-services,samtstern/google-services,skykelsey/google-services,kuassivi/google-services,t9nf/google-services,kuassivi/google-services,t9nf/google-services,renekaigen/google-services,renekaigen/google-services,vertxx/google-services,skykelsey/google-services,jsavage/google-services,seecahkhing/google-services,samtstern/google-services,mgupta133/googlemohit,hongnguyenpro/google-services,ingdjason/google-services,msoftware/google-services,ingdjason/google-services,fhaoquan/google-services,whegreen/google-services,xerex09/google-login,ton1n8o/GCM_Tutorial,shinhithi/google-services,yuvraaz/android-push-notification,dandanthio/google-services,adamhongmy/google-services,rokity/GCM-Sample,ardock/google-services,PenguinSusan/google-services,rokity/GCM-Sample,enba417/google-services,YaliWang0523/google-services,seecahkhing/google-services,Shinruw/GA,YaliWang0523/google-services,sangupandi/google-services,sangupandi/google-services,googlesamples/google-services,ravifullestop/google-services,mgupta133/googlemohit,tranxuanloc/google-services,rockgtzexe/try,Syncano/google-services-example,rafahells/google-services,cloudmine/android-gcm-example,vertxx/google-services,VenkataYerneni/Android-Push,whegreen/google-services,suclike/google-services,rahulbhati/google-services,hongnguyenpro/google-services,mucahitsidimi/google-services,adamhongmy/google-services,sangupandi/google-services,lolkabagm/google-services,magicgoose/google-services,Shekharrajak/google-services,SunghanKim/google-services,ton1n8o/GCM_Tutorial,hongnguyenpro/google-services,Grimmjowjack/google-services,CloromiroJ/joanma,Belthazor2008/google-services,ravifullestop/google-services,yuvraaz/android-push-notification,magicgoose/google-services,javijuol/google-services,xerex09/google-login,samtstern/google-services,hay12396/GoogleServices,hay12396/GoogleServices,sangupandi/google-services,cloudmine/android-gcm-example,ya7lelkom/google-services-play,Shekharrajak/google-services,lolkabagm/google-services,jsavage/google-services,suclike/google-services,ank5kumar/google-services,Aditya8795/GCM-demo,googlesamples/google-services,kuassivi/google-services,seecahkhing/google-services,adamhongmy/google-services,samtstern/google-services,tranxuanloc/google-services,ya7lelkom/google-services-play,vertxx/google-services,mgupta133/googlemohit,shilpasweth/google-services,zubbles/-https-github.com-googlesamples-google-services,Shinruw/GA,shilpasweth/google-services,mashamaziuk/google-services,Jonadg91/google-services,jlvivero/googlestuff,Syncano/google-services-example,AdamRLukaitis/google-services,HaiLe/google-services,SunghanKim/google-services,Syncano/google-services-example,rockgtzexe/try,Prof-Greipl/google-services,magicgoose/google-services,mashamaziuk/google-services,dejavu1988/google-services,tiembo/google-services,PenguinSusan/google-services,Grimmjowjack/google-services,jsavage/google-services,Belthazor2008/google-services,PenguinSusan/google-services,mucahitsidimi/google-services,whegreen/google-services,Shinruw/GA,CloromiroJ/joanma,CSdummy24/Test,ya7lelkom/google-services-play,SunghanKim/google-services,shinhithi/google-services,LFSDeveloper/google-services,Shekharrajak/google-services,Prof-Greipl/google-services,msoftware/google-services,rishikksh20/google-services,ravifullestop/google-services,mgupta133/googlemohit2,jlvivero/googlestuff,Shinruw/GA,yuvraaz/android-push-notification,hay12396/GoogleServices,vinod-jaiswal18/google-services,Prof-Greipl/google-services,zubbles/-https-github.com-googlesamples-google-services,KozakOlegko/google-services,enba417/google-services,vertxx/google-services,lolkabagm/google-services,fhaoquan/google-services,yuvraaz/android-push-notification,jlvivero/googlestuff,rockgtzexe/try,Aditya8795/GCM-demo,Aditya8795/GCM-demo,Shekharrajak/google-services,ingdjason/google-services,javijuol/google-services,HaiLe/google-services,Aditya8795/GCM-demo,vinod-jaiswal18/google-services,HaiLe/google-services,skykelsey/google-services,bgdavidx/google-services,rafahells/google-services,mgupta133/googlemohit2,wonderL0/second,YaliWang0523/google-services,tiembo/google-services,Jonadg91/google-services,VenkataYerneni/Android-Push,cloudmine/android-gcm-example,bgdavidx/google-services,rockgtzexe/try,kuassivi/google-services,ya7lelkom/google-services-play,hongnguyenpro/google-services,dejavu1988/google-services,mashamaziuk/google-services,xerex09/google-login,YaliWang0523/google-services,shinhithi/google-services,PenguinSusan/google-services,rafahells/google-services,dandanthio/google-services,bgdavidx/google-services,Prof-Greipl/google-services,AdamRLukaitis/google-services,Grimmjowjack/google-services,suclike/google-services,mgupta133/googlemohit2 |
aca553955645429e0d8fc7cdfcf9dab1f541c0f8 | src/libcol/util/logger.c | src/libcol/util/logger.c | #include <stdarg.h>
#include "col-internal.h"
struct ColLogger
{
ColInstance *col;
/* This is reset on each call to col_log() */
apr_pool_t *tmp_pool;
};
ColLogger *
logger_make(ColInstance *col)
{
ColLogger *logger;
logger = apr_pcalloc(col->pool, sizeof(*logger));
logger->tmp_pool = make_subpool(col->pool);
return logger;
}
void
col_log(ColInstance *col, const char *fmt, ...)
{
va_list args;
char *str;
va_start(args, fmt);
str = apr_pvsprintf(col->log->tmp_pool, fmt, args);
va_end(args);
fprintf(stdout, "LOG: %s\n", str);
apr_pool_clear(col->log->tmp_pool);
}
char *
log_tuple(ColInstance *col, Tuple *tuple)
{
char *tuple_str = tuple_to_str(tuple, col->log->tmp_pool);
return apr_pstrcat(col->log->tmp_pool, "{", tuple_str, "}", NULL);
}
char *
log_datum(ColInstance *col, Datum datum, DataType type)
{
StrBuf *sbuf;
sbuf = sbuf_make(col->log->tmp_pool);
datum_to_str(datum, type, sbuf);
sbuf_append_char(sbuf, '\0');
return sbuf->data;
}
| #include <stdarg.h>
#include "col-internal.h"
struct ColLogger
{
ColInstance *col;
/* This is reset on each call to col_log() */
apr_pool_t *tmp_pool;
};
ColLogger *
logger_make(ColInstance *col)
{
ColLogger *logger;
logger = apr_pcalloc(col->pool, sizeof(*logger));
logger->tmp_pool = make_subpool(col->pool);
return logger;
}
void
col_log(ColInstance *col, const char *fmt, ...)
{
va_list args;
char *str;
va_start(args, fmt);
str = apr_pvsprintf(col->log->tmp_pool, fmt, args);
va_end(args);
fprintf(stdout, "LOG (%d): %s\n", col->port, str);
apr_pool_clear(col->log->tmp_pool);
}
char *
log_tuple(ColInstance *col, Tuple *tuple)
{
char *tuple_str = tuple_to_str(tuple, col->log->tmp_pool);
return apr_pstrcat(col->log->tmp_pool, "{", tuple_str, "}", NULL);
}
char *
log_datum(ColInstance *col, Datum datum, DataType type)
{
StrBuf *sbuf;
sbuf = sbuf_make(col->log->tmp_pool);
datum_to_str(datum, type, sbuf);
sbuf_append_char(sbuf, '\0');
return sbuf->data;
}
| Include port number in col_log() output. | Include port number in col_log() output.
| C | mit | bloom-lang/c4,bloom-lang/c4,bloom-lang/c4 |
3a17534c8858f0a95f6347f96aff11948f4267b8 | eg/inc/LinkDef.h | eg/inc/LinkDef.h | /* @(#)root/eg:$Name: $:$Id: LinkDef.h,v 1.2 2000/09/06 15:15:18 brun Exp $ */
/*************************************************************************
* 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 __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class TParticle-;
#pragma link C++ class TAttParticle;
#pragma link C++ class TPrimary;
#pragma link C++ class TGenerator-;
#pragma link C++ class TDatabasePDG+;
#pragma link C++ class TParticlePDG+;
#endif
| /* @(#)root/eg:$Name: $:$Id: LinkDef.h,v 1.3 2000/09/08 16:42:12 brun Exp $ */
/*************************************************************************
* 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 __CINT__
#pragma link off all globals;
#pragma link off all classes;
#pragma link off all functions;
#pragma link C++ class TParticle-;
#pragma link C++ class TAttParticle+;
#pragma link C++ class TPrimary+;
#pragma link C++ class TGenerator+;
#pragma link C++ class TDatabasePDG+;
#pragma link C++ class TParticlePDG+;
#endif
| Use option + for TAttParticle and TPrimary | Use option + for TAttParticle and TPrimary
git-svn-id: ecbadac9c76e8cf640a0bca86f6bd796c98521e3@932 27541ba8-7e3a-0410-8455-c3a389f83636
| C | lgpl-2.1 | bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,dawehner/root,dawehner/root,dawehner/root,bbannier/ROOT,bbannier/ROOT,bbannier/ROOT,dawehner/root,dawehner/root,dawehner/root,bbannier/ROOT,dawehner/root,dawehner/root |
175cd65e582181d18041f604ffd06730f1109e86 | SQLPackRatJSON/SQLPackRatJSON-Bridging-Header.h | SQLPackRatJSON/SQLPackRatJSON-Bridging-Header.h | //
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "SQLPackRat.h"
| //
// Use this file to import your target's public headers that you would like to expose to Swift.
//
#import "SQLPackRat.h"
#import <sqlite3.h>
| Include sqlite3 in bridging header. | Include sqlite3 in bridging header.
| C | mit | tewha/SQLPackRat,tewha/SQLPackRat |
518d3b528894007e746413079241cfba4ae5c07a | clangd/index/SymbolCollector.h | clangd/index/SymbolCollector.h | //===--- SymbolCollector.h ---------------------------------------*- C++-*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "Index.h"
#include "clang/Index/IndexDataConsumer.h"
#include "clang/Index/IndexSymbol.h"
namespace clang {
namespace clangd {
// Collect all symbols from an AST.
//
// Clients (e.g. clangd) can use SymbolCollector together with
// index::indexTopLevelDecls to retrieve all symbols when the source file is
// changed.
class SymbolCollector : public index::IndexDataConsumer {
public:
SymbolCollector() = default;
bool
handleDeclOccurence(const Decl *D, index::SymbolRoleSet Roles,
ArrayRef<index::SymbolRelation> Relations, FileID FID,
unsigned Offset,
index::IndexDataConsumer::ASTNodeInfo ASTNode) override;
void finish() override;
SymbolSlab takeSymbols() const { return std::move(Symbols); }
private:
// All Symbols collected from the AST.
SymbolSlab Symbols;
};
} // namespace clangd
} // namespace clang
| //===--- SymbolCollector.h ---------------------------------------*- C++-*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#include "Index.h"
#include "clang/Index/IndexDataConsumer.h"
#include "clang/Index/IndexSymbol.h"
namespace clang {
namespace clangd {
// Collect all symbols from an AST.
//
// Clients (e.g. clangd) can use SymbolCollector together with
// index::indexTopLevelDecls to retrieve all symbols when the source file is
// changed.
class SymbolCollector : public index::IndexDataConsumer {
public:
SymbolCollector() = default;
bool
handleDeclOccurence(const Decl *D, index::SymbolRoleSet Roles,
ArrayRef<index::SymbolRelation> Relations, FileID FID,
unsigned Offset,
index::IndexDataConsumer::ASTNodeInfo ASTNode) override;
void finish() override;
SymbolSlab takeSymbols() { return std::move(Symbols); }
private:
// All Symbols collected from the AST.
SymbolSlab Symbols;
};
} // namespace clangd
} // namespace clang
| Remove the const specifier of the takeSymbol method | [clangd] Remove the const specifier of the takeSymbol method
otherwise we will copy an object.
git-svn-id: a34e9779ed74578ad5922b3306b3d80a0c825546@320574 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra,llvm-mirror/clang-tools-extra |
c21f7a527f7757a0e246cea521a5dd3b8e1224d5 | drivers/char/hvc_irq.c | drivers/char/hvc_irq.c | /*
* Copyright IBM Corp. 2001,2008
*
* This file contains the IRQ specific code for hvc_console
*
*/
#include <linux/interrupt.h>
#include "hvc_console.h"
static irqreturn_t hvc_handle_interrupt(int irq, void *dev_instance)
{
/* if hvc_poll request a repoll, then kick the hvcd thread */
if (hvc_poll(dev_instance))
hvc_kick();
return IRQ_HANDLED;
}
/*
* For IRQ based systems these callbacks can be used
*/
int notifier_add_irq(struct hvc_struct *hp, int irq)
{
int rc;
if (!irq) {
hp->irq_requested = 0;
return 0;
}
rc = request_irq(irq, hvc_handle_interrupt, IRQF_DISABLED,
"hvc_console", hp);
if (!rc)
hp->irq_requested = 1;
return rc;
}
void notifier_del_irq(struct hvc_struct *hp, int irq)
{
if (!irq)
return;
free_irq(irq, hp);
hp->irq_requested = 0;
}
void notifier_hangup_irq(struct hvc_struct *hp, int irq)
{
notifier_del_irq(hp, irq);
}
| /*
* Copyright IBM Corp. 2001,2008
*
* This file contains the IRQ specific code for hvc_console
*
*/
#include <linux/interrupt.h>
#include "hvc_console.h"
static irqreturn_t hvc_handle_interrupt(int irq, void *dev_instance)
{
/* if hvc_poll request a repoll, then kick the hvcd thread */
if (hvc_poll(dev_instance))
hvc_kick();
return IRQ_HANDLED;
}
/*
* For IRQ based systems these callbacks can be used
*/
int notifier_add_irq(struct hvc_struct *hp, int irq)
{
int rc;
if (!irq) {
hp->irq_requested = 0;
return 0;
}
rc = request_irq(irq, hvc_handle_interrupt, IRQF_DISABLED,
"hvc_console", hp);
if (!rc)
hp->irq_requested = 1;
return rc;
}
void notifier_del_irq(struct hvc_struct *hp, int irq)
{
if (!hp->irq_requested)
return;
free_irq(irq, hp);
hp->irq_requested = 0;
}
void notifier_hangup_irq(struct hvc_struct *hp, int irq)
{
notifier_del_irq(hp, irq);
}
| Call free_irq() only if request_irq() was successful | hvc_console: Call free_irq() only if request_irq() was successful
Only call free_irq if we marked the request_irq has having succeeded
instead of whenever the the sub-driver identified the interrupt to use.
Signed-off-by: Milton Miller <[email protected]>
Signed-off-by: Benjamin Herrenschmidt <[email protected]>
| C | mit | 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,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs |
c8d56e1370657b609066f18fddac2b3005cfe3e0 | ext/cuuid/cuuid.c | ext/cuuid/cuuid.c | #include <ruby.h>
#include <uuid/uuid.h>
// Define our module constant
VALUE CUUID = Qnil;
// Prototype this
void Init_cuuid();
// Prototype CUUID.generate
VALUE method_generate();
// Define CUUID and the fact it has a class method called generate
void Init_cuuid() {
int arg_count = 0;
CUUID = rb_define_module("CUUID");
rb_define_module_function(CUUID, "generate", method_generate, arg_count);
}
// Implement CUUID.generate
VALUE method_generate(VALUE self) {
uuid_t uuid_id;
char uuid_str[128];
// Generate UUID and grab string version of it
uuid_generate(uuid_id);
uuid_unparse(uuid_id, uuid_str);
// Cast it into a ruby string and return it
return rb_str_new2(uuid_str);
}
| #include <ruby.h>
#include <uuid/uuid.h>
// Define our module constant
VALUE CUUID = Qnil;
// Prototype this
void Init_cuuid();
// Prototype CUUID.generate
VALUE method_generate();
// Define CUUID and the fact it has a class method called generate
void Init_cuuid() {
int arg_count = 0;
CUUID = rb_define_module("CUUID");
rb_define_module_function(CUUID, "generate", method_generate, arg_count);
}
// Implement CUUID.generate
static VALUE method_generate(VALUE self) {
uuid_t uuid_id;
char uuid_str[128];
// Generate UUID and grab string version of it
uuid_generate(uuid_id);
uuid_unparse(uuid_id, uuid_str);
// Cast it into a ruby string and return it
return rb_str_new2(uuid_str);
}
| Make method_generate a static method | Make method_generate a static method
Thanks to @gnufied for the advice!
| C | mit | EmberAds/cuuid,EmberAds/cuuid,EmberAds/cuuid |
bafe68034e3ef5e9f512bd0468001caf34981c41 | include/asm-avr32/byteorder.h | include/asm-avr32/byteorder.h | /*
* AVR32 endian-conversion functions.
*/
#ifndef __ASM_AVR32_BYTEORDER_H
#define __ASM_AVR32_BYTEORDER_H
#include <asm/types.h>
#include <linux/compiler.h>
#ifdef __CHECKER__
extern unsigned long __builtin_bswap_32(unsigned long x);
extern unsigned short __builtin_bswap_16(unsigned short x);
#endif
#define __arch__swab32(x) __builtin_bswap_32(x)
#define __arch__swab16(x) __builtin_bswap_16(x)
#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
# define __BYTEORDER_HAS_U64__
# define __SWAB_64_THRU_32__
#endif
#include <linux/byteorder/big_endian.h>
#endif /* __ASM_AVR32_BYTEORDER_H */
| /*
* AVR32 endian-conversion functions.
*/
#ifndef __ASM_AVR32_BYTEORDER_H
#define __ASM_AVR32_BYTEORDER_H
#include <asm/types.h>
#include <linux/compiler.h>
#ifdef __CHECKER__
extern unsigned long __builtin_bswap_32(unsigned long x);
extern unsigned short __builtin_bswap_16(unsigned short x);
#endif
/*
* avr32-linux-gcc versions earlier than 4.2 improperly sign-extends
* the result.
*/
#if !(__GNUC__ == 4 && __GNUC_MINOR__ < 2)
#define __arch__swab32(x) __builtin_bswap_32(x)
#define __arch__swab16(x) __builtin_bswap_16(x)
#endif
#if !defined(__STRICT_ANSI__) || defined(__KERNEL__)
# define __BYTEORDER_HAS_U64__
# define __SWAB_64_THRU_32__
#endif
#include <linux/byteorder/big_endian.h>
#endif /* __ASM_AVR32_BYTEORDER_H */
| Work around byteswap bug in gcc < 4.2 | avr32: Work around byteswap bug in gcc < 4.2
gcc versions earlier than 4.2 sign-extends the result of le16_to_cpu()
and friends when we implement __arch__swabX() using
__builtin_bswap_X(). Disable our arch-specific optimizations when those
gcc versions are being used.
Signed-off-by: Haavard Skinnemoen <[email protected]>
| C | apache-2.0 | TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs |
5488c753530b7b08437df6115a2c2c6156c2f0f6 | include/linux/sunserialcore.h | include/linux/sunserialcore.h | /* sunserialcore.h
*
* Generic SUN serial/kbd/ms layer. Based entirely
* upon drivers/sbus/char/sunserial.h which is:
*
* Copyright (C) 1997 Eddie C. Dost ([email protected])
*
* Port to new UART layer is:
*
* Copyright (C) 2002 David S. Miller ([email protected])
*/
#ifndef _SERIAL_SUN_H
#define _SERIAL_SUN_H
/* Serial keyboard defines for L1-A processing... */
#define SUNKBD_RESET 0xff
#define SUNKBD_L1 0x01
#define SUNKBD_UP 0x80
#define SUNKBD_A 0x4d
extern unsigned int suncore_mouse_baud_cflag_next(unsigned int, int *);
extern int suncore_mouse_baud_detection(unsigned char, int);
extern int sunserial_register_minors(struct uart_driver *, int);
extern void sunserial_unregister_minors(struct uart_driver *, int);
extern int sunserial_console_match(struct console *, struct device_node *,
struct uart_driver *, int, bool);
extern void sunserial_console_termios(struct console *,
struct device_node *);
#endif /* !(_SERIAL_SUN_H) */
| /* sunserialcore.h
*
* Generic SUN serial/kbd/ms layer. Based entirely
* upon drivers/sbus/char/sunserial.h which is:
*
* Copyright (C) 1997 Eddie C. Dost ([email protected])
*
* Port to new UART layer is:
*
* Copyright (C) 2002 David S. Miller ([email protected])
*/
#ifndef _SERIAL_SUN_H
#define _SERIAL_SUN_H
#include <linux/device.h>
#include <linux/serial_core.h>
#include <linux/console.h>
/* Serial keyboard defines for L1-A processing... */
#define SUNKBD_RESET 0xff
#define SUNKBD_L1 0x01
#define SUNKBD_UP 0x80
#define SUNKBD_A 0x4d
extern unsigned int suncore_mouse_baud_cflag_next(unsigned int, int *);
extern int suncore_mouse_baud_detection(unsigned char, int);
extern int sunserial_register_minors(struct uart_driver *, int);
extern void sunserial_unregister_minors(struct uart_driver *, int);
extern int sunserial_console_match(struct console *, struct device_node *,
struct uart_driver *, int, bool);
extern void sunserial_console_termios(struct console *,
struct device_node *);
#endif /* !(_SERIAL_SUN_H) */
| Fix build breakage from decoupling pps from tty | pps: Fix build breakage from decoupling pps from tty
Fixes:
tree: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty.git tty-next
head: bc80fbe46be7430487a45ad92841932bb2eaa3e6
commit: 593fb1ae457aab28b392ac114f6e3358788da985 pps: Move timestamp read into PPS code proper
date: 78 minutes ago
config: make ARCH=sparc defconfig
All error/warnings:
In file included from drivers/tty/serial/suncore.c:20:0:
>> include/linux/sunserialcore.h:29:15: warning: 'struct device_node' declared inside parameter list [enabled by default]
>> include/linux/sunserialcore.h:29:15: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default]
>> include/linux/sunserialcore.h:31:18: warning: 'struct device_node' declared inside parameter list [enabled by default]
>> drivers/tty/serial/suncore.c:55:5: error: conflicting types for 'sunserial_console_match'
include/linux/sunserialcore.h:28:12: note: previous declaration of 'sunserial_console_match' was here
>> drivers/tty/serial/suncore.c:83:1: error: conflicting types for 'sunserial_console_match'
include/linux/sunserialcore.h:28:12: note: previous declaration of 'sunserial_console_match' was here
>> drivers/tty/serial/suncore.c:85:6: error: conflicting types for 'sunserial_console_termios'
include/linux/sunserialcore.h:30:13: note: previous declaration of 'sunserial_console_termios' was here
Reported-by: kbuild test robot <[email protected]>
Cc: George Spelvin <[email protected]>
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
| C | apache-2.0 | TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas |
f768655c72cb93e263763f23b3238acd04ac2a19 | chrome/renderer/webview_color_overlay.h | chrome/renderer/webview_color_overlay.h | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_
#define CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_
#pragma once
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPageOverlay.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
namespace content {
class RenderView;
}
// This class draws the given color on a PageOverlay of a WebView.
class WebViewColorOverlay : public WebKit::WebPageOverlay {
public:
WebViewColorOverlay(content::RenderView* render_view, SkColor color);
virtual ~WebViewColorOverlay();
private:
// WebKit::WebPageOverlay implementation:
virtual void paintPageOverlay(WebKit::WebCanvas* canvas);
content::RenderView* render_view_;
SkColor color_;
DISALLOW_COPY_AND_ASSIGN(WebViewColorOverlay);
};
#endif // CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_
| // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_
#define CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_
#pragma once
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "third_party/skia/include/core/SkColor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPageOverlay.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/platform/WebRect.h"
namespace content {
class RenderView;
}
// This class draws the given color on a PageOverlay of a WebView.
class WebViewColorOverlay : public WebKit::WebPageOverlay {
public:
WebViewColorOverlay(content::RenderView* render_view, SkColor color);
virtual ~WebViewColorOverlay();
private:
// WebKit::WebPageOverlay implementation:
virtual void paintPageOverlay(WebKit::WebCanvas* canvas);
content::RenderView* render_view_;
SkColor color_;
DISALLOW_COPY_AND_ASSIGN(WebViewColorOverlay);
};
#endif // CHROME_RENDERER_WEBVIEW_COLOR_OVERLAY_H_
| Fix build break from the future. | Fix build break from the future.
TBR=pfeldman
Review URL: http://codereview.chromium.org/8801036
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@113098 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | Fireblend/chromium-crosswalk,hujiajie/pa-chromium,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,nacl-webkit/chrome_deps,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,rogerwang/chromium,keishi/chromium,pozdnyakov/chromium-crosswalk,fujunwei/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,timopulkkinen/BubbleFish,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,dednal/chromium.src,Chilledheart/chromium,jaruba/chromium.src,hgl888/chromium-crosswalk-efl,ondra-novak/chromium.src,junmin-zhu/chromium-rivertrail,zcbenz/cefode-chromium,junmin-zhu/chromium-rivertrail,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,Jonekee/chromium.src,Just-D/chromium-1,Chilledheart/chromium,robclark/chromium,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,hgl888/chromium-crosswalk,keishi/chromium,jaruba/chromium.src,M4sse/chromium.src,ChromiumWebApps/chromium,fujunwei/chromium-crosswalk,zcbenz/cefode-chromium,ltilve/chromium,krieger-od/nwjs_chromium.src,Just-D/chromium-1,dednal/chromium.src,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Fireblend/chromium-crosswalk,Just-D/chromium-1,littlstar/chromium.src,Chilledheart/chromium,mogoweb/chromium-crosswalk,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,rogerwang/chromium,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,dednal/chromium.src,patrickm/chromium.src,dushu1203/chromium.src,jaruba/chromium.src,anirudhSK/chromium,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hujiajie/pa-chromium,markYoungH/chromium.src,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,Just-D/chromium-1,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,mogoweb/chromium-crosswalk,jaruba/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,Just-D/chromium-1,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,ChromiumWebApps/chromium,jaruba/chromium.src,robclark/chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk,dednal/chromium.src,ChromiumWebApps/chromium,littlstar/chromium.src,Chilledheart/chromium,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,patrickm/chromium.src,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,markYoungH/chromium.src,patrickm/chromium.src,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,ltilve/chromium,rogerwang/chromium,dednal/chromium.src,mogoweb/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,ltilve/chromium,dushu1203/chromium.src,robclark/chromium,axinging/chromium-crosswalk,ondra-novak/chromium.src,rogerwang/chromium,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,jaruba/chromium.src,zcbenz/cefode-chromium,chuan9/chromium-crosswalk,M4sse/chromium.src,Chilledheart/chromium,krieger-od/nwjs_chromium.src,rogerwang/chromium,robclark/chromium,dednal/chromium.src,hujiajie/pa-chromium,jaruba/chromium.src,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,bright-sparks/chromium-spacewalk,keishi/chromium,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,littlstar/chromium.src,nacl-webkit/chrome_deps,rogerwang/chromium,hgl888/chromium-crosswalk-efl,anirudhSK/chromium,ChromiumWebApps/chromium,krieger-od/nwjs_chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,hujiajie/pa-chromium,chuan9/chromium-crosswalk,robclark/chromium,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,ondra-novak/chromium.src,ondra-novak/chromium.src,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,dednal/chromium.src,markYoungH/chromium.src,timopulkkinen/BubbleFish,littlstar/chromium.src,Pluto-tv/chromium-crosswalk,markYoungH/chromium.src,timopulkkinen/BubbleFish,anirudhSK/chromium,axinging/chromium-crosswalk,ondra-novak/chromium.src,chuan9/chromium-crosswalk,markYoungH/chromium.src,Pluto-tv/chromium-crosswalk,dednal/chromium.src,timopulkkinen/BubbleFish,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,krieger-od/nwjs_chromium.src,keishi/chromium,bright-sparks/chromium-spacewalk,anirudhSK/chromium,mogoweb/chromium-crosswalk,keishi/chromium,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,ChromiumWebApps/chromium,M4sse/chromium.src,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,robclark/chromium,robclark/chromium,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,Jonekee/chromium.src,dednal/chromium.src,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,M4sse/chromium.src,ltilve/chromium,M4sse/chromium.src,patrickm/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,ChromiumWebApps/chromium,timopulkkinen/BubbleFish,M4sse/chromium.src,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,dushu1203/chromium.src,bright-sparks/chromium-spacewalk,patrickm/chromium.src,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,hgl888/chromium-crosswalk,krieger-od/nwjs_chromium.src,markYoungH/chromium.src,hujiajie/pa-chromium,keishi/chromium,mohamed--abdel-maksoud/chromium.src,rogerwang/chromium,PeterWangIntel/chromium-crosswalk,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,Just-D/chromium-1,dushu1203/chromium.src,anirudhSK/chromium,junmin-zhu/chromium-rivertrail,dushu1203/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,hgl888/chromium-crosswalk,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,hujiajie/pa-chromium,keishi/chromium,ChromiumWebApps/chromium,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,Jonekee/chromium.src,keishi/chromium,markYoungH/chromium.src,Chilledheart/chromium,dednal/chromium.src,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,rogerwang/chromium,ltilve/chromium,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,jaruba/chromium.src,zcbenz/cefode-chromium,Jonekee/chromium.src,anirudhSK/chromium,hgl888/chromium-crosswalk-efl,fujunwei/chromium-crosswalk,M4sse/chromium.src,nacl-webkit/chrome_deps,jaruba/chromium.src,jaruba/chromium.src,zcbenz/cefode-chromium,Jonekee/chromium.src,ltilve/chromium,krieger-od/nwjs_chromium.src,axinging/chromium-crosswalk,keishi/chromium,Jonekee/chromium.src,Just-D/chromium-1,robclark/chromium,jaruba/chromium.src,patrickm/chromium.src,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,ChromiumWebApps/chromium,ltilve/chromium,junmin-zhu/chromium-rivertrail,robclark/chromium,zcbenz/cefode-chromium,dushu1203/chromium.src,keishi/chromium,ltilve/chromium,chuan9/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,ChromiumWebApps/chromium,hujiajie/pa-chromium,rogerwang/chromium,robclark/chromium,Fireblend/chromium-crosswalk,keishi/chromium,markYoungH/chromium.src,timopulkkinen/BubbleFish,timopulkkinen/BubbleFish,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,Jonekee/chromium.src,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk-efl,nacl-webkit/chrome_deps,crosswalk-project/chromium-crosswalk-efl,ltilve/chromium,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,patrickm/chromium.src,Jonekee/chromium.src,littlstar/chromium.src,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,ondra-novak/chromium.src,ChromiumWebApps/chromium,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dushu1203/chromium.src,junmin-zhu/chromium-rivertrail,patrickm/chromium.src |
0709d82d1ad90a0882e22fd93e3cee8756061248 | tests/regression/06-symbeq/37-funloop_index.c | tests/regression/06-symbeq/37-funloop_index.c | // PARAM: --disable ana.mutex.disjoint_types --set ana.activated[+] "'var_eq'" --set ana.activated[+] "'symb_locks'"
// copy of 06/02 with additional index accesses
#include<pthread.h>
#include<stdio.h>
struct cache_entry {
int refs;
pthread_mutex_t refs_mutex;
} cache[10];
void cache_entry_addref(struct cache_entry *entry) {
pthread_mutex_lock(&entry->refs_mutex);
entry->refs++; // NORACE
(*entry).refs++; // NORACE
entry[0].refs++; // NORACE
pthread_mutex_unlock(&entry->refs_mutex);
}
void *t_fun(void *arg) {
int i;
for(i=0; i<10; i++)
cache_entry_addref(&cache[i]); // NORACE
return NULL;
}
int main () {
for (int i = 0; i < 10; i++)
pthread_mutex_init(&cache[i].refs_mutex, NULL);
int i;
pthread_t t1;
pthread_create(&t1, NULL, t_fun, NULL);
for(i=0; i<10; i++)
cache_entry_addref(&cache[i]); // NORACE
return 0;
}
| Add symb_locks test with irrelevant index access | Add symb_locks test with irrelevant index access
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
95309dd6fd16f076d78e184a1b49a26e464ffa8b | src/TundraCore/Scene/AttributeChangeType.h | src/TundraCore/Scene/AttributeChangeType.h | /**
For conditions of distribution and use, see copyright notice in LICENSE
@file AttributeChangeType.h
@brief Dummy class containing enumeration of attribute/component change types for replication.
This is done in separate file in order to overcome cyclic inclusion dependency
between IAttribute and IComponent. */
#pragma once
#include "TundraCoreApi.h"
namespace Tundra
{
/// Dummy class containing enumeration of attribute/component change types for replication.
class TUNDRACORE_API AttributeChange
{
public:
/// Enumeration of attribute/component change types for replication
enum Type
{
/// Use the current sync method specified in the IComponent this attribute is part of
Default = 0,
/// The value will be changed, but no notifications will be sent (even locally). This
/// is useful when you are doing batch updates of several attributes at a time and want to minimize
/// the amount of re-processing that is done.
Disconnected,
/// The value change will be signalled locally immediately after the change occurs, but
/// it is not sent to the network.
LocalOnly,
/// Replicate: After changing the value, the change will be signalled locally and this change is
/// transmitted to the network as well.
Replicate
};
};
} | /**
For conditions of distribution and use, see copyright notice in LICENSE
@file AttributeChangeType.h
@brief Enumeration of attribute/component change types for replication.
This is done in separate file in order to overcome cyclic inclusion dependency
between IAttribute and IComponent. */
#pragma once
#include "TundraCoreApi.h"
namespace Tundra
{
namespace AttributeChange
{
/// Enumeration of attribute/component change types for replication
enum Type
{
/// Use the current sync method specified in the IComponent this attribute is part of
Default = 0,
/// The value will be changed, but no notifications will be sent (even locally). This
/// is useful when you are doing batch updates of several attributes at a time and want to minimize
/// the amount of re-processing that is done.
Disconnected,
/// The value change will be signalled locally immediately after the change occurs, but
/// it is not sent to the network.
LocalOnly,
/// Replicate: After changing the value, the change will be signalled locally and this change is
/// transmitted to the network as well.
Replicate
};
} // ~AttributeChange
} // ~Tundra
| Make totally unnecessary AttributeChange class namespace instead keeping syntax intact. | Make totally unnecessary AttributeChange class namespace instead keeping syntax intact.
| C | apache-2.0 | realXtend/tundra-urho3d,realXtend/tundra-urho3d,realXtend/tundra-urho3d,realXtend/tundra-urho3d,realXtend/tundra-urho3d |
9a833c8121167c72036d5c9a0c3559674fbe2513 | MdePkg/Library/UefiIfrSupportLib/UefiIfrLibraryInternal.h | MdePkg/Library/UefiIfrSupportLib/UefiIfrLibraryInternal.h | /** @file
Utility functions which helps in opcode creation, HII configuration string manipulations,
pop up window creations, setup browser persistence data set and get.
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _IFRLIBRARY_INTERNAL_H_
#define _IFRLIBRARY_INTERNAL_H_
#include <Uefi.h>
#include <Protocol/DevicePath.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h>
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/IfrSupportLib.h>
#endif
| /** @file
Utility functions which helps in opcode creation, HII configuration string manipulations,
pop up window creations, setup browser persistence data set and get.
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef _IFRLIBRARY_INTERNAL_H_
#define _IFRLIBRARY_INTERNAL_H_
#include <Uefi.h>
#include <Protocol/DevicePath.h>
#include <Protocol/HiiConfigRouting.h>
#include <Protocol/FormBrowser2.h>
#include <Library/DebugLib.h>
#include <Library/BaseMemoryLib.h>
#include <Library/UefiBootServicesTableLib.h>
#include <Library/BaseLib.h>
#include <Library/DevicePathLib.h>
#include <Library/MemoryAllocationLib.h>
#include <Library/IfrSupportLib.h>
#endif
| Add missing protocol header file. | Add missing protocol header file.
git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@6265 6f19259b-4bc3-4df7-8a09-765794883524
| C | bsd-2-clause | MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2 |
ffa8a7e219db655b8cf1a6a091b4e599813a5ebd | Pod/Classes/AVEHTTPRequestOperationBuilder.h | Pod/Classes/AVEHTTPRequestOperationBuilder.h | //
// AVEHTTPRequestOperationBuilder.h
// Avenue
//
// Created by MediaHound on 10/31/14.
//
//
#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworking.h>
#import "AVERequestBuilder.h"
/**
* A simple AVERequestBuilder that can be configured with a baseURL, request/response serializers,
* and a security policy.
*
* Typically, you can instantiate and configure a single AVEHTTPRequestOperationBuilder,
* and reususe it when passing in a builder to `AVENetworkManager` methods.
*/
@interface AVEHTTPRequestOperationBuilder : NSObject <AVERequestBuilder>
/**
* Creates a builder with a base URL.
*/
- (instancetype)initWithBaseURL:(NSString*)url;
/**
* The builders' base URL
* All operations built will use this base URL.
*/
@property (strong, nonatomic) NSURL* baseURL;
/**
* The request serializer for all built operations
*/
@property (strong, nonatomic) AFHTTPRequestSerializer<AFURLRequestSerialization>* requestSerializer;
/**
* The response serializer for all built operations
*/
@property (strong, nonatomic) AFHTTPResponseSerializer<AFURLResponseSerialization>* responseSerializer;
/**
* The security policy for all built operations
*/
@property (strong, nonatomic) AFSecurityPolicy* securityPolicy;
@end
| //
// AVEHTTPRequestOperationBuilder.h
// Avenue
//
// Created by MediaHound on 10/31/14.
//
//
#import <Foundation/Foundation.h>
#import <AFNetworking/AFNetworking.h>
#import "AVERequestBuilder.h"
/**
* A simple AVERequestBuilder that can be configured with a baseURL, request/response serializers,
* and a security policy.
*
* Typically, you can instantiate and configure a single AVEHTTPRequestOperationBuilder,
* and reususe it when passing in a builder to `AVENetworkManager` methods.
*/
@interface AVEHTTPRequestOperationBuilder : NSObject <AVERequestBuilder>
/**
* Creates a builder with a base URL.
*/
- (instancetype)initWithBaseURL:(NSURL*)url;
/**
* The builders' base URL
* All operations built will use this base URL.
*/
@property (strong, nonatomic) NSURL* baseURL;
/**
* The request serializer for all built operations
*/
@property (strong, nonatomic) AFHTTPRequestSerializer<AFURLRequestSerialization>* requestSerializer;
/**
* The response serializer for all built operations
*/
@property (strong, nonatomic) AFHTTPResponseSerializer<AFURLResponseSerialization>* responseSerializer;
/**
* The security policy for all built operations
*/
@property (strong, nonatomic) AFSecurityPolicy* securityPolicy;
@end
| Update initWithBaseURL to take a URL | Update initWithBaseURL to take a URL
| C | apache-2.0 | MediaHound/Avenue |
ecef06a4970c3d6283b62be2ceeb0d8c96f039d8 | include/llvm/Transforms/Utils/PromoteMemToReg.h | include/llvm/Transforms/Utils/PromoteMemToReg.h | //===- PromoteMemToReg.h - Promote Allocas to Scalars -----------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file exposes an interface to promote alloca instructions to SSA
// registers, by using the SSA construction algorithm.
//
//===----------------------------------------------------------------------===//
#ifndef TRANSFORMS_UTILS_PROMOTEMEMTOREG_H
#define TRANSFORMS_UTILS_PROMOTEMEMTOREG_H
#include <vector>
namespace llvm {
class AllocaInst;
class DominatorTree;
class DominanceFrontier;
class AliasSetTracker;
/// isAllocaPromotable - Return true if this alloca is legal for promotion.
/// This is true if there are only loads and stores to the alloca...
///
bool isAllocaPromotable(const AllocaInst *AI);
/// PromoteMemToReg - Promote the specified list of alloca instructions into
/// scalar registers, inserting PHI nodes as appropriate. This function makes
/// use of DominanceFrontier information. This function does not modify the CFG
/// of the function at all. All allocas must be from the same function.
///
/// If AST is specified, the specified tracker is updated to reflect changes
/// made to the IR.
///
void PromoteMemToReg(const std::vector<AllocaInst*> &Allocas,
DominatorTree &DT, AliasSetTracker *AST = 0);
} // End llvm namespace
#endif
| //===- PromoteMemToReg.h - Promote Allocas to Scalars -----------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file exposes an interface to promote alloca instructions to SSA
// registers, by using the SSA construction algorithm.
//
//===----------------------------------------------------------------------===//
#ifndef TRANSFORMS_UTILS_PROMOTEMEMTOREG_H
#define TRANSFORMS_UTILS_PROMOTEMEMTOREG_H
#include <vector>
namespace llvm {
class AllocaInst;
class DominatorTree;
class AliasSetTracker;
/// isAllocaPromotable - Return true if this alloca is legal for promotion.
/// This is true if there are only loads and stores to the alloca...
///
bool isAllocaPromotable(const AllocaInst *AI);
/// PromoteMemToReg - Promote the specified list of alloca instructions into
/// scalar registers, inserting PHI nodes as appropriate. This function makes
/// use of DominanceFrontier information. This function does not modify the CFG
/// of the function at all. All allocas must be from the same function.
///
/// If AST is specified, the specified tracker is updated to reflect changes
/// made to the IR.
///
void PromoteMemToReg(const std::vector<AllocaInst*> &Allocas,
DominatorTree &DT, AliasSetTracker *AST = 0);
} // End llvm namespace
#endif
| Remove a stale forward declaration. | Remove a stale forward declaration.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@156770 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,chubbymaggie/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,apple/swift-llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap |
ad5169ceccdaa800c2c81d46148700ceeb806e48 | AFToolkit/AFToolkit.h | AFToolkit/AFToolkit.h | //
// Toolkit header to include the main headers of the 'AFToolkit' library.
//
// Macros
#import "AFDefines.h"
#import "AFKeypath.h"
// Categories
#import "NSObject+Runtime.h"
#import "NSBundle+Universal.h"
#import "UITableViewCell+Universal.h"
#import "UITableView+Universal.h"
#import "UIView+Render.h"
// Common
#import "AFArray.h"
#import "AFArrayView.h"
#import "AFFileHelper.h"
#import "AFKVO.h"
#import "AFLogHelper.h"
#import "AFMutableArray.h"
#import "AFPlatformHelper.h"
#import "AFReachability.h"
// Object provider
#import "AFObjectProvider.h"
// Database
#import "AFDBClient.h"
// MVC
#import "AFView.h"
#import "AFViewController.h"
#import "AFTableView.h" | //
// Toolkit header to include the main headers of the 'AFToolkit' library.
//
// Macros
#import "AFDefines.h"
#import "AFKeypath.h"
// Categories
#import "NSObject+Runtime.h"
#import "NSBundle+Universal.h"
#import "UITableViewCell+Universal.h"
#import "UITableView+Universal.h"
#import "UIView+Render.h"
// Common
#import "AFArray.h"
#import "AFArrayView.h"
#import "AFFileHelper.h"
#import "AFKVO.h"
#import "AFLogHelper.h"
#import "AFMutableArray.h"
#import "AFPlatformHelper.h"
#import "AFReachability.h"
// Object provider
#import "AFObjectProvider.h"
#import "AFObjectModel.h"
// Database
#import "AFDBClient.h"
// MVC
#import "AFView.h"
#import "AFViewController.h"
#import "AFTableView.h" | Add object model to toolkit.h. | Add object model to toolkit.h.
| C | mit | mlatham/AFToolkit |
25c233eaaaf0621eed969fb0b0a32fac4c56ab09 | HTMLKit/HTMLElement.h | HTMLKit/HTMLElement.h | //
// HTMLElement.h
// HTMLKit
//
// Created by Iska on 05/10/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface HTMLElement : NSObject
@end
| //
// HTMLElement.h
// HTMLKit
//
// Created by Iska on 05/10/14.
// Copyright (c) 2014 BrainCookie. All rights reserved.
//
#import <Foundation/Foundation.h>
@interface HTMLElement : NSObject
@property (nonatomic, strong, readonly) NSString *tagName;
@end
| Add tagname attribute for HTML Element | Add tagname attribute for HTML Element
| C | mit | iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit,iabudiab/HTMLKit |
0487e2384269e8de92fae35958b1d271c0a649a7 | ports/nrf/boards/arduino_primo/nrf52_hal_conf.h | ports/nrf/boards/arduino_primo/nrf52_hal_conf.h | #ifndef NRF52_HAL_CONF_H__
#define NRF52_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
#define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
#define HAL_PWM_MODULE_ENABLED
#define HAL_RTC_MODULE_ENABLED
#define HAL_TIMER_MODULE_ENABLED
#define HAL_TWI_MODULE_ENABLED
#define HAL_ADCE_MODULE_ENABLED
#define HAL_TEMP_MODULE_ENABLED
// #define HAL_UARTE_MODULE_ENABLED
// #define HAL_SPIE_MODULE_ENABLED
// #define HAL_TWIE_MODULE_ENABLED
#endif // NRF52_HAL_CONF_H__
| #ifndef NRF52_HAL_CONF_H__
#define NRF52_HAL_CONF_H__
#define HAL_UART_MODULE_ENABLED
#define HAL_SPI_MODULE_ENABLED
#define HAL_TIME_MODULE_ENABLED
#define HAL_PWM_MODULE_ENABLED
#define HAL_RTC_MODULE_ENABLED
#define HAL_TIMER_MODULE_ENABLED
#define HAL_TWI_MODULE_ENABLED
#define HAL_ADCE_MODULE_ENABLED
#define HAL_TEMP_MODULE_ENABLED
#define HAL_RNG_MODULE_ENABLED
// #define HAL_UARTE_MODULE_ENABLED
// #define HAL_SPIE_MODULE_ENABLED
// #define HAL_TWIE_MODULE_ENABLED
#endif // NRF52_HAL_CONF_H__
| Add missing hal_rng config used by random mod. | nrf/boards/arduino_primo: Add missing hal_rng config used by random mod.
| C | mit | pfalcon/micropython,tobbad/micropython,bvernoux/micropython,trezor/micropython,pramasoul/micropython,adafruit/circuitpython,adafruit/circuitpython,selste/micropython,pramasoul/micropython,pozetroninc/micropython,pozetroninc/micropython,bvernoux/micropython,tobbad/micropython,pozetroninc/micropython,pfalcon/micropython,pramasoul/micropython,kerneltask/micropython,kerneltask/micropython,MrSurly/micropython,MrSurly/micropython,henriknelson/micropython,MrSurly/micropython,trezor/micropython,pfalcon/micropython,selste/micropython,kerneltask/micropython,tobbad/micropython,pozetroninc/micropython,MrSurly/micropython,henriknelson/micropython,trezor/micropython,pramasoul/micropython,selste/micropython,henriknelson/micropython,bvernoux/micropython,adafruit/circuitpython,tobbad/micropython,kerneltask/micropython,pramasoul/micropython,henriknelson/micropython,selste/micropython,selste/micropython,adafruit/circuitpython,bvernoux/micropython,trezor/micropython,adafruit/circuitpython,kerneltask/micropython,pfalcon/micropython,bvernoux/micropython,henriknelson/micropython,trezor/micropython,pozetroninc/micropython,adafruit/circuitpython,tobbad/micropython,pfalcon/micropython,MrSurly/micropython |
10a72b878021a75c8e28c5244205f0687862e4e4 | tests/regression/31-ikind-aware-ints/17-def-enum-refine.c | tests/regression/31-ikind-aware-ints/17-def-enum-refine.c | //PARAM: --sets ana.int.refinement once --enable ana.int.enums
int main() {
int x;
_Bool c;
if(c) { x--;}
else { x--;}
// The veryfier claimed that the fixed-point was not reached here due to a bug in Enums.leq
// The leq wrongly returned false for the Enums {0} and not{}[0,1]
return 0;
}
| Add failing test case due to buggy Enums.leq | Add failing test case due to buggy Enums.leq
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
33dfe3a73eeb4e115247a18a46029740ab4cf31d | include/arch/x64/cpu.h | include/arch/x64/cpu.h | #pragma once
#include <truth/types.h>
#define CPUID_SMAP (1 << 20)
#define CPUID_SMEP (1 << 7)
static inline void cpuid(uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) {
__asm__ volatile ("cpuid" :
"=a"(*eax),
"=b"(*ebx),
"=c"(*ecx),
"=d"(*edx)
: "0" (*eax), "2" (*ecx)
:);
}
static inline void cpu_flags_set_ac(void) {
__asm__ volatile ("stac" ::: "cc");
}
static inline void cpu_flags_clear_ac(void) {
__asm__ volatile ("clac" ::: "cc");
}
static inline void cpu_cr4_set_bit(int bit) {
__asm__ volatile ("push %%rax\n"
"movq %%cr4, %%rax\n"
"orq $0, %%rax\n"
"movq %%rax, %%cr4\n"
"pop %%rax\n"
: : "a"(bit));
}
static inline void cpu_cr4_clear_bit(int bit) {
int mask = ~(1 << bit);
__asm__ volatile ("andq %0, %%cr4" : : "a"(mask));
}
| #pragma once
#include <truth/types.h>
#define CPUID_SMAP (1 << 20)
#define CPUID_SMEP (1 << 7)
#define CPU_CR4_SMEP_BIT 20
#define CPU_CR4_SMAP_BIT 21
static inline void cpuid(uint32_t *eax, uint32_t *ebx, uint32_t *ecx, uint32_t *edx) {
__asm__ volatile ("cpuid" :
"=a"(*eax),
"=b"(*ebx),
"=c"(*ecx),
"=d"(*edx)
: "0" (*eax), "2" (*ecx)
:);
}
static inline void cpu_flags_set_ac(void) {
__asm__ volatile ("stac" ::: "cc");
}
static inline void cpu_flags_clear_ac(void) {
__asm__ volatile ("clac" ::: "cc");
}
static inline void cpu_cr4_set_bit(int bit) {
__asm__ volatile ("push %%rax\n"
"movq %%cr4, %%rax\n"
"orq $0, %%rax\n"
"movq %%rax, %%cr4\n"
"pop %%rax\n"
: : "a"(bit));
}
static inline void cpu_cr4_clear_bit(int bit) {
int mask = ~(1 << bit);
__asm__ volatile ("andq %0, %%cr4" : : "a"(mask));
}
| Define cr4 SMEP & SMAP bits | Define cr4 SMEP & SMAP bits
| C | mit | iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth,iankronquist/kernel-of-truth |
ae86bb5dc591f0e2f6e423499e84bb603a3573e7 | src/gst-plugins/crowddetector/crowddetector.c | src/gst-plugins/crowddetector/crowddetector.c | /*
* (C) Copyright 2013 Kurento (http://kurento.org/)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser General Public License
* (LGPL) version 2.1 which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-2.1.html
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*/
#include <config.h>
#include <gst/gst.h>
#include "kmscrowddetector.h"
static gboolean
init (GstPlugin * plugin)
{
if (!kms_crowd_detector_plugin_init (plugin))
return FALSE;
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
kmscrowddetector,
"Kurento plate detector",
init, VERSION, GST_LICENSE_UNKNOWN, "Kurento", "http://kurento.com/")
| /*
* (C) Copyright 2013 Kurento (http://kurento.org/)
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the GNU Lesser General Public License
* (LGPL) version 2.1 which accompanies this distribution, and is available at
* http://www.gnu.org/licenses/lgpl-2.1.html
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*/
#include <config.h>
#include <gst/gst.h>
#include "kmscrowddetector.h"
static gboolean
init (GstPlugin * plugin)
{
if (!kms_crowd_detector_plugin_init (plugin))
return FALSE;
return TRUE;
}
GST_PLUGIN_DEFINE (GST_VERSION_MAJOR,
GST_VERSION_MINOR,
kmscrowddetector,
"Kurento crowd detector",
init, VERSION, GST_LICENSE_UNKNOWN, "Kurento", "http://kurento.com/")
| Fix error in plugin description | Fix error in plugin description
Change-Id: I2d51e500ed5babb084e5f281c13843bd43f9a690
| C | apache-2.0 | Kurento/kms-crowddetector,Kurento/kms-crowddetector,Kurento/kms-crowddetector |
00429da5931314964a3f9d91ed93e32a0a6ab7b2 | PBWebViewController/PBWebViewController.h | PBWebViewController/PBWebViewController.h | //
// PBWebViewController.h
// Pinbrowser
//
// Created by Mikael Konutgan on 11/02/2013.
// Copyright (c) 2013 Mikael Konutgan. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface PBWebViewController : UIViewController <UIWebViewDelegate>
@property (strong, nonatomic) NSURL *URL;
@property (strong, nonatomic) NSArray *activityItems;
@property (strong, nonatomic) NSArray *applicationActivities;
@property (strong, nonatomic) NSArray *excludedActivityTypes;
/**
* A Boolean indicating whether the web view controller’s toolbar,
* which displays a stop/refresh, back, forward and share button, is shown.
* The default value of this property is `YES`.
*/
@property (assign, nonatomic) BOOL showsNavigationToolbar;
- (void)load;
- (void)clear;
@end
| //
// PBWebViewController.h
// Pinbrowser
//
// Created by Mikael Konutgan on 11/02/2013.
// Copyright (c) 2013 Mikael Konutgan. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface PBWebViewController : UIViewController <UIWebViewDelegate>
/**
* The URL that will be loaded by the web view controller.
* If there is one present when the web view appears, it will be automatically loaded, by calling `load`,
* Otherwise, you can set a `URL` after the web view has already been loaded and then manually call `load`.
*/
@property (strong, nonatomic) NSURL *URL;
/** The array of data objects on which to perform the activity. */
@property (strong, nonatomic) NSArray *activityItems;
/** An array of UIActivity objects representing the custom services that your application supports. */
@property (strong, nonatomic) NSArray *applicationActivities;
/** The list of services that should not be displayed. */
@property (strong, nonatomic) NSArray *excludedActivityTypes;
/**
* A Boolean indicating whether the web view controller’s toolbar,
* which displays a stop/refresh, back, forward and share button, is shown.
* The default value of this property is `YES`.
*/
@property (assign, nonatomic) BOOL showsNavigationToolbar;
/**
* Loads the given `URL`. This is called automatically when the when the web view appears if a `URL` exists,
* otehrwise it can be called manually.
*/
- (void)load;
/**
* Clears the contents of the web view.
*/
- (void)clear;
@end
| Document all the public properties and methods | Document all the public properties and methods
| C | mit | kmikael/PBWebViewController,jhmcclellandii/PBWebViewController,mobitar/MBXWebViewController,junjie/PBWebViewController |
e143b52dbbee202551c0ccc7ce594cbe530a8391 | ArcGISRuntimeSDKQt_CppSamples/Maps/SetInitialMapLocation/SetInitialMapLocation.h | ArcGISRuntimeSDKQt_CppSamples/Maps/SetInitialMapLocation/SetInitialMapLocation.h | // [WriteFile Name=SetInitialMapLocation, Category=Maps]
// [Legal]
// Copyright 2015 Esri.
// 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.
s// [Legal]
#ifndef SET_INITIAL_MAP_LOCATION_H
#define SET_INITIAL_MAP_LOCATION_H
namespace Esri
{
namespace ArcGISRuntime
{
class Map;
class MapQuickView;
}
}
#include <QQuickItem>
class SetInitialMapLocation : public QQuickItem
{
Q_OBJECT
public:
SetInitialMapLocation(QQuickItem* parent = 0);
~SetInitialMapLocation();
void componentComplete() Q_DECL_OVERRIDE;
private:
Esri::ArcGISRuntime::Map* m_map;
Esri::ArcGISRuntime::MapQuickView* m_mapView;
};
#endif // SET_INITIAL_MAP_LOCATION_H
| // [WriteFile Name=SetInitialMapLocation, Category=Maps]
// [Legal]
// Copyright 2015 Esri.
// 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.
// [Legal]
#ifndef SET_INITIAL_MAP_LOCATION_H
#define SET_INITIAL_MAP_LOCATION_H
namespace Esri
{
namespace ArcGISRuntime
{
class Map;
class MapQuickView;
}
}
#include <QQuickItem>
class SetInitialMapLocation : public QQuickItem
{
Q_OBJECT
public:
SetInitialMapLocation(QQuickItem* parent = 0);
~SetInitialMapLocation();
void componentComplete() Q_DECL_OVERRIDE;
private:
Esri::ArcGISRuntime::Map* m_map;
Esri::ArcGISRuntime::MapQuickView* m_mapView;
};
#endif // SET_INITIAL_MAP_LOCATION_H
| Fix legal comment build error | Fix legal comment build error
| C | apache-2.0 | Esri/arcgis-runtime-samples-qt,Esri/arcgis-runtime-samples-qt,Esri/arcgis-runtime-samples-qt,Esri/arcgis-runtime-samples-qt |
2380cb3c0804df11297de421c4defec96de19f8b | src/2D_element_arithmetic.c | src/2D_element_arithmetic.c | #include<2D_element_arithmetic.h>
matrix * elem_matrix_operation(elem (*fp)(elem, float), matrix * m,
float param) {
int i, j = 0;
for(i = 0; i < m->rows; i++) {
for(j =0; j < m->columns; j++) {
set_matrix_member(m, i+1, j+1,
(*fp)(m->arr[i*m->columns +j], param));
}
}
return m;
}
elem pow_elem(elem x, float p) {
return (elem)pow(x, p);
}
elem sqroot_elem(elem x, float p) {
float r = (float)1 / p;
return pow_elem(x, r);
}
| #include<2D_element_arithmetic.h>
matrix * elem_matrix_operation(elem (*fp)(elem, float), matrix * m,
float param) {
int i, j = 0;
for(i = 0; i < m->rows; i++) {
for(j =0; j < m->columns; j++) {
set_matrix_member(m, i+1, j+1,
(*fp)(m->arr[i*m->columns +j], param));
}
}
return m;
}
elem pow_elem(elem x, float p) {
return (elem)floor(pow((float)x, p));
}
elem sqroot_elem(elem x, float p) {
float r = (float)1 / p;
return pow_elem(x, r);
}
| Make explicit the casts and floor division in pow_elem function | Make explicit the casts and floor division in pow_elem function
| C | mit | cphang99/matrix_playground,cphang99/matrix_playground,cphang99/matrix_playground |
fab6f220cdbcd7269d8f6e19988774efe0a49983 | test/Analysis/stack-addr-ps.c | test/Analysis/stack-addr-ps.c | // RUN: clang -checker-simple -verify %s
int* f1() {
int x = 0;
return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}}
}
int* f2(int y) {
return &y; // expected-warning{{Address of stack memory associated with local variable 'y' returned.}} expected-warning{{address of stack memory associated with local variable 'y' returned}}
}
int* f3(int x, int *y) {
int w = 0;
if (x)
y = &w;
return y; // expected-warning{{Address of stack memory associated with local variable 'w' returned.}}
}
void* compound_literal(int x) {
if (x)
return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}} expected-warning{{braces around scalar initializer}}
int* array[] = {};
struct s { int z; double y; int w; };
return &((struct s){ 2, 0.4, 5 * 8 }); // expected-warning{{Address of stack memory}}
}
| // RUN: clang -checker-simple -verify %s
int* f1() {
int x = 0;
return &x; // expected-warning{{Address of stack memory associated with local variable 'x' returned.}} expected-warning{{address of stack memory associated with local variable 'x' returned}}
}
int* f2(int y) {
return &y; // expected-warning{{Address of stack memory associated with local variable 'y' returned.}} expected-warning{{address of stack memory associated with local variable 'y' returned}}
}
int* f3(int x, int *y) {
int w = 0;
if (x)
y = &w;
return y; // expected-warning{{Address of stack memory associated with local variable 'w' returned.}}
}
void* compound_literal(int x, int y) {
if (x)
return &(unsigned short){((unsigned short)0x22EF)}; // expected-warning{{Address of stack memory}} expected-warning{{braces around scalar initializer}}
int* array[] = {};
struct s { int z; double y; int w; };
if (y)
return &((struct s){ 2, 0.4, 5 * 8 }); // expected-warning{{Address of stack memory}}
void* p = &((struct s){ 42, 0.4, x ? 42 : 0 });
return p;
}
| Enhance compound literal test case. | Enhance compound literal test case.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@58480 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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang |
ff4417bbf993d1695567ce8672a2c19f6f48f557 | lib/Headers/varargs.h | lib/Headers/varargs.h | /*===---- varargs.h - Variable argument handling -------------------------------------===
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __VARARGS_H
#define __VARARGS_H
#error "Please use <stdarg.h> instead of <varargs.h>"
#endif | /*===---- varargs.h - Variable argument handling -------------------------------------===
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*
*===-----------------------------------------------------------------------===
*/
#ifndef __VARARGS_H
#define __VARARGS_H
#error "Please use <stdarg.h> instead of <varargs.h>"
#endif
| Add a newline at the end of the file. | Add a newline at the end of the file.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@99026 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | apple/swift-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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang |
ce3668fd60044c328af41b358a66a0e6741db1fb | boot/espressif/hal/include/esp_log.h | boot/espressif/hal/include/esp_log.h | /*
* Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <mcuboot_config/mcuboot_logging.h>
#define ESP_LOGE(tag, fmt, ...) MCUBOOT_LOG_ERR(fmt, ##__VA_ARGS__)
#define ESP_LOGW(tag, fmt, ...) MCUBOOT_LOG_WRN(fmt, ##__VA_ARGS__)
#define ESP_LOGI(tag, fmt, ...) MCUBOOT_LOG_INF(fmt, ##__VA_ARGS__)
#define ESP_LOGD(tag, fmt, ...) MCUBOOT_LOG_DBG(fmt, ##__VA_ARGS__)
| /*
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
#pragma once
#include <mcuboot_config/mcuboot_logging.h>
#define ESP_LOGE(tag, fmt, ...) MCUBOOT_LOG_ERR("[%s] " fmt, tag, ##__VA_ARGS__)
#define ESP_LOGW(tag, fmt, ...) MCUBOOT_LOG_WRN("[%s] " fmt, tag, ##__VA_ARGS__)
#define ESP_LOGI(tag, fmt, ...) MCUBOOT_LOG_INF("[%s] " fmt, tag, ##__VA_ARGS__)
#define ESP_LOGD(tag, fmt, ...) MCUBOOT_LOG_DBG("[%s] " fmt, tag, ##__VA_ARGS__)
#define ESP_LOGV(tag, fmt, ...) MCUBOOT_LOG_DBG("[%s] " fmt, tag, ##__VA_ARGS__)
#define ESP_EARLY_LOGE(tag, fmt, ...) MCUBOOT_LOG_ERR("[%s] " fmt, tag, ##__VA_ARGS__)
#define ESP_EARLY_LOGW(tag, fmt, ...) MCUBOOT_LOG_WRN("[%s] " fmt, tag, ##__VA_ARGS__)
#define ESP_EARLY_LOGI(tag, fmt, ...) MCUBOOT_LOG_INF("[%s] " fmt, tag, ##__VA_ARGS__)
#define ESP_EARLY_LOGD(tag, fmt, ...) MCUBOOT_LOG_DBG("[%s] " fmt, tag, ##__VA_ARGS__)
#define ESP_EARLY_LOGV(tag, fmt, ...) MCUBOOT_LOG_DBG("[%s] " fmt, tag, ##__VA_ARGS__)
| Use "TAG" field from ESP_LOG* macros from IDF libraries | espressif: Use "TAG" field from ESP_LOG* macros from IDF libraries
Signed-off-by: Gustavo Henrique Nihei <[email protected]>
| C | apache-2.0 | runtimeco/mcuboot,ATmobica/mcuboot,ATmobica/mcuboot,ATmobica/mcuboot,runtimeco/mcuboot,ATmobica/mcuboot,runtimeco/mcuboot,runtimeco/mcuboot,runtimeco/mcuboot,ATmobica/mcuboot |
fe5717664e4220a0bde701fc3239ef7eabe4f138 | MdeModulePkg/Universal/HiiDatabaseDxe/R8Lib.h | MdeModulePkg/Universal/HiiDatabaseDxe/R8Lib.h | /** @file
Implement a utility function named R8_EfiLibCompareLanguage.
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __R8_LIB_H__
#define __R8_LIB_H__
/**
Compare whether two names of languages are identical.
@param Language1 Name of language 1
@param Language2 Name of language 2
@retval TRUE same
@retval FALSE not same
**/
BOOLEAN
R8_EfiLibCompareLanguage (
IN CHAR8 *Language1,
IN CHAR8 *Language2
)
;
#endif
| /** @file
Implement a utility function named R8_EfiLibCompareLanguage.
Copyright (c) 2007 - 2008, Intel Corporation
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
http://opensource.org/licenses/bsd-license.php
THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
**/
#ifndef __R8_LIB_H__
#define __R8_LIB_H__
/**
Compare whether two names of languages are identical.
@param Language1 Name of language 1
@param Language2 Name of language 2
@retval TRUE same
@retval FALSE not same
**/
BOOLEAN
R8_EfiLibCompareLanguage (
IN CHAR8 *Language1,
IN CHAR8 *Language2
)
;
#endif
| Update to use DOS format | Update to use DOS format
git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@6339 6f19259b-4bc3-4df7-8a09-765794883524
| C | bsd-2-clause | MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2,MattDevo/edk2 |
2cb139d6f1660d7354a8b9a3e1a86d9bc45aead1 | Pod/Classes/Models/LKManager.h | Pod/Classes/Models/LKManager.h | //
// LKManager.h
//
// Created by Vlad Gorbenko on 4/21/15.
// Copyright (c) 2015 Vlad Gorbenko. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "LKLanguage.h"
extern NSString *const LKLanguageDidChangeNotification;
extern NSString *const LKSourceDefault;
extern NSString *const LKSourcePlist;
NSString *LKLocalizedString(NSString *key, NSString *comment);
@interface LKManager : NSObject{
NSDictionary *_vocabluary;
}
@property (nonatomic, strong) LKLanguage *currentLanguage;
@property (nonatomic, readonly) NSArray *languages;
+ (void)setLocalizationFilename:(NSString *)localizationFilename;
+ (LKManager*)sharedInstance;
+ (void)nextLanguage;
- (NSString *)titleForKeyPathIdentifier:(NSString *)keyPathIdentifier;
+ (NSMutableArray *)simpleViews;
+ (NSMutableArray *)rightToLeftLanguagesCodes;
+ (void)addLanguage:(LKLanguage *)language;
+ (void)removeLanguage:(LKLanguage *)language;
- (NSString *)setLocalizationSource:(NSString *)source;
@end
| //
// LKManager.h
//
// Created by Vlad Gorbenko on 4/21/15.
// Copyright (c) 2015 Vlad Gorbenko. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "LKLanguage.h"
extern NSString *const LKLanguageDidChangeNotification;
extern NSString *const LKSourceDefault;
extern NSString *const LKSourcePlist;
NSString *LKLocalizedString(NSString *key, NSString *comment);
@interface LKManager : NSObject{
NSDictionary *_vocabluary;
}
@property (nonatomic, strong) LKLanguage *currentLanguage;
@property (nonatomic, readonly) NSArray *languages;
+ (void)setLocalizationFilename:(NSString *)localizationFilename;
+ (LKManager*)sharedInstance;
+ (void)nextLanguage;
- (NSString *)titleForKeyPathIdentifier:(NSString *)keyPathIdentifier;
+ (NSMutableArray *)simpleViews;
+ (NSMutableArray *)rightToLeftLanguagesCodes;
+ (void)addLanguage:(LKLanguage *)language;
+ (void)removeLanguage:(LKLanguage *)language;
- (LKLanguage *)languageByCode:(NSString *)code;
- (NSString *)setLocalizationSource:(NSString *)source;
@end
| Make language by code public. | Make language by code public.
| C | mit | mojidabckuu/Loki,mojidabckuu/Loki |
fee172d7eafd98a5df3c251ed5065f9e91eb4b2a | coursework/assignment1/matrix_multiplication.c | coursework/assignment1/matrix_multiplication.c | #include <stdio.h>
#include <mpi.h>
int main(int argc, char *argv[]) {
int numprocs, rank, namelen;
char processor_name[MPI_MAX_PROCESSOR_NAME];
MPI_Init(&argc, &argv);
MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Get_processor_name(processor_name, &namelen);
// TODO
MPI_Finalize();
return 0;
}
| // mat_x num of rows equals to
// mat_a num of rows
#define A_ROWS 3
#define X_ROWS 3
// mat_x num of cols equals to
// mat_b num of cols
#define B_COLS 3
#define X_COLS 3
// mat_a num of cols should be equals to
// mat_b num of rows
#define A_COLS 2
#define B_ROWS 2
#include <stdio.h>
// #include <mpi.h>
void print_matrix(char* name, int rows, int cols, int matrix[rows][cols]) {
printf("\n%s [%d][%d]\n", name, rows, cols);
for (int row = 0; row < rows; row++){
for (int col = 0; col < cols; col++)
printf("%d ", matrix[row][col]);
printf("\n");
}
}
int main(int argc, char *argv[]) {
int matrix_a [A_ROWS][A_COLS] = {
{9, 0},
{5, 6},
{1, 2}
};
int matrix_b [B_ROWS][B_COLS] = {
{2, 4, 3},
{7, 8, 9}
};
int matrix_x [X_ROWS][X_COLS];
// multipy matrices a and b
for (int row = 0; row < A_ROWS; row++) {
for (int col = 0; col < B_COLS; col++) {
int sum = 0;
for (int ctrl = 0; ctrl < B_ROWS; ctrl++)
sum = sum + matrix_a[row][ctrl] * matrix_b[ctrl][col];
matrix_x[row][col] = sum;
}
}
print_matrix("Matrix A", A_ROWS, A_COLS, matrix_a);
print_matrix("Matrix B", B_ROWS, B_COLS, matrix_b);
print_matrix("Matrix X", X_ROWS, X_COLS, matrix_x);
printf("\n");
// TODO
// int numprocs, rank, namelen;
// char processor_name[MPI_MAX_PROCESSOR_NAME];
// MPI_Init(&argc, &argv);
// MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
// MPI_Comm_rank(MPI_COMM_WORLD, &rank);
// MPI_Get_processor_name(processor_name, &namelen);
// MPI_Finalize();
return 0;
}
| Add matrix multiplication code in C | Add matrix multiplication code in C
| C | mit | arthurazs/uff-lpp,arthurazs/uff-lpp,arthurazs/uff-lpp |
d0ae779c15cfa916a186dff8872e2a3f4401c2d3 | snapshots/hacl-c/Random.h | snapshots/hacl-c/Random.h | /* This file was auto-generated by KreMLin! */
#ifndef __Random_H
#define __Random_H
#include "kremlib.h"
#include "config.h"
#include "drng.h"
#include "cpuid.h"
typedef uint8_t u8;
typedef uint32_t u32;
typedef uint64_t u64;
typedef uint8_t *bytes;
uint32_t random_uint32();
uint64_t random_uint64();
void random_bytes(uint8_t *rand, uint32_t n);
uint32_t randseed_uint32();
uint64_t randseed_uint64();
#endif
| /* This file was auto-generated by KreMLin! */
#ifndef __Random_H
#define __Random_H
#include "kremlib.h"
#include "config.h"
#include "drng.h"
#include "cpuid.h"
typedef uint8_t u8;
typedef uint32_t u32;
typedef uint64_t u64;
uint32_t random_uint32();
uint64_t random_uint64();
void random_bytes(uint8_t *rand, uint32_t n);
uint32_t randseed_uint32();
uint64_t randseed_uint64();
#endif
| Remove a redifinition of type 'bytes' | Remove a redifinition of type 'bytes'
| C | apache-2.0 | mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star,mitls/hacl-star |
32adade0be324e7280a606adaaa17279ab2b7c7d | doxygen/main_page.c | doxygen/main_page.c | /**
@mainpage M-Stack
@section Intro
This is M-Stack, a free USB Device Stack for PIC Microcontrollers. For more information, see the <a href="group__public__api.html">Public API Page.</a>
*/
| /**
@mainpage M-Stack
@section Intro
This is M-Stack, a free USB Device Stack for PIC Microcontrollers.
For more information, see the <a href="http://www.signal11.us/oss/m-stack">main web page.</a>
For API documentation, see the <a href="group__public__api.html">Public API Page.</a>
*/
| Add web page link to the main doxygen page | doxygen: Add web page link to the main doxygen page
| C | apache-2.0 | rollingstone/m-stack,rollingstone/m-stack,pololu/m-stack,pololu/m-stack |
4dc1a5ab19c9cc8a84d726d4a01d0e3ea75644b9 | include/fish_detector/common/species_dialog.h | include/fish_detector/common/species_dialog.h | /// @file
/// @brief Defines SpeciedDialog class.
#ifndef SPECIES_DIALOG_H
#define SPECIES_DIALOG_H
namespace fish_detector {
class SpeciesDialog : public QDialog {
Q_OBJECT
#ifndef NO_TESTING
friend class TestSpeciesDialog;
#endif
public:
/// @brief Constructor.
///
/// @param parent Parent widget.
explicit SpeciesDialog(QWidget *parent = 0);
private slots:
/// @brief Emits the accepted signal.
void on_ok_clicked();
/// @brief Emits the rejected signal.
void on_cancel_clicked();
/// @brief Removes currently selected subspecies.
void on_removeSubspecies_clicked();
/// @brief Adds a new subspecies.
void on_addSubspecies_clicked();
/// @brief Returns a Species object corresponding to the dialog values.
///
/// @return Species object corresponding to the dialog values.
Species getSpecies();
};
} // namespace fish_detector
#endif // SPECIES_DIALOG_H
| /// @file
/// @brief Defines SpeciesDialog class.
#ifndef SPECIES_DIALOG_H
#define SPECIES_DIALOG_H
#include <memory>
#include <QWidget>
#include <QDialog>
#include "fish_detector/common/species.h"
namespace Ui {
class SpeciesDialog;
}
namespace fish_detector {
class SpeciesDialog : public QDialog {
Q_OBJECT
#ifndef NO_TESTING
friend class TestSpeciesDialog;
#endif
public:
/// @brief Constructor.
///
/// @param parent Parent widget.
explicit SpeciesDialog(QWidget *parent = 0);
/// @brief Returns a Species object corresponding to the dialog values.
///
/// @return Species object corresponding to the dialog values.
Species getSpecies();
private slots:
/// @brief Emits the accepted signal.
void on_ok_clicked();
/// @brief Emits the rejected signal.
void on_cancel_clicked();
/// @brief Removes currently selected subspecies.
void on_removeSubspecies_clicked();
/// @brief Adds a new subspecies.
void on_addSubspecies_clicked();
private:
/// @brief Widget loaded from ui file.
std::unique_ptr<Ui::SpeciesDialog> ui_;
};
} // namespace fish_detector
#endif // SPECIES_DIALOG_H
| Add function returning Species object | Add function returning Species object
| C | mit | BGWoodward/FishDetector |
5fff847531ede017aeabc7e38264f438748b5493 | 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 | adobe/chromium,adobe/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,yitian134/chromium,adobe/chromium,yitian134/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,ropik/chromium,ropik/chromium,ropik/chromium,gavinp/chromium,ropik/chromium,yitian134/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,gavinp/chromium,ropik/chromium,gavinp/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium,ropik/chromium,adobe/chromium,ropik/chromium,yitian134/chromium,gavinp/chromium,adobe/chromium,adobe/chromium,gavinp/chromium,yitian134/chromium |
e62cfdcc7390d420833d2bead953d8e172719f37 | src/dst.c | src/dst.c | #include "syshead.h"
#include "dst.h"
#include "ip.h"
#include "arp.h"
int dst_neigh_output(struct sk_buff *skb)
{
struct iphdr *iphdr = ip_hdr(skb);
struct netdev *netdev = skb->netdev;
uint8_t *dmac = arp_get_hwaddr(iphdr->daddr);
int rc;
if (dmac) {
return netdev_transmit(skb, dmac, ETH_P_IP);
} else {
rc = arp_request(iphdr->saddr, iphdr->daddr, netdev);
free_skb(skb);
return rc;
}
}
| #include "syshead.h"
#include "dst.h"
#include "ip.h"
#include "arp.h"
int dst_neigh_output(struct sk_buff *skb)
{
struct iphdr *iphdr = ip_hdr(skb);
struct netdev *netdev = skb->netdev;
uint8_t *dmac = arp_get_hwaddr(iphdr->daddr);
int rc;
if (dmac) {
return netdev_transmit(skb, dmac, ETH_P_IP);
} else {
rc = arp_request(iphdr->saddr, iphdr->daddr, netdev);
while ((dmac = arp_get_hwaddr(iphdr->daddr)) == NULL) {
sleep(1);
}
return netdev_transmit(skb, dmac, ETH_P_IP);
}
}
| Add ugly hack for waiting that ARP cache gets populated | Add ugly hack for waiting that ARP cache gets populated
We do not have a retransmission system implemented yet,
so let's sleep here for a while in order to get the ARP entry
if it is missing.
| C | mit | saminiir/level-ip,saminiir/level-ip |
813b100e98470a3dca5116895e37cadfae1e7c2d | util/cpp/db/util/Macros.h | util/cpp/db/util/Macros.h | /*
* Copyright (c) 2008 Digital Bazaar, Inc. All rights reserved.
*/
#ifndef db_util_Macros_H
#define db_util_Macros_H
/**
* Miscellaneous general use macros.
*/
/**
* Macro statement wrapper. Adapted from glib.
* Use:
* if(x) DB_STMT_START { ... } DB_STMT_END; else ...
*/
#define DB_STMT_START do
#define DB_STMT_END while (0)
/**
* Convert argument to a string
*/
#define DB_STRINGIFY(arg) #arg
/**
* String representing the current code location.
*/
#define DB_STRLOC __FILE__ ":" DB_STRINGIFY(__LINE__)
#endif
| /*
* Copyright (c) 2008 Digital Bazaar, Inc. All rights reserved.
*/
#ifndef db_util_Macros_H
#define db_util_Macros_H
/**
* Miscellaneous general use macros.
*/
/**
* Macro statement wrapper. Adapted from glib.
* Use:
* if(x) DB_STMT_START { ... } DB_STMT_END; else ...
*/
#define DB_STMT_START do
#define DB_STMT_END while (0)
/**
* Convert argument to a string
*/
#define DB_STRINGIFY_ARG(arg) #arg
#define DB_STRINGIFY(arg) DB_STRINGIFY_ARG(arg)
/**
* String representing the current code location.
*/
#define DB_STRLOC __FILE__ ":" DB_STRINGIFY(__LINE__)
#endif
| Fix DB_STRINGIFY to indirectly convert arg to a string. | Fix DB_STRINGIFY to indirectly convert arg to a string.
| C | agpl-3.0 | digitalbazaar/monarch,digitalbazaar/monarch,digitalbazaar/monarch,digitalbazaar/monarch,digitalbazaar/monarch |
c888133119dece5f3a60a1f02a8a3c3916898206 | test/Sema/no-format-y2k-turnsoff-format.c | test/Sema/no-format-y2k-turnsoff-format.c | // RUN: %clang_cc1 -verify -fsyntax-only -Wformat -Wno-format-y2k
// rdar://9504680
void foo(const char *, ...) __attribute__((__format__ (__printf__, 1, 2)));
void bar(unsigned int a) {
foo("%s", a); // expected-warning {{format specifies type 'char *' but the argument has type 'unsigned int'}}
}
| // RUN: %clang_cc1 -verify -fsyntax-only -Wformat -Wno-format-y2k %s
// rdar://9504680
void foo(const char *, ...) __attribute__((__format__ (__printf__, 1, 2)));
void bar(unsigned int a) {
foo("%s", a); // expected-warning {{format specifies type 'char *' but the argument has type 'unsigned int'}}
}
| Make this test actually test something | Make this test actually test something
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@164677 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | 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,apple/swift-clang,llvm-mirror/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 |
7bdd3703e4012446a446b66580e66f4fa80db07e | lib/src/clacks-api/clacks.c | lib/src/clacks-api/clacks.c | #include "clacks_common.h"
#include "id_client.h"
#include "TraceMessage.pb-c.h"
#include "../transport-client/cl_transport_domsock_client.h"
#include <stdio.h>
#include "clacks.h"
/* API Back-End */
void _clacks_trace_string_id(char *str, char *id) {
int ret;
TraceMessage t_msg = TRACE_MESSAGE__INIT;
t_msg.act_id = "TEST";
t_msg.msg = str;
t_msg.flags = 0;
ret = send_trace_message(&t_msg);
}
/* API Front-End */
void clacks_trace_string(char *str) {
clacks_trace_string_id(str, "NULLID");
}
void clacks_trace_string_id(char *str, char *id) {
if (str != NULL && id != NULL) {
_clacks_trace_string_id(str, id);
}
}
int clacks_new_id(char *id) {
if (id == NULL) {
return -1;
}
return get_new_id(id);
}
| #include "clacks_common.h"
#include "id_client.h"
#include "TraceMessage.pb-c.h"
#include "../transport-client/cl_transport_domsock_client.h"
#include <stdio.h>
#include "clacks.h"
/* API Back-End */
void _clacks_trace_string_id(char *str, char *id) {
int ret;
TraceMessage t_msg = TRACE_MESSAGE__INIT;
t_msg.act_id = id;
t_msg.msg = str;
t_msg.flags = 0;
ret = send_trace_message(&t_msg);
}
/* API Front-End */
void clacks_trace_string(char *str) {
clacks_trace_string_id(str, "NULLID");
}
void clacks_trace_string_id(char *str, char *id) {
if (str != NULL && id != NULL) {
_clacks_trace_string_id(str, id);
}
}
int clacks_new_id(char *id) {
if (id == NULL) {
return -1;
}
return get_new_id(id);
}
| Set the id for the trace message | Set the id for the trace message
| C | mit | jamessnee/clacks,jamessnee/clacks,jamessnee/clacks |
c6cf5db15afd0d5f702ee9898338070616e567b6 | src/utils/cl_trees.c | src/utils/cl_trees.c | /**
* @file cl_trees.c
* @author Rastislav Szabo <[email protected]>, Lukas Macko <[email protected]>,
* Milan Lenco <[email protected]>
* @brief Iterative tree loading using internal sysrepo requests.
*
* @copyright
* Copyright 2016 Cisco Systems, 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.
*/
#include "sr_common.h"
#include "client_library.h"
#include "sysrepo/trees.h"
#include "trees_internal.h"
sr_node_t *
sr_node_get_child(sr_session_ctx_t *session, sr_node_t *node)
{
int rc = SR_ERR_OK;
if (NULL != node) {
if (NULL != node->first_child && SR_TREE_ITERATOR_T == node->first_child->type) {
rc = sr_get_subtree_next_chunk(session, node);
if (SR_ERR_OK != rc) {
return NULL;
}
}
return node->first_child;
} else {
return NULL;
}
}
sr_node_t *
sr_node_get_next_sibling(sr_session_ctx_t *session, sr_node_t *node)
{
int rc = SR_ERR_OK;
if (NULL != node) {
if (NULL != node->next && SR_TREE_ITERATOR_T == node->next->type) {
rc = sr_get_subtree_next_chunk(session, node->parent);
if (SR_ERR_OK != rc) {
return NULL;
}
}
return node->next;
} else {
return NULL;
}
}
sr_node_t *
sr_node_get_parent(sr_session_ctx_t *session, sr_node_t *node)
{
(void)session;
if (NULL != node) {
return node->parent;
} else {
return NULL;
}
}
| Add forgotten source file cl_test.c | Add forgotten source file cl_test.c
| C | apache-2.0 | rastislavszabo/sysrepo,lukasmacko/sysrepo,rastislavszabo/sysrepo,morganzhh/sysrepo,morganzhh/sysrepo,lukasmacko/sysrepo,fanchanghu/sysrepo,fanchanghu/sysrepo,rastislavszabo/sysrepo,morganzhh/sysrepo,lukasmacko/sysrepo,morganzhh/sysrepo,fanchanghu/sysrepo,fanchanghu/sysrepo,lukasmacko/sysrepo,fanchanghu/sysrepo,morganzhh/sysrepo,lukasmacko/sysrepo,lukasmacko/sysrepo,fanchanghu/sysrepo,fanchanghu/sysrepo,rastislavszabo/sysrepo,rastislavszabo/sysrepo,morganzhh/sysrepo,lukasmacko/sysrepo,rastislavszabo/sysrepo,morganzhh/sysrepo,rastislavszabo/sysrepo |
|
1d6e54c49babe1975a1b6285e8b7f039c04b3ab3 | muduo/base/Atomic.h | muduo/base/Atomic.h | #ifndef MUDUO_BASE_ATOMIC_H
#define MUDUO_BASE_ATOMIC_H
#include <boost/noncopyable.hpp>
namespace muduo
{
class AtomicInt64 : boost::noncopyable
{
public:
AtomicInt64()
: value_(0)
{
}
int64_t get()
{
return value_;
}
int64_t addAndGet(int64_t x)
{
value_ += x;
return value_;
}
int64_t incrementAndGet()
{
return addAndGet(1);
}
int64_t getAndSet(int64_t newValue)
{
int64_t old = value_;
value_ = newValue;
return old;
}
private:
int64_t value_;
};
}
#endif // MUDUO_BASE_ATOMIC_H
| #ifndef MUDUO_BASE_ATOMIC_H
#define MUDUO_BASE_ATOMIC_H
#include <boost/noncopyable.hpp>
namespace muduo
{
class AtomicInt64 : boost::noncopyable
{
public:
AtomicInt64()
: value_(0)
{
}
int64_t get()
{
return value_;
}
int64_t addAndGet(int64_t x)
{
return __sync_add_and_fetch(&value_, x);
}
int64_t incrementAndGet()
{
return addAndGet(1);
}
int64_t getAndSet(int64_t newValue)
{
return __sync_lock_test_and_set(&value_, newValue);
}
private:
volatile int64_t value_;
};
}
#endif // MUDUO_BASE_ATOMIC_H
| Implement atomic integer with gcc builtins. | Implement atomic integer with gcc builtins.
| C | bsd-3-clause | wangweihao/muduo,Cofyc/muduo,jxd134/muduo,shenhzou654321/muduo,floristt/muduo,floristt/muduo,SuperMXC/muduo,Cofyc/muduo,lvshiling/muduo,fc500110/muduo,danny200309/muduo,jerk1991/muduo,lizj3624/http-github.com-chenshuo-muduo-,jxd134/muduo,SourceInsight/muduo,zhuangshi23/muduo,SourceInsight/muduo,devsoulwolf/muduo,shenhzou654321/muduo,KunYi/muduo,devsoulwolf/muduo,lizj3624/muduo,KublaikhanGeek/muduo,DongweiLee/muduo,KingLebron/muduo,KublaikhanGeek/muduo,KingLebron/muduo,danny200309/muduo,yunhappy/muduo,shuang-shuang/muduo,DongweiLee/muduo,mitliucak/muduo,tsh185/muduo,danny200309/muduo,guker/muduo,huan80s/muduo,dhanzhang/muduo,lizj3624/muduo,yunhappy/muduo,floristt/muduo,SourceInsight/muduo,lvmaoxv/muduo,KingLebron/muduo,tsh185/muduo,wangweihao/muduo,lizj3624/http-github.com-chenshuo-muduo-,zhanMingming/muduo,lizj3624/muduo,Cofyc/muduo,ucfree/muduo,decimalbell/muduo,ywy2090/muduo,KingLebron/muduo,xzmagic/muduo,lizj3624/http-github.com-chenshuo-muduo-,wangweihao/muduo,dhanzhang/muduo,dhanzhang/muduo,SuperMXC/muduo,guker/muduo,SourceInsight/muduo,ucfree/muduo,decimalbell/muduo,shenhzou654321/muduo,fc500110/muduo,devsoulwolf/muduo,floristt/muduo,zhuangshi23/muduo,lizj3624/muduo,zxylvlp/muduo,huan80s/muduo,jerk1991/muduo,wangweihao/muduo,mitliucak/muduo,lizj3624/http-github.com-chenshuo-muduo-,lizhanhui/muduo,flyfeifan/muduo,mitliucak/muduo,Cofyc/muduo,Cofyc/muduo,westfly/muduo,xzmagic/muduo,mitliucak/muduo,mitliucak/muduo,decimalbell/muduo,decimalbell/muduo,daodaoliang/muduo,westfly/muduo,penyatree/muduo,devsoulwolf/muduo,danny200309/muduo,penyatree/muduo,wangweihao/muduo,pthreadself/muduo,SuperMXC/muduo,kidzyoung/muduo,pthreadself/muduo,lizj3624/http-github.com-chenshuo-muduo-,lizj3624/muduo,huan80s/muduo,ucfree/muduo,youprofit/muduo,zouzl/muduo-learning,ucfree/muduo,zhanMingming/muduo,daodaoliang/muduo,floristt/muduo,shenhzou654321/muduo,dhanzhang/muduo,KunYi/muduo,june505/muduo,lizhanhui/muduo,decimalbell/muduo,shuang-shuang/muduo,zxylvlp/muduo,dhanzhang/muduo,ywy2090/muduo,youprofit/muduo,june505/muduo,SuperMXC/muduo,zouzl/muduo-learning,danny200309/muduo,devsoulwolf/muduo,flyfeifan/muduo,zhuangshi23/muduo,lvmaoxv/muduo,ucfree/muduo,nestle1998/muduo,zxylvlp/muduo,SuperMXC/muduo,shenhzou654321/muduo,huan80s/muduo,KingLebron/muduo,kidzyoung/muduo,lvshiling/muduo,huan80s/muduo,zouzl/muduo-learning,SourceInsight/muduo,nestle1998/muduo,westfly/muduo |
8127f3a6e6c615856006842cee6df2e13c1ba852 | test/CFrontend/2007-06-18-SextAttrAggregate.c | test/CFrontend/2007-06-18-SextAttrAggregate.c | // RUN: %llvmgcc %s -o - -S -emit-llvm -O3 | grep {i8 signext}
// PR1513
struct s{
long a;
long b;
};
void f(struct s a, char *b, char C) {
}
| // RUN: %llvmgcc %s -o - -S -emit-llvm -O3 | grep {i8 signext}
// PR1513
struct s{
long a;
long b;
};
void f(struct s a, char *b, signed char C) {
}
| Make this explictly signed. Fixes PR1571. | Make this explictly signed. Fixes PR1571.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@40569 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,GPUOpen-Drivers/llvm,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,dslab-epfl/asap,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,llvm-mirror/llvm,dslab-epfl/asap,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,dslab-epfl/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,apple/swift-llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,apple/swift-llvm |
b89efa2cd07719696316128da95a2c56088141e1 | Core/DataStructures/mitkVideoSource.h | Core/DataStructures/mitkVideoSource.h | #ifndef _mitk_Video_Source_h_
#define _mitk_Video_Source_h_
#include "mitkCommon.h"
#include <itkObject.h>
#include "itkObjectFactory.h"
namespace mitk
{
/**
* Simple base class for acquiring video data.
*/
class VideoSource //: public itk::Object
{
public:
//mitkClassMacro( VideoSource, itk::Object );
//itkNewMacro( Self );
VideoSource();
virtual ~VideoSource();
////##Documentation
////## @brief assigns the grabbing devices for acquiring the next frame.
virtual void FetchFrame();
////##Documentation
////## @brief returns a pointer to the image data array for opengl rendering.
virtual unsigned char * GetVideoTexture();
////##Documentation
////## @brief starts the video capturing.
virtual void StartCapturing();
////##Documentation
////## @brief stops the video capturing.
virtual void StopCapturing();
////##Documentation
////## @brief returns true if video capturing is active.
bool IsCapturingEnabled();
protected:
unsigned char * m_CurrentVideoTexture;
int m_CaptureWidth, m_CaptureHeight;
bool m_CapturingInProcess;
};
}
#endif // Header | #ifndef _mitk_Video_Source_h_
#define _mitk_Video_Source_h_
#include "mitkCommon.h"
#include <itkObject.h>
#include "itkObjectFactory.h"
namespace mitk
{
/**
* Simple base class for acquiring video data.
*/
class VideoSource //: public itk::Object
{
public:
//mitkClassMacro( VideoSource, itk::Object );
//itkNewMacro( Self );
VideoSource();
virtual ~VideoSource();
////##Documentation
////## @brief assigns the grabbing devices for acquiring the next frame.
virtual void FetchFrame();
////##Documentation
////## @brief returns a pointer to the image data array for opengl rendering.
virtual unsigned char * GetVideoTexture();
////##Documentation
////## @brief starts the video capturing.
virtual void StartCapturing();
////##Documentation
////## @brief stops the video capturing.
virtual void StopCapturing();
////##Documentation
////## @brief returns true if video capturing is active.
bool IsCapturingEnabled();
protected:
unsigned char * m_CurrentVideoTexture;
int m_CaptureWidth, m_CaptureHeight;
bool m_CapturingInProcess;
};
}
#endif // Header
| FIX warnings: newline at end of file | FIX warnings: newline at end of file
| C | bsd-3-clause | fmilano/mitk,danielknorr/MITK,lsanzdiaz/MITK-BiiG,danielknorr/MITK,nocnokneo/MITK,NifTK/MITK,fmilano/mitk,lsanzdiaz/MITK-BiiG,MITK/MITK,rfloca/MITK,danielknorr/MITK,iwegner/MITK,fmilano/mitk,lsanzdiaz/MITK-BiiG,iwegner/MITK,danielknorr/MITK,lsanzdiaz/MITK-BiiG,fmilano/mitk,MITK/MITK,fmilano/mitk,rfloca/MITK,fmilano/mitk,nocnokneo/MITK,NifTK/MITK,NifTK/MITK,nocnokneo/MITK,fmilano/mitk,lsanzdiaz/MITK-BiiG,nocnokneo/MITK,iwegner/MITK,nocnokneo/MITK,MITK/MITK,nocnokneo/MITK,nocnokneo/MITK,NifTK/MITK,MITK/MITK,MITK/MITK,iwegner/MITK,iwegner/MITK,NifTK/MITK,lsanzdiaz/MITK-BiiG,RabadanLab/MITKats,rfloca/MITK,RabadanLab/MITKats,RabadanLab/MITKats,iwegner/MITK,NifTK/MITK,rfloca/MITK,MITK/MITK,rfloca/MITK,rfloca/MITK,RabadanLab/MITKats,lsanzdiaz/MITK-BiiG,lsanzdiaz/MITK-BiiG,danielknorr/MITK,RabadanLab/MITKats,danielknorr/MITK,rfloca/MITK,RabadanLab/MITKats,danielknorr/MITK |
e434cc2a4d7de10c15ecf18ba27be5819e247910 | include/llvm/Option/OptSpecifier.h | include/llvm/Option/OptSpecifier.h | //===--- OptSpecifier.h - Option Specifiers ---------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_OPTION_OPTSPECIFIER_H
#define LLVM_OPTION_OPTSPECIFIER_H
namespace llvm {
namespace opt {
class Option;
/// OptSpecifier - Wrapper class for abstracting references to option IDs.
class OptSpecifier {
unsigned ID;
private:
explicit OptSpecifier(bool) LLVM_DELETED_FUNCTION;
public:
OptSpecifier() : ID(0) {}
/*implicit*/ OptSpecifier(unsigned _ID) : ID(_ID) {}
/*implicit*/ OptSpecifier(const Option *Opt);
bool isValid() const { return ID != 0; }
unsigned getID() const { return ID; }
bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); }
bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); }
};
}
}
#endif
| //===--- OptSpecifier.h - Option Specifiers ---------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_OPTION_OPTSPECIFIER_H
#define LLVM_OPTION_OPTSPECIFIER_H
#include "llvm/Support/Compiler.h"
namespace llvm {
namespace opt {
class Option;
/// OptSpecifier - Wrapper class for abstracting references to option IDs.
class OptSpecifier {
unsigned ID;
private:
explicit OptSpecifier(bool) LLVM_DELETED_FUNCTION;
public:
OptSpecifier() : ID(0) {}
/*implicit*/ OptSpecifier(unsigned _ID) : ID(_ID) {}
/*implicit*/ OptSpecifier(const Option *Opt);
bool isValid() const { return ID != 0; }
unsigned getID() const { return ID; }
bool operator==(OptSpecifier Opt) const { return ID == Opt.getID(); }
bool operator!=(OptSpecifier Opt) const { return !(*this == Opt); }
};
}
}
#endif
| Add missing include, found by modules build. | Add missing include, found by modules build.
git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@207158 91177308-0d34-0410-b5e6-96231b3b80d8
| C | bsd-2-clause | chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,apple/swift-llvm,apple/swift-llvm,dslab-epfl/asap,llvm-mirror/llvm,apple/swift-llvm,dslab-epfl/asap,GPUOpen-Drivers/llvm,dslab-epfl/asap,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,apple/swift-llvm,llvm-mirror/llvm,dslab-epfl/asap,apple/swift-llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,GPUOpen-Drivers/llvm,dslab-epfl/asap,apple/swift-llvm,chubbymaggie/asap,chubbymaggie/asap,GPUOpen-Drivers/llvm,chubbymaggie/asap,GPUOpen-Drivers/llvm,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap,llvm-mirror/llvm,GPUOpen-Drivers/llvm,chubbymaggie/asap |
baa4007881f894ff8c0a04b71002d53f4fe9572a | kernel/x86/tests/lock.c | kernel/x86/tests/lock.c | #include <kernel/x86/lock.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
static volatile int counter;
static mutex_t lock;
void *do_thread(void *arg) {
int sign = (int)arg;
for(int i = 0; i < 100000; i++) {
wait_aquire(&lock);
counter += sign;
release(&lock);
}
return NULL;
}
void panic(char *s) {
fprintf(stderr, "%s\n", s);
exit(1);
}
int main(void) {
pthread_t incr, decr;
pthread_create(&incr, NULL, do_thread, (void *)1);
pthread_create(&decr, NULL, do_thread, (void *)-1);
pthread_join(incr, NULL);
pthread_join(decr, NULL);
if(counter != 0) {
panic("Counter is non-zero!");
}
return 0;
}
| #include <kernel/arch/lock.h>
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <pthread.h>
static volatile int counter;
static mutex_t lock;
void *do_thread(void *arg) {
int sign = (int)arg;
for(int i = 0; i < 100000; i++) {
wait_aquire(&lock);
counter += sign;
release(&lock);
}
return NULL;
}
void panic(char *s) {
fprintf(stderr, "%s\n", s);
exit(1);
}
int main(void) {
pthread_t incr, decr;
pthread_create(&incr, NULL, do_thread, (void *)1);
pthread_create(&decr, NULL, do_thread, (void *)-1);
pthread_join(incr, NULL);
pthread_join(decr, NULL);
if(counter != 0) {
panic("Counter is non-zero!");
}
return 0;
}
| Fix bitrotted include in test | Fix bitrotted include in test
| C | isc | zenhack/zero,zenhack/zero,zenhack/zero |
058e1d58e49a2635fa649114f58d66ac4580ba1d | hw/mcu/native/src/hal_gpio.c | hw/mcu/native/src/hal_gpio.c | /**
* Copyright (c) 2015 Runtime 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.
*/
#include "hal/hal_gpio.h"
#include <stdio.h>
#define HAL_GPIO_NUM_PINS 8
static struct {
int val;
enum {
INPUT,
OUTPUT
} dir;
} hal_gpio[HAL_GPIO_NUM_PINS];
int
gpio_init_in(int pin, gpio_pull_t pull)
{
if (pin >= HAL_GPIO_NUM_PINS) {
return -1;
}
hal_gpio[pin].dir = INPUT;
switch (pull) {
case GPIO_PULL_UP:
hal_gpio[pin].val = 1;
break;
default:
hal_gpio[pin].val = 0;
break;
}
return 0;
}
int
gpio_init_out(int pin, int val)
{
if (pin >= HAL_GPIO_NUM_PINS) {
return -1;
}
hal_gpio[pin].dir = OUTPUT;
hal_gpio[pin].val = (val != 0);
return 0;
}
void
gpio_set(int pin)
{
gpio_write(pin, 1);
}
void
gpio_clear(int pin)
{
gpio_write(pin, 0);
}
void gpio_write(int pin, int val)
{
if (pin >= HAL_GPIO_NUM_PINS) {
return;
}
if (hal_gpio[pin].dir != OUTPUT) {
return;
}
hal_gpio[pin].val = (val != 0);
printf("GPIO %d is now %d\n", pin, val);
}
int
gpio_read(int pin)
{
if (pin >= HAL_GPIO_NUM_PINS) {
return -1;
}
return hal_gpio[pin].val;
}
void
gpio_toggle(int pin)
{
gpio_write(pin, gpio_read(pin) != 1);
}
| Add GPIO hal for simulator. | Add GPIO hal for simulator.
| C | apache-2.0 | andrzej-kaczmarek/incubator-mynewt-core,wes3/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,mlaz/mynewt-core,wes3/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,mlaz/mynewt-core,wes3/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core,IMGJulian/incubator-mynewt-core,mlaz/mynewt-core,wes3/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,mlaz/mynewt-core,andrzej-kaczmarek/apache-mynewt-core,mlaz/mynewt-core,wes3/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core,IMGJulian/incubator-mynewt-core,IMGJulian/incubator-mynewt-core,andrzej-kaczmarek/incubator-mynewt-core,andrzej-kaczmarek/apache-mynewt-core |
|
84e98bde6e98ab033b63393efc2741e260a63253 | include/lldb/Host/PosixApi.h | include/lldb/Host/PosixApi.h | //===-- PosixApi.h ----------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_Host_PosixApi_h
#define liblldb_Host_PosixApi_h
// This file defines platform specific functions, macros, and types necessary
// to provide a minimum level of compatibility across all platforms to rely
// on various posix api functionality.
#include "llvm/Support/Compiler.h"
#if defined(LLVM_ON_WIN32)
#include "lldb/Host/windows/PosixApi.h"
#endif
#endif | //===-- PosixApi.h ----------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
#ifndef liblldb_Host_PosixApi_h
#define liblldb_Host_PosixApi_h
// This file defines platform specific functions, macros, and types necessary
// to provide a minimum level of compatibility across all platforms to rely
// on various posix api functionality.
#include "llvm/Support/Compiler.h"
#if defined(LLVM_ON_WIN32)
#include "lldb/Host/windows/PosixApi.h"
#endif
#endif
| Add a newline to the end of the file to remove the clang warnings. | Add a newline to the end of the file to remove the clang warnings.
git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@278188 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/lldb,apple/swift-lldb,llvm-mirror/lldb,llvm-mirror/lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,llvm-mirror/lldb,apple/swift-lldb,apple/swift-lldb,apple/swift-lldb |
0b7aa15019283753a620c908deea7bab4da1f94d | libcassandra/util/platform.h | libcassandra/util/platform.h | /*
* LibCassandra
* Copyright (C) 2010-2011 Padraig O'Sullivan, Ewen Cheslack-Postava
* All rights reserved.
*
* Use and distribution licensed under the BSD license. See
* the COPYING file in the parent directory for full text.
*/
#ifndef __LIBCASSANDRA_UTIL_PLATFORM_H
#define __LIBCASSANDRA_UTIL_PLATFORM_H
#include <boost/tr1/memory.hpp>
#include <boost/tr1/tuple.hpp>
#include <boost/tr1/unordered_map.hpp>
#include <string>
#include <vector>
#include <map>
#include <set>
#endif //__LIBCASSANDRA_UTIL_PLATFORM_H
| /*
* LibCassandra
* Copyright (C) 2010-2011 Padraig O'Sullivan, Ewen Cheslack-Postava
* All rights reserved.
*
* Use and distribution licensed under the BSD license. See
* the COPYING file in the parent directory for full text.
*/
#ifndef __LIBCASSANDRA_UTIL_PLATFORM_H
#define __LIBCASSANDRA_UTIL_PLATFORM_H
#ifdef __GNUC__
// #include_next is broken: it does not search default include paths!
#define BOOST_TR1_DISABLE_INCLUDE_NEXT
// config_all.hpp reads this variable, then sets BOOST_HAS_INCLUDE_NEXT anyway
#include <boost/tr1/detail/config_all.hpp>
#ifdef BOOST_HAS_INCLUDE_NEXT
// This behavior has existed since boost 1.34, unlikely to change.
#undef BOOST_HAS_INCLUDE_NEXT
#endif
#endif
#endif
#include <boost/tr1/memory.hpp>
#include <boost/tr1/tuple.hpp>
#include <boost/tr1/unordered_map.hpp>
#include <string>
#include <vector>
#include <map>
#include <set>
#endif //__LIBCASSANDRA_UTIL_PLATFORM_H
| Disable boost's include_next functionality, fixes compatibility with Sirikata. | Disable boost's include_next functionality, fixes compatibility with Sirikata.
| C | bsd-3-clause | xiaozhou/libcassandra,xiaozhou/libcassandra,xiaozhou/libcassandra,xiaozhou/libcassandra |
3c409aa80a2d40b21277cdbddf879a376814e315 | src/config_traits.h | src/config_traits.h | #include <type_traits>
template<typename T>
struct is_config_type:std::integral_constant<bool,false>{};
template<> struct is_config_type <bool>: std::integral_constant<bool,true>{};
template<> struct is_config_type <int>: std::integral_constant<bool,true>{};
template<> struct is_config_type <long>: std::integral_constant<bool,true>{};
template<> struct is_config_type <long long>: std::integral_constant<bool,true>{};
template<> struct is_config_type <unsigned int>: std::integral_constant<bool,true>{};
template<> struct is_config_type <unsigned long>: std::integral_constant<bool,true>{};
template<> struct is_config_type <unsigned long long>: std::integral_constant<bool,true>{};
template<> struct is_config_type <float>: std::integral_constant<bool,true>{};
template<> struct is_config_type <double>: std::integral_constant<bool,true>{};
template<> struct is_config_type <long double>: std::integral_constant<bool,true>{};
template<> struct is_config_type <std::string>: std::integral_constant<bool,true>{};
| #include <type_traits>
template<typename T>
struct is_config_type: std::false_type{};
template<> struct is_config_type <bool>: std::true_type{};
template<> struct is_config_type <int>: std::true_type{};
template<> struct is_config_type <long>: std::true_type{};
template<> struct is_config_type <long long>: std::true_type{};
template<> struct is_config_type <unsigned int>: std::true_type{};
template<> struct is_config_type <unsigned long>: std::true_type{};
template<> struct is_config_type <unsigned long long>: std::true_type{};
template<> struct is_config_type <float>: std::true_type{};
template<> struct is_config_type <double>: std::true_type{};
template<> struct is_config_type <long double>: std::true_type{};
template<> struct is_config_type <std::string>: std::true_type{};
| Change integral_constant<bool> to true_type and false_type. | Change integral_constant<bool> to true_type and false_type.
| C | mit | actinium/cppConfig |
588dcc093d81a4acfac699195641dfa26571d2a1 | 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 95
#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 96
#endif
| Update Skia milestone to 96 | Update Skia milestone to 96
Change-Id: I635df8267340a9068b80a2e6c001958cfb2d10e4
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/447578
Reviewed-by: Heather Miller <[email protected]>
Reviewed-by: Eric Boren <[email protected]>
Auto-Submit: Heather Miller <[email protected]>
Commit-Queue: Eric Boren <[email protected]>
| C | bsd-3-clause | google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,google/skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,google/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia |
7d8b06f783652f8464b9985d07a0c9ba2ce4e202 | 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 66
#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 67
#endif
| Update Skia milestone to 67 | Update Skia milestone to 67
TBR: reed
Bug: skia:
Change-Id: I11a5515c41d5bb7ed95294fdb63668c35d14d960
Reviewed-on: https://skia-review.googlesource.com/111326
Reviewed-by: Heather Miller <[email protected]>
| C | bsd-3-clause | google/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,HalCanary/skia-hc,google/skia,rubenvb/skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,google/skia,google/skia,Hikari-no-Tenshi/android_external_skia,google/skia,rubenvb/skia,HalCanary/skia-hc,google/skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,rubenvb/skia,HalCanary/skia-hc,rubenvb/skia,google/skia,HalCanary/skia-hc,HalCanary/skia-hc,google/skia,rubenvb/skia,aosp-mirror/platform_external_skia,aosp-mirror/platform_external_skia,google/skia,Hikari-no-Tenshi/android_external_skia,Hikari-no-Tenshi/android_external_skia,rubenvb/skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia,HalCanary/skia-hc,HalCanary/skia-hc,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,google/skia,aosp-mirror/platform_external_skia,Hikari-no-Tenshi/android_external_skia,aosp-mirror/platform_external_skia,HalCanary/skia-hc,aosp-mirror/platform_external_skia,HalCanary/skia-hc,rubenvb/skia |
1dfa8ad98b49171049e224a2fe2a33176c6bf779 | include/sigar_visibility.h | include/sigar_visibility.h | /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2013 Couchbase, 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 SIGAR_VISIBILITY_H
#define SIGAR_VISIBILITY_H 1
#ifdef BUILDING_SIGAR
#if defined (__SUNPRO_C) && (__SUNPRO_C >= 0x550)
#define SIGAR_PUBLIC_API __global
#elif defined __GNUC__
#define SIGAR_PUBLIC_API __attribute__ ((visibility("default")))
#elif defined(_MSC_VER)
#define SIGAR_PUBLIC_API __declspec(dllexport)
#else
/* unknown compiler */
#define SIGAR_PUBLIC_API
#endif
#else
#if defined(_MSC_VER)
#define SIGAR_PUBLIC_API __declspec(dllimport)
#else
#define SIGAR_PUBLIC_API
#endif
#endif
#endif /* SIGAR_VISIBILITY_H */
| /* -*- Mode: C; tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
* Copyright 2013 Couchbase, 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.
*/
#pragma once
#ifdef BUILDING_SIGAR
#if defined(__GNUC__)
#define SIGAR_PUBLIC_API __attribute__ ((visibility("default")))
#elif defined(_MSC_VER)
#define SIGAR_PUBLIC_API __declspec(dllexport)
#else
/* unknown compiler */
#define SIGAR_PUBLIC_API
#endif
#else
#if defined(_MSC_VER)
#define SIGAR_PUBLIC_API __declspec(dllimport)
#else
#define SIGAR_PUBLIC_API
#endif
#endif
| Remove support for Sun Studio compiler | Remove support for Sun Studio compiler
Change-Id: I7fb2ac0cd9942fad79eb874604dc48e02a0d01db
Reviewed-on: https://review.couchbase.org/c/sigar/+/166582
Tested-by: Build Bot <[email protected]>
Reviewed-by: Paolo Cocchi <[email protected]>
| C | apache-2.0 | couchbase/sigar,couchbase/sigar |
4d3b0456778961c5a8af919a7c1fcf60a8658bf4 | kernel/kernel/resourceManager.c | kernel/kernel/resourceManager.c | #include "resourceManager.h"
#include "kernelHeap.h"
//allocates frames
MemoryResource *create_memoryResource(unsigned int size)
{
MemoryResource *memRes;
memRes = kmalloc(sizeof(MemoryResource));
return memRes;
} | #include "resourceManager.h"
#include "kernelHeap.h"
//allocates frames
MemoryResource *create_memoryResource(unsigned int size)
{
MemoryResource *memRes;
memRes = (MemoryResource*)kmalloc(sizeof(MemoryResource));
return memRes;
}
| Use type casts from void | Use type casts from void
| C | mit | povilasb/simple-os,povilasb/simple-os |
59f7cc058f7d810cd161b21cbff526f0378a61df | mechanical/kelvin-params.c | mechanical/kelvin-params.c | #include "matrix.h"
#include <stdio.h>
enum datacols {
_M = 1,
_J0 = 2,
_J1 = 3,
_J2 = 5,
_TAU1 = 4,
_TAU2 = 6
};
double CreepLookup(char *file, double T, double M, int param)
{
int i = 0;
double M0, M1, y0, y1;
matrix *data;
data = mtxloadcsv(file, 1);
while(val(data, i, _M) < M)
i++;
M0 = val(data, i-1, _M);
M1 = val(data, i, _M);
y0 = val(data, i-1, param);
y1 = val(data, i, param);
DestroyMatrix(data);
return y0 + (y1 - y0) * (M-M0)/(M1-M0);
}
double CreepLookupJ0(char *f, double T, double M)
{ return CreepLookup(f, T, M, _J0); }
double CreepLookupJ1(char *f, double T, double M)
{ return CreepLookup(f, T, M, _J1); }
double CreepLookupJ2(char *f, double T, double M)
{ return CreepLookup(f, T, M, _J2); }
double CreepLookupTau1(char *f, double T, double M)
{ return CreepLookup(f, T, M, _TAU1); }
double CreepLookupTau2(char *f, double T, double M)
{ return CreepLookup(f, T, M, _TAU2); }
| Add functions for linear interpolation of creep function parameters. | Add functions for linear interpolation of creep function parameters.
| C | bsd-3-clause | mirrorscotty/material-data |
|
4c7c2cb4711297c1e5eefad723ab3b1db27d1614 | include/parrot/stacks.h | include/parrot/stacks.h | /* stacks.h
* Copyright: (When this is determined...it will go here)
* CVS Info
* $Id$
* Overview:
* Stack handling routines for Parrot
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#if !defined(PARROT_STACKS_H_GUARD)
#define PARROT_STACKS_H_GUARD
#include "parrot/parrot.h"
#define STACK_CHUNK_DEPTH 256
struct Stack_Entry {
INTVAL entry_type;
INTVAL flags;
void (*cleanup)(struct Stack_Entry *);
union {
FLOATVAL num_val;
INTVAL int_val;
PMC *pmc_val;
STRING *string_val;
void *generic_pointer;
} entry;
};
struct Stack {
INTVAL used;
INTVAL free;
struct StackChunk *next;
struct StackChunk *prev;
struct Stack_Entry entry[STACK_CHUNK_DEPTH];
};
struct Stack_Entry *push_generic_entry(struct Perl_Interp *, void *thing, INTVAL type, void *cleanup);
void *pop_generic_entry(struct Perl_Interp *, void *where, INTVAL type);
void toss_geleric_entry(struct Perl_Interp *, INTVAL type);
#endif
/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* vim: expandtab shiftwidth=4:
*/
| /* stacks.h
* Copyright: (When this is determined...it will go here)
* CVS Info
* $Id$
* Overview:
* Stack handling routines for Parrot
* Data Structure and Algorithms:
* History:
* Notes:
* References:
*/
#if !defined(PARROT_STACKS_H_GUARD)
#define PARROT_STACKS_H_GUARD
#include "parrot/parrot.h"
#define STACK_CHUNK_DEPTH 256
struct Stack_Entry {
INTVAL entry_type;
INTVAL flags;
void (*cleanup)(struct Stack_Entry *);
union {
FLOATVAL num_val;
INTVAL int_val;
PMC *pmc_val;
STRING *string_val;
void *generic_pointer;
} entry;
};
struct Stack {
INTVAL used;
INTVAL free;
struct StackChunk *next;
struct StackChunk *prev;
struct Stack_Entry entry[STACK_CHUNK_DEPTH];
};
struct Stack_Entry *push_generic_entry(struct Perl_Interp *, void *thing, INTVAL type, void *cleanup);
void *pop_generic_entry(struct Perl_Interp *, void *where, INTVAL type);
void toss_generic_entry(struct Perl_Interp *, INTVAL type);
#endif
/*
* Local variables:
* c-indentation-style: bsd
* c-basic-offset: 4
* indent-tabs-mode: nil
* End:
*
* vim: expandtab shiftwidth=4:
*/
| Fix typo in function name | Fix typo in function name
git-svn-id: 6e74a02f85675cec270f5d931b0f6998666294a3@255 d31e2699-5ff4-0310-a27c-f18f2fbe73fe
| C | artistic-2.0 | ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot,ashgti/parrot |
8d8fbf94c3fc783a1becafb9efa6db8f4d0985f1 | ext/mysql2/mysql2_ext.h | ext/mysql2/mysql2_ext.h | #ifndef MYSQL2_EXT
#define MYSQL2_EXT
void Init_mysql2(void);
/* tell rbx not to use it's caching compat layer
by doing this we're making a promise to RBX that
we'll never modify the pointers we get back from RSTRING_PTR */
#define RSTRING_NOT_MODIFIED
#include <ruby.h>
#ifdef HAVE_MYSQL_H
#include <mysql.h>
#include <mysql_com.h>
#include <errmsg.h>
#include <mysqld_error.h>
#else
#include <mysql/mysql.h>
#include <mysql/mysql_com.h>
#include <mysql/errmsg.h>
#include <mysql/mysqld_error.h>
#endif
#ifdef HAVE_RUBY_ENCODING_H
#include <ruby/encoding.h>
#endif
#ifdef HAVE_RUBY_THREAD_H
#include <ruby/thread.h>
#endif
#if defined(__GNUC__) && (__GNUC__ >= 3)
#define RB_MYSQL_NORETURN __attribute__ ((noreturn))
#define RB_MYSQL_UNUSED __attribute__ ((unused))
#else
#define RB_MYSQL_NORETURN
#define RB_MYSQL_UNUSED
#endif
#include <client.h>
#include <statement.h>
#include <result.h>
#include <infile.h>
#endif
| #ifndef MYSQL2_EXT
#define MYSQL2_EXT
void Init_mysql2(void);
/* tell rbx not to use it's caching compat layer
by doing this we're making a promise to RBX that
we'll never modify the pointers we get back from RSTRING_PTR */
#define RSTRING_NOT_MODIFIED
#include <ruby.h>
#ifdef HAVE_MYSQL_H
#include <mysql.h>
#include <errmsg.h>
#include <mysqld_error.h>
#else
#include <mysql/mysql.h>
#include <mysql/errmsg.h>
#include <mysql/mysqld_error.h>
#endif
#ifdef HAVE_RUBY_ENCODING_H
#include <ruby/encoding.h>
#endif
#ifdef HAVE_RUBY_THREAD_H
#include <ruby/thread.h>
#endif
#if defined(__GNUC__) && (__GNUC__ >= 3)
#define RB_MYSQL_NORETURN __attribute__ ((noreturn))
#define RB_MYSQL_UNUSED __attribute__ ((unused))
#else
#define RB_MYSQL_NORETURN
#define RB_MYSQL_UNUSED
#endif
#include <client.h>
#include <statement.h>
#include <result.h>
#include <infile.h>
#endif
| Include mysql_com.h has been here for ages but was superfluous | Include mysql_com.h has been here for ages but was superfluous
| C | mit | kamipo/mysql2,kamipo/mysql2,sodabrew/mysql2,sodabrew/mysql2,tamird/mysql2,jeremy/mysql2,brianmario/mysql2,jeremy/mysql2,bigcartel/mysql2,brianmario/mysql2,tamird/mysql2,jeremy/mysql2,kamipo/mysql2,brianmario/mysql2,kamipo/mysql2,tamird/mysql2,sodabrew/mysql2,bigcartel/mysql2,bigcartel/mysql2,tamird/mysql2,bigcartel/mysql2 |
89826f41bd5c96e6b13692d03d08049c912b9365 | cat.c | cat.c | #include "types.h"
#include "stat.h"
#include "user.h"
char buf[512];
void
cat(int fd)
{
int n;
while((n = read(fd, buf, sizeof(buf))) > 0)
write(1, buf, n);
if(n < 0){
printf(1, "cat: read error\n");
exit();
}
}
int
main(int argc, char *argv[])
{
int fd, i;
if(argc <= 1){
cat(0);
exit();
}
for(i = 1; i < argc; i++){
if((fd = open(argv[i], 0)) < 0){
printf(1, "cat: cannot open %s\n", argv[i]);
exit();
}
cat(fd);
close(fd);
}
exit();
}
| #include "types.h"
#include "stat.h"
#include "user.h"
char buf[512];
void
cat(int fd)
{
int n;
while((n = read(fd, buf, sizeof(buf))) > 0) {
if (write(1, buf, n) != n) {
printf(1, "cat: write error\n");
exit();
}
}
if(n < 0){
printf(1, "cat: read error\n");
exit();
}
}
int
main(int argc, char *argv[])
{
int fd, i;
if(argc <= 1){
cat(0);
exit();
}
for(i = 1; i < argc; i++){
if((fd = open(argv[i], 0)) < 0){
printf(1, "cat: cannot open %s\n", argv[i]);
exit();
}
cat(fd);
close(fd);
}
exit();
}
| Check result of write (thans to Alexander Kapshuk <alexander.kapshuk@gmail) | Check result of write (thans to Alexander Kapshuk <alexander.kapshuk@gmail)
| C | mit | shyandsy/xv6,shyandsy/xv6,shyandsy/xv6,ManaPoustizadeh/OS-finalProject,shyandsy/xv6,ManaPoustizadeh/OS-finalProject,gw/xv6,phf/xv6-public,voytovichs/xv6-public,voytovichs/xv6-public,ManaPoustizadeh/OS-finalProject,voytovichs/xv6-public,gw/xv6,phf/xv6-public,voytovichs/xv6-public,voytovichs/xv6-public,phf/xv6-public,phf/xv6-public,ManaPoustizadeh/OS-finalProject,gw/xv6,gw/xv6,gw/xv6,shyandsy/xv6 |
84fa2ddd969525d8d92329bda9e9b9457ebc3ddd | mach.c | mach.c | #define WORD (8 * sizeof(ulong))
#define clz(x) __builtin_clzl(x)
#define fls(x) (WORD - clz(x))
#define ffs(x) (__builtin_ctzl(x))
#define get(x, i) ((x) & (1 << (i)))
#define set(x, i) (x = (x) | (1 << (i)))
#define unset(x, i) (x = (x) & ~(1 << (i)))
| #define WORD (8 * sizeof(ulong))
#define clz(x) __builtin_clzl(x)
#define fls(x) (WORD - clz(x))
#define ffs(x) (__builtin_ctzl(x))
#define get(x, i) ((x) & (1L << (i)))
#define set(x, i) (x = (x) | (1L << (i)))
#define unset(x, i) (x = (x) & ~(1L << (i)))
| Fix to literal data types in the macros | Fix to literal data types in the macros
Thanks for Fu, Bing for noting.
| C | mit | coriolanus/libhhash |
8c6b30c2bdbdca9d78fcd7a4cde15e5aa6802029 | safe.h | safe.h | #ifndef SAFE_H
#define SAFE_H
#include "debug.h"
#ifndef DISABLE_SAFE
#define SAFE_STRINGIFY(x) #x
#define SAFE_TOSTRING(x) SAFE_STRINGIFY(x)
#define SAFE_AT __FILE__ ":" SAFE_TOSTRING(__LINE__) ": "
#define SAFE_ASSERT(cond) do { \
if (!(cond)) { \
DEBUG_DUMP(0, "error: " SAFE_AT "%m"); \
DEBUG_BREAK(!(cond)); \
} \
} while (0)
#else
#define SAFE_ASSERT(...)
#endif
#include <stdint.h>
#define SAFE_NNCALL(call) do { \
intptr_t ret = (intptr_t) (call); \
SAFE_ASSERT(ret >= 0); \
} while (0)
#define SAFE_NZCALL(call) do { \
intptr_t ret = (intptr_t) (call); \
SAFE_ASSERT(ret != 0); \
} while (0)
#endif /* end of include guard: SAFE_H */
| #ifndef SAFE_H
#define SAFE_H
#include "debug.h"
#ifndef DISABLE_SAFE
#define SAFE_STRINGIFY(x) #x
#define SAFE_TOSTRING(x) SAFE_STRINGIFY(x)
#define SAFE_AT __FILE__ ":" SAFE_TOSTRING(__LINE__) ": "
#define SAFE_ASSERT(cond) do { \
if (!(cond)) { \
DEBUG_DUMP(0, "error: " SAFE_AT "%m"); \
DEBUG_BREAK(!(cond)); \
} \
} while (0)
#else
#define SAFE_ASSERT(...)
#endif
#include <stdint.h>
#define SAFE_NNCALL(call) do { \
intptr_t ret = (intptr_t) (call); \
SAFE_ASSERT(ret >= 0); \
} while (0)
#define SAFE_NZCALL(call) do { \
intptr_t ret = (intptr_t) (call); \
SAFE_ASSERT(ret != 0); \
} while (0)
#define SAFE_RZCALL(call) do { \
intptr_t ret = (intptr_t) (call); \
SAFE_ASSERT(ret == 0); \
} while (0)
#endif /* end of include guard: SAFE_H */
| Add SAFE_RZCALL to wrap calls that returns zero. | Add SAFE_RZCALL to wrap calls that returns zero.
| C | mit | chaoran/fibril,chaoran/fibril,chaoran/fibril |
6868d0ea1dceb593d56d2302a46849791d3f2164 | Include/Protocol/DarwinKernel.h | Include/Protocol/DarwinKernel.h | /** @file
Copyright (C) 2016 CupertinoNet. All rights reserved.<BR>
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 DARWIN_KERNEL_H_
#define DARWIN_KERNEL_H_
// Related definitions
// DARWIN_KERNEL_IMAGE_TYPE
enum {
DarwinKernelImageTypeMacho = 0,
DarwinKernelImageTypeHibernation = 1
};
typedef UINTN DARWIN_KERNEL_IMAGE_TYPE;
// DARWIN_KERNEL_HEADER
typedef union {
MACH_HEADER *MachHeader;
MACH_HEADER_64 *MachHeader64;
IO_HIBERNATE_IMAGE_HEADER *HibernationImageHeader;
} DARWIN_KERNEL_HEADER;
// DARWIN_KERNEL_INFORMATION
typedef struct {
DARWIN_KERNEL_IMAGE_TYPE ImageType;
DARWIN_KERNEL_HEADER Image;
} DARWIN_KERNEL_INFORMATION;
// DARWIN_KERNEL_DISCOVERED_CALLBACK
typedef
VOID
(EFIAPI *DARWIN_KERNEL_DISCOVERED_CALLBACK)(
IN XNU_PHYSICAL_ADDRESS KernelEntry
);
// DARWIN_KERNEL_ENTRY_CALLBACK
typedef
VOID
(EFIAPI *DARWIN_KERNEL_ENTRY_CALLBACK)(
VOID
);
// Protocol definition
typedef DARWIN_KERNEL_PROTOCOL DARWIN_KERNEL_PROTOCOL;
// DARWIN_KERNEL_ADD_KERNEL_DISCOVERED_CALLBACK
typedef
EFI_STATUS
(EFIAPI *DARWIN_KERNEL_ADD_KERNEL_DISCOVERED_CALLBACK)(
IN DARWIN_KERNEL_PROTOCOL *This,
IN DARWIN_KERNEL_DISCOVERED_CALLBACK NotifyFunction
);
// DARWIN_KERNEL_ADD_KERNEL_ENTRY_CALLBACK
typedef
EFI_STATUS
(EFIAPI *DARWIN_KERNEL_ADD_KERNEL_ENTRY_CALLBACK)(
IN DARWIN_KERNEL_PROTOCOL *This,
IN DARWIN_KERNEL_ENTRY_CALLBACK NotifyFunction
);
// DARWIN_KERNEL_GET_IMAGE_INFORMATION
typedef
EFI_STATUS
(EFIAPI *DARWIN_KERNEL_GET_IMAGE_INFORMATION)(
IN DARWIN_KERNEL_PROTOCOL *This,
OUT DARWIN_KERNEL_INFORMATION *KernelInformation
);
// DARWIN_KERNEL_PROTOCOL
struct DARWIN_KERNEL_PROTOCOL {
UINTN Revision;
DARWIN_KERNEL_ADD_KERNEL_DISCOVERED_CALLBACK AddKernelDiscoveredCallback;
DARWIN_KERNEL_ADD_KERNEL_ENTRY_CALLBACK AddKernelEntryCallback;
DARWIN_KERNEL_GET_IMAGE_INFORMATION GetImageInformation;
};
#endif // DARWIN_KERNEL_H_
| Add proof-of-concept Kernel protocol header. | Add proof-of-concept Kernel protocol header.
| C | apache-2.0 | CupertinoNet/CupertinoSupportPkg,CupertinoNet/CupertinoSupportPkg |
|
78d601ccff5ceefcf7c2de452bb1df8375436eb5 | tests/regression/15-deadlock/12-ase16_nodeadlock.c | tests/regression/15-deadlock/12-ase16_nodeadlock.c | // PARAM: --set ana.activated[+] deadlock --set ana.activated[+] threadJoins
// From https://arxiv.org/abs/1607.06927
#include <pthread.h>
int x;
pthread_mutex_t m1 = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t m2 = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t m3 = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t m4 = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_t m5 = PTHREAD_MUTEX_INITIALIZER;
void func1() {
x = 0; // RACE!
}
int func2(int a) {
pthread_mutex_lock(&m5); // TODO NODEADLOCK (thread joined)
pthread_mutex_lock(&m4); // TODO NODEADLOCK (thread joined)
if (a)
x = 3; // NORACE (thread joined)
else
x = 4;
pthread_mutex_unlock(&m4);
pthread_mutex_unlock(&m5);
return 0;
}
void *thread() {
pthread_mutex_lock(&m1); // NODEADLOCK
pthread_mutex_lock(&m2); // TODO NODEADLOCK (common m1)
pthread_mutex_lock(&m3); // TODO NODEADLOCK (common m1)
x = 1; // NORACE (thread joined)
pthread_mutex_unlock(&m3);
pthread_mutex_unlock(&m2);
pthread_mutex_unlock(&m1);
pthread_mutex_lock(&m4); // TODO NODEADLOCK (thread joined)
pthread_mutex_lock(&m5); // TODO NODEADLOCK (thread joined)
x = 2; // RACE!
pthread_mutex_unlock(&m5);
pthread_mutex_unlock(&m4);
return NULL;
}
int main() {
pthread_t tid;
pthread_create(&tid, NULL, thread, NULL);
pthread_mutex_lock(&m1); // NODEADLOCK
pthread_mutex_lock(&m3); // TODO NODEADLOCK (common m1)
pthread_mutex_lock(&m2); // TODO NODEADLOCK (common m1)
func1();
pthread_mutex_unlock(&m2);
pthread_mutex_unlock(&m3);
pthread_mutex_unlock(&m1);
pthread_join(tid, NULL);
int r;
r = func2(5);
return 0;
}
| Add deadlock non-concurrency example from Kroenig et al ASE16 | Add deadlock non-concurrency example from Kroenig et al ASE16
| C | mit | goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer,goblint/analyzer |
|
cccd3fafcffa318fa783f857f84b5545028daca2 | src/pubkey/if_algo/if_op.h | src/pubkey/if_algo/if_op.h | /*************************************************
* IF Operations Header File *
* (C) 1999-2008 Jack Lloyd *
*************************************************/
#ifndef BOTAN_IF_OP_H__
#define BOTAN_IF_OP_H__
#include <botan/bigint.h>
#include <botan/pow_mod.h>
#include <botan/reducer.h>
namespace Botan {
/*************************************************
* IF Operation *
*************************************************/
class BOTAN_DLL IF_Operation
{
public:
virtual BigInt public_op(const BigInt&) const = 0;
virtual BigInt private_op(const BigInt&) const = 0;
virtual IF_Operation* clone() const = 0;
virtual ~IF_Operation() {}
};
/*************************************************
* Default IF Operation *
*************************************************/
class Default_IF_Op : public IF_Operation
{
public:
BigInt public_op(const BigInt& i) const
{ return powermod_e_n(i); }
BigInt private_op(const BigInt&) const;
IF_Operation* clone() const { return new Default_IF_Op(*this); }
Default_IF_Op(const BigInt&, const BigInt&, const BigInt&,
const BigInt&, const BigInt&, const BigInt&,
const BigInt&, const BigInt&);
private:
Fixed_Exponent_Power_Mod powermod_e_n, powermod_d1_p, powermod_d2_q;
Modular_Reducer reducer;
BigInt c, q;
};
}
#endif
| /*************************************************
* IF Operations Header File *
* (C) 1999-2008 Jack Lloyd *
*************************************************/
#ifndef BOTAN_IF_OP_H__
#define BOTAN_IF_OP_H__
#include <botan/bigint.h>
#include <botan/pow_mod.h>
#include <botan/reducer.h>
namespace Botan {
/*************************************************
* IF Operation *
*************************************************/
class BOTAN_DLL IF_Operation
{
public:
virtual BigInt public_op(const BigInt&) const = 0;
virtual BigInt private_op(const BigInt&) const = 0;
virtual IF_Operation* clone() const = 0;
virtual ~IF_Operation() {}
};
/*************************************************
* Default IF Operation *
*************************************************/
class BOTAN_DLL Default_IF_Op : public IF_Operation
{
public:
BigInt public_op(const BigInt& i) const
{ return powermod_e_n(i); }
BigInt private_op(const BigInt&) const;
IF_Operation* clone() const { return new Default_IF_Op(*this); }
Default_IF_Op(const BigInt&, const BigInt&, const BigInt&,
const BigInt&, const BigInt&, const BigInt&,
const BigInt&, const BigInt&);
private:
Fixed_Exponent_Power_Mod powermod_e_n, powermod_d1_p, powermod_d2_q;
Modular_Reducer reducer;
BigInt c, q;
};
}
#endif
| Add BOTAN_DLL macro to Default_IF_Op | Add BOTAN_DLL macro to Default_IF_Op
| C | bsd-2-clause | randombit/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,webmaster128/botan,randombit/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,Rohde-Schwarz-Cybersecurity/botan,webmaster128/botan,randombit/botan,webmaster128/botan |
e2090ddb0dcd238d265538f9217f24b3780033e8 | src/search/psdd/projection.h | src/search/psdd/projection.h | /* -*- mode:linux -*- */
/**
* \file projection.h
*
*
*
* \author Ethan Burns
* \date 2008-10-15
*/
#if !defined(_PROJECTION_H_)
#define _PROJECTION_H_
#include <vector>
#include "../state.h"
using namespace std;
/**
* An abstract projection function class.
*/
class Projection {
public:
virtual ~Projection();
/**
* Project a state, returning an integer that represents the
* NBlock that the state projects into.
*/
virtual unsigned int project(const State *s) = 0;
/**
* Get the number of NBlocks that will be used in this
* projection. NBlocks will be numbered from 0..num_nblocks()
*/
virtual unsigned int get_num_nblocks(void) = 0;
/**
* Get the list of successor NBlock numbers.
*/
virtual vector<unsigned int>get_successors(const NBlock *b) = 0;
/**
* Get the list of predecessor NBlock numbers.
*/
virtual vector<unsigned int>get_predecessors(const NBlock *b) = 0;
};
#endif /* !_PROJECTION_H_ */
| /* -*- mode:linux -*- */
/**
* \file projection.h
*
*
*
* \author Ethan Burns
* \date 2008-10-15
*/
#if !defined(_PROJECTION_H_)
#define _PROJECTION_H_
#include <vector>
#include "../state.h"
using namespace std;
/**
* An abstract projection function class.
*/
class Projection {
public:
virtual ~Projection();
/**
* Project a state, returning an integer that represents the
* NBlock that the state projects into.
*/
virtual unsigned int project(const State *s) = 0;
/**
* Get the number of NBlocks that will be used in this
* projection. NBlocks will be numbered from 0..num_nblocks()
*/
virtual unsigned int get_num_nblocks(void) = 0;
/**
* Get the list of successor NBlock numbers.
*/
virtual vector<unsigned int>get_successors(unsigned int b) = 0;
/**
* Get the list of predecessor NBlock numbers.
*/
virtual vector<unsigned int>get_predecessors(unsigned int b) = 0;
};
#endif /* !_PROJECTION_H_ */
| Remove the last reminints of NBlocks from Projection. | Remove the last reminints of NBlocks from Projection.
| C | mit | eaburns/pbnf,eaburns/pbnf,eaburns/pbnf,eaburns/pbnf |
cb32da0416b823b7f4b65e7e85d6cba16ca4d1e1 | include/linux/slob_def.h | include/linux/slob_def.h | #ifndef __LINUX_SLOB_DEF_H
#define __LINUX_SLOB_DEF_H
void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node);
static inline void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags)
{
return kmem_cache_alloc_node(cachep, flags, -1);
}
void *__kmalloc_node(size_t size, gfp_t flags, int node);
static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
{
return __kmalloc_node(size, flags, node);
}
/**
* kmalloc - allocate memory
* @size: how many bytes of memory are required.
* @flags: the type of memory to allocate (see kcalloc).
*
* kmalloc is the normal method of allocating memory
* in the kernel.
*/
static inline void *kmalloc(size_t size, gfp_t flags)
{
return __kmalloc_node(size, flags, -1);
}
static inline void *__kmalloc(size_t size, gfp_t flags)
{
return kmalloc(size, flags);
}
/**
* kzalloc - allocate memory. The memory is set to zero.
* @size: how many bytes of memory are required.
* @flags: the type of memory to allocate (see kcalloc).
*/
static inline void *kzalloc(size_t size, gfp_t flags)
{
return __kzalloc(size, flags);
}
#endif /* __LINUX_SLOB_DEF_H */
| #ifndef __LINUX_SLOB_DEF_H
#define __LINUX_SLOB_DEF_H
void *kmem_cache_alloc_node(struct kmem_cache *, gfp_t flags, int node);
static inline void *kmem_cache_alloc(struct kmem_cache *cachep, gfp_t flags)
{
return kmem_cache_alloc_node(cachep, flags, -1);
}
void *__kmalloc_node(size_t size, gfp_t flags, int node);
static inline void *kmalloc_node(size_t size, gfp_t flags, int node)
{
return __kmalloc_node(size, flags, node);
}
/**
* kmalloc - allocate memory
* @size: how many bytes of memory are required.
* @flags: the type of memory to allocate (see kcalloc).
*
* kmalloc is the normal method of allocating memory
* in the kernel.
*/
static inline void *kmalloc(size_t size, gfp_t flags)
{
return __kmalloc_node(size, flags, -1);
}
static inline void *__kmalloc(size_t size, gfp_t flags)
{
return kmalloc(size, flags);
}
#endif /* __LINUX_SLOB_DEF_H */
| Kill off duplicate kzalloc() definition. | slob: Kill off duplicate kzalloc() definition.
With the slab zeroing allocations cleanups Christoph stubbed in a generic
kzalloc(), which was missed on SLOB. Follow the SLAB/SLUB changes and
kill off the __kzalloc() wrapper that SLOB was using.
Reported-by: Jan Engelhardt <[email protected]>
Signed-off-by: Paul Mundt <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
| 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,TeamVee-Kanas/android_kernel_samsung_kanas,KristFoundation/Programs,KristFoundation/Programs,KristFoundation/Programs,TeamVee-Kanas/android_kernel_samsung_kanas |
b670133b9e9fd7bce078674d782dad9d7c320f9d | test/Analysis/array-struct.c | test/Analysis/array-struct.c | // RUN: clang -checker-simple -verify %s &&
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct s {
int data;
int data_array[10];
};
typedef struct {
int data;
} STYPE;
void g1(struct s* p);
void f(void) {
int a[10];
int (*p)[10];
p = &a;
(*p)[3] = 1;
struct s d;
struct s *q;
q = &d;
q->data = 3;
d.data_array[9] = 17;
}
void f2() {
char *p = "/usr/local";
char (*q)[4];
q = &"abc";
}
void f3() {
STYPE s;
}
void f4() {
int a[] = { 1, 2, 3};
int b[3] = { 1, 2 };
}
void f5() {
struct s data;
g1(&data);
}
| // RUN: clang -checker-simple -verify %s &&
// RUN: clang -checker-simple -analyzer-store-region -verify %s
struct s {
int data;
int data_array[10];
};
typedef struct {
int data;
} STYPE;
void g1(struct s* p);
void f(void) {
int a[10];
int (*p)[10];
p = &a;
(*p)[3] = 1;
struct s d;
struct s *q;
q = &d;
q->data = 3;
d.data_array[9] = 17;
}
void f2() {
char *p = "/usr/local";
char (*q)[4];
q = &"abc";
}
void f3() {
STYPE s;
}
void f4() {
int a[] = { 1, 2, 3};
int b[3] = { 1, 2 };
}
void f5() {
struct s data;
g1(&data);
}
void f6() {
char *p;
p = __builtin_alloca(10);
p[1] = 'a';
}
| Add a test case for alloca(). | Add a test case for alloca().
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@59233 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,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,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang |
54993a9f4ebc279f5dac6754e61f2c6ea98dbb65 | src/bin/test_carousel.c | src/bin/test_carousel.c | #include <Elementary.h>
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
#ifndef ELM_LIB_QUICKLAUNCH
void
test_carousel(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg;
win = elm_win_add(NULL, "carousel", ELM_WIN_BASIC);
elm_win_title_set(win, "Carousel");
elm_win_autodel_set(win, 1);
bg = elm_bg_add(win);
elm_win_resize_object_add(win, bg);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(bg);
evas_object_resize(win, 320, 240);
evas_object_show(win);
}
#endif
| #include <Elementary.h>
#ifdef HAVE_CONFIG_H
# include "elementary_config.h"
#endif
#ifndef ELM_LIB_QUICKLAUNCH
void
test_carousel(void *data __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{
Evas_Object *win, *bg, *car;
win = elm_win_add(NULL, "carousel", ELM_WIN_BASIC);
elm_win_title_set(win, "Carousel");
elm_win_autodel_set(win, 1);
bg = elm_bg_add(win);
elm_win_resize_object_add(win, bg);
evas_object_size_hint_weight_set(bg, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_show(bg);
car = elm_carousel_add(win);
elm_win_resize_object_add(win, car);
evas_object_size_hint_weight_set(car, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
elm_carousel_item_add(car, NULL, "Item 1", NULL, NULL);
elm_carousel_item_add(car, NULL, "Item 2", NULL, NULL);
elm_carousel_item_add(car, NULL, "Tinga", NULL, NULL);
elm_carousel_item_add(car, NULL, "Item 4", NULL, NULL);
evas_object_show(car);
evas_object_resize(win, 320, 240);
evas_object_show(win);
}
#endif
| Add carousel to carousel test =P | Add carousel to carousel test =P
But it's not working anyway.
SVN revision: 53684
| C | lgpl-2.1 | rvandegrift/elementary,rvandegrift/elementary,FlorentRevest/Elementary,rvandegrift/elementary,tasn/elementary,tasn/elementary,FlorentRevest/Elementary,FlorentRevest/Elementary,tasn/elementary,rvandegrift/elementary,tasn/elementary,FlorentRevest/Elementary,tasn/elementary |
8316f8d582c9a13bf1ebba93fe66d85a61430692 | test/profile/infinite_loop.c | test/profile/infinite_loop.c | // RUN: %clang_pgogen -O2 -o %t %s
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
// RUN: llvm-profdata show -function main -counts %t.profraw| FileCheck %s
void exit(int);
int g;
__attribute__((noinline)) void foo()
{
g++;
if (g==1000)
exit(0);
}
int main()
{
while (1) {
foo();
}
}
// CHECK: Counters:
// CHECK-NEXT: main:
// CHECK-NEXT: Hash: {{.*}}
// CHECK-NEXT: Counters: 1
// CHECK-NEXT: Block counts: [1000]
| // RUN: %clang_pgogen -O2 -o %t %s
// RUN: env LLVM_PROFILE_FILE=%t.profraw %run %t
// RUN: llvm-profdata show -function main -counts %t.profraw| FileCheck %s
void exit(int);
int g;
__attribute__((noinline)) void foo()
{
g++;
if (g==1000)
exit(0);
}
int main()
{
while (1) {
foo();
}
}
// CHECK: Counters:
// CHECK-NEXT: main:
// CHECK-NEXT: Hash: {{.*}}
// CHECK-NEXT: Counters: 2
// CHECK-NEXT: Block counts: [1000, 1]
| Test case update for D40873 | Test case update for D40873
git-svn-id: c199f293c43da69278bea8e88f92242bf3aa95f7@320105 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt,llvm-mirror/compiler-rt |
e1986201336c472fe94095486457c431f1e6bd9f | tests/end_to_end_tests_remote.h | tests/end_to_end_tests_remote.h | #ifndef end_to_end_tests_remote_h_incl
#define end_to_end_tests_remote_h_incl
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include "end_to_end_tests_base.h"
class EndToEndTestsRemote : public EndToEndTestsBase {
static bool is_receiver;
CPPUNIT_TEST_SUITE(EndToEndTestsRemote);
CPPUNIT_TEST(testRandomBytesReceivedCorrectly);
CPPUNIT_TEST(testDefaultIROBOrdering);
CPPUNIT_TEST_SUITE_END();
protected:
virtual void chooseRole();
virtual bool isReceiver();
void testDefaultIROBOrdering();
void testThunks();
};
#endif
| #ifndef end_to_end_tests_remote_h_incl
#define end_to_end_tests_remote_h_incl
#include <cppunit/TestFixture.h>
#include <cppunit/extensions/HelperMacros.h>
#include "end_to_end_tests_base.h"
class EndToEndTestsRemote : public EndToEndTestsBase {
static bool is_receiver;
CPPUNIT_TEST_SUITE(EndToEndTestsRemote);
CPPUNIT_TEST(testRandomBytesReceivedCorrectly);
CPPUNIT_TEST(testDefaultIROBOrdering);
CPPUNIT_TEST(testThunks);
CPPUNIT_TEST_SUITE_END();
protected:
virtual void chooseRole();
virtual bool isReceiver();
void testDefaultIROBOrdering();
void testThunks();
};
#endif
| Add the thunk test to the suite. | Add the thunk test to the suite.
git-svn-id: 30f60abd488961f3df74c65f80d9d7b5813a1a78@653 1971e5c1-a347-0410-b49b-82492f0cf60c
| C | bsd-2-clause | brettdh/libcmm,brettdh/libcmm,brettdh/libcmm,brettdh/libcmm,brettdh/libcmm |
13f6248da3578c67dc472fb38e1abc621fc6f2ae | src/untrusted/nacl/pthread_initialize_minimal.c | src/untrusted/nacl/pthread_initialize_minimal.c | /*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <unistd.h>
#include "native_client/src/untrusted/nacl/nacl_irt.h"
#include "native_client/src/untrusted/nacl/nacl_thread.h"
#include "native_client/src/untrusted/nacl/tls.h"
/*
* This initialization happens early in startup with or without libpthread.
* It must make it safe for vanilla newlib code to run.
*/
void __pthread_initialize_minimal(size_t tdb_size) {
/* Adapt size for sbrk. */
/* TODO(robertm): this is somewhat arbitrary - re-examine). */
size_t combined_size = (__nacl_tls_combined_size(tdb_size) + 15) & ~15;
/*
* Use sbrk not malloc here since the library is not initialized yet.
*/
void *combined_area = sbrk(combined_size);
/*
* Fill in that memory with its initializer data.
*/
void *tp = __nacl_tls_initialize_memory(combined_area, tdb_size);
/*
* Set %gs, r9, or equivalent platform-specific mechanism. Requires
* a syscall since certain bitfields of these registers are trusted.
*/
nacl_tls_init(tp);
/*
* Initialize newlib's thread-specific pointer.
*/
__newlib_thread_init();
}
| /*
* Copyright (c) 2012 The Native Client Authors. All rights reserved.
* Use of this source code is governed by a BSD-style license that can be
* found in the LICENSE file.
*/
#include <unistd.h>
#include "native_client/src/untrusted/nacl/nacl_irt.h"
#include "native_client/src/untrusted/nacl/nacl_thread.h"
#include "native_client/src/untrusted/nacl/tls.h"
/*
* This initialization happens early in startup with or without libpthread.
* It must make it safe for vanilla newlib code to run.
*/
void __pthread_initialize_minimal(size_t tdb_size) {
size_t combined_size = __nacl_tls_combined_size(tdb_size);
/*
* Use sbrk not malloc here since the library is not initialized yet.
*/
void *combined_area = sbrk(combined_size);
/*
* Fill in that memory with its initializer data.
*/
void *tp = __nacl_tls_initialize_memory(combined_area, tdb_size);
/*
* Set %gs, r9, or equivalent platform-specific mechanism. Requires
* a syscall since certain bitfields of these registers are trusted.
*/
nacl_tls_init(tp);
/*
* Initialize newlib's thread-specific pointer.
*/
__newlib_thread_init();
}
| Remove unnecessary rounding when allocating initial thread block | Cleanup: Remove unnecessary rounding when allocating initial thread block
The other calls to __nacl_tls_combined_size() don't do this.
__nacl_tls_combined_size() should be doing any necessary rounding itself.
BUG=none
TEST=trybots
Review URL: https://codereview.chromium.org/18555008
git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@11698 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2
| C | bsd-3-clause | Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client,Lind-Project/native_client |
953971c35e92472d75067d956b3268c2e2825fd1 | src/toc_private.h | src/toc_private.h | /* toc_private.h - Private optical disc table of contents (TOC) API
*
* Copyright (c) 2011 Ian Jacobi <[email protected]>
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*/
#ifndef _LIBCUEIFY_TOC_PRIVATE_H
#define _LIBCUEIFY_TOC_PRIVATE_H
#include <libcueify/types.h>
#define MAX_TRACKS 100 /** Maximum number of tracks on a CD. */
/** Internal structure to hold track data in a TOC. */
typedef struct {
/** Sub-Q-channel content format. */
uint8_t adr;
/** Track control flags. */
uint8_t control;
/** Offset of the start of the track (LBA). */
uint32_t lba;
} cueify_toc_track_private;
/** Internal structure to hold TOC data. */
typedef struct {
/** Number of the first track in the TOC. */
uint8_t first_track_number;
/** Number of the last track in the TOC. */
uint8_t last_track_number;
/** Tracks in the TOC. */
cueify_toc_track_private tracks[MAX_TRACKS];
} cueify_toc_private;
#endif /* _LIBCUEIFY_TOC_PRIVATE_H */
| Add private TOC data type | Add private TOC data type
| C | mit | pipian/libcueify,pipian/libcueify,pipian/libcueify,pipian/libcueify,pipian/libcueify |
|
715d1d7ea657172072bd95f436b7fc6290b97b92 | KristalliProtocolModule/KristalliProtocolModuleApi.h | KristalliProtocolModule/KristalliProtocolModuleApi.h | // For conditions of distribution and use, see copyright notice in license.txt
#ifndef incl_KristalliProtocolModuleApi_h
#define incl_KristalliProtocolModuleApi_h
#if defined (_WINDOWS)
#if defined(KRISTALLIPROTOCOL_MODULE_EXPORTS)
#define KRISTALLIPROTOCOL_MODULE_API __declspec(dllexport)
#else
#define KRISTALLIPROTOCOL_MODULE_API __declspec(dllimport)
#endif
#else
#define KRISTALLIPROTOCOL
#endif
#endif
| // For conditions of distribution and use, see copyright notice in license.txt
#ifndef incl_KristalliProtocolModuleApi_h
#define incl_KristalliProtocolModuleApi_h
#if defined (_WINDOWS)
#if defined(KRISTALLIPROTOCOL_MODULE_EXPORTS)
#define KRISTALLIPROTOCOL_MODULE_API __declspec(dllexport)
#else
#define KRISTALLIPROTOCOL_MODULE_API __declspec(dllimport)
#endif
#else
#define KRISTALLIPROTOCOL_MODULE_API
#endif
#endif
| Fix syntax error for linux build. | Fix syntax error for linux build.
| C | apache-2.0 | realXtend/tundra,antont/tundra,antont/tundra,BogusCurry/tundra,antont/tundra,jesterKing/naali,BogusCurry/tundra,AlphaStaxLLC/tundra,pharos3d/tundra,AlphaStaxLLC/tundra,AlphaStaxLLC/tundra,antont/tundra,antont/tundra,realXtend/tundra,AlphaStaxLLC/tundra,pharos3d/tundra,antont/tundra,realXtend/tundra,AlphaStaxLLC/tundra,antont/tundra,jesterKing/naali,realXtend/tundra,BogusCurry/tundra,pharos3d/tundra,jesterKing/naali,realXtend/tundra,realXtend/tundra,pharos3d/tundra,BogusCurry/tundra,jesterKing/naali,BogusCurry/tundra,BogusCurry/tundra,jesterKing/naali,jesterKing/naali,AlphaStaxLLC/tundra,pharos3d/tundra,pharos3d/tundra,jesterKing/naali |
695dbab30302266c3edf137895eb0627d7188d8d | chrome/browser/chromeos/cros/mock_update_library.h | chrome/browser/chromeos/cros/mock_update_library.h | // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_
#define CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_
#pragma once
#include "base/observer_list.h"
#include "chrome/browser/chromeos/cros/update_library.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace chromeos {
class MockUpdateLibrary : public UpdateLibrary {
public:
MockUpdateLibrary() {}
virtual ~MockUpdateLibrary() {}
MOCK_METHOD1(AddObserver, void(Observer*)); // NOLINT
MOCK_METHOD1(RemoveObserver, void(Observer*)); // NOLINT
MOCK_METHOD0(CheckForUpdate, bool(void));
MOCK_METHOD0(RebootAfterUpdate, bool(void));
MOCK_METHOD1(SetReleaseTrack, bool(const std::string&));
MOCK_METHOD1(GetReleaseTrack, std::string());
MOCK_CONST_METHOD0(status, const Status&(void));
private:
DISALLOW_COPY_AND_ASSIGN(MockUpdateLibrary);
};
} // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_
| // Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_
#define CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_
#pragma once
#include "base/observer_list.h"
#include "chrome/browser/chromeos/cros/update_library.h"
#include "testing/gmock/include/gmock/gmock.h"
namespace chromeos {
class MockUpdateLibrary : public UpdateLibrary {
public:
MockUpdateLibrary() {}
virtual ~MockUpdateLibrary() {}
MOCK_METHOD1(AddObserver, void(Observer*)); // NOLINT
MOCK_METHOD1(RemoveObserver, void(Observer*)); // NOLINT
MOCK_METHOD0(CheckForUpdate, bool(void));
MOCK_METHOD0(RebootAfterUpdate, bool(void));
MOCK_METHOD1(SetReleaseTrack, bool(const std::string&));
MOCK_METHOD0(GetReleaseTrack, std::string());
MOCK_CONST_METHOD0(status, const Status&(void));
private:
DISALLOW_COPY_AND_ASSIGN(MockUpdateLibrary);
};
} // namespace chromeos
#endif // CHROME_BROWSER_CHROMEOS_CROS_MOCK_UPDATE_LIBRARY_H_
| Fix the Chrome OS build. | Fix the Chrome OS build.
TEST=make -j40 BUILDTYPE=Release browser_tests
BUG=chromium-os:6030
Review URL: http://codereview.chromium.org/4129006
git-svn-id: http://src.chromium.org/svn/trunk/src@64027 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
Former-commit-id: 21f711df9e9164d849fc0c637465577383f0b1c0 | C | bsd-3-clause | meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser,meego-tablet-ux/meego-app-browser |
2f3b7e4c88b3634d077f158d8a90553981b8c0a7 | include/pector/malloc_allocator_compat.h | include/pector/malloc_allocator_compat.h | #ifndef PECTOR_MALLOC_ALLOCATOR_COMPAT_H
#define PECTOR_MALLOC_ALLOCATOR_COMPAT_H
#ifdef __APPLE__
#include <malloc/malloc.h>
#else
#include <malloc.h>
#endif
#if defined __GNUC__ || defined _WIN32 || defined __APPLE__ || defined __FreeBSD__
#define PT_SIZE_AWARE_COMPAT
#if defined _WIN32
#define PT_MALLOC_USABLE_SIZE(p) _msize(p)
#elif defined __APPLE__
#define PT_MALLOC_USABLE_SIZE(p) malloc_size(p)
#elif defined __GNUC__ || defined __FreeBSD__
#define PT_MALLOC_USABLE_SIZE(p) malloc_usable_size(p)
#endif
#endif // defined __GNUC__ || defined _WIN32 || defined __APPLE__
#endif
| #ifndef PECTOR_MALLOC_ALLOCATOR_COMPAT_H
#define PECTOR_MALLOC_ALLOCATOR_COMPAT_H
#ifdef __APPLE__
#include <malloc/malloc.h>
#else
#include <malloc.h>
#endif
#if defined __linux__ || defined __gnu_hurd__ || defined _WIN32 || defined __APPLE__ || defined __FreeBSD__
#define PT_SIZE_AWARE_COMPAT
#if defined _WIN32
#define PT_MALLOC_USABLE_SIZE(p) _msize(p)
#elif defined __APPLE__
#define PT_MALLOC_USABLE_SIZE(p) malloc_size(p)
#elif defined __gnu_hurd__ || __linux__ || defined __FreeBSD__
#define PT_MALLOC_USABLE_SIZE(p) malloc_usable_size(p)
#endif
#endif // defined __GNUC__ || defined _WIN32 || defined __APPLE__
#endif
| Change malloc_usable_size for Linux with the __linux__ macro | Change malloc_usable_size for Linux with the __linux__ macro
Suggested by Carter Li.
Also add check for GNU/Hurd.
| C | lgpl-2.1 | pjump/pector,aguinet/pector,aguinet/pector,pjump/pector |
c9454b616a60f0d476333b655458c81830562f9a | util.h | util.h | /*
This file is part of ethash.
ethash is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ethash 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with ethash. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file util.h
* @author Tim Hughes <[email protected]>
* @date 2015
*/
#pragma once
#include <stdint.h>
#include "compiler.h"
#ifdef __cplusplus
extern "C" {
#endif
//#ifdef _MSC_VER
void debugf(char const* str, ...);
//#else
//#define debugf printf
//#endif
static inline uint32_t min_u32(uint32_t a, uint32_t b)
{
return a < b ? a : b;
}
static inline uint32_t clamp_u32(uint32_t x, uint32_t min_, uint32_t max_)
{
return x < min_ ? min_ : (x > max_ ? max_ : x);
}
#ifdef __cplusplus
}
#endif
| /*
This file is part of ethash.
ethash is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
ethash 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 General Public License for more details.
You should have received a copy of the GNU General Public License
along with ethash. If not, see <http://www.gnu.org/licenses/>.
*/
/** @file util.h
* @author Tim Hughes <[email protected]>
* @date 2015
*/
#pragma once
#include <stdint.h>
#include "compiler.h"
#ifdef __cplusplus
extern "C" {
#endif
void debugf(char const* str, ...);
static inline uint32_t min_u32(uint32_t a, uint32_t b)
{
return a < b ? a : b;
}
static inline uint32_t clamp_u32(uint32_t x, uint32_t min_, uint32_t max_)
{
return x < min_ ? min_ : (x > max_ ? max_ : x);
}
#ifdef __cplusplus
}
#endif
| Add comment about stack probing and remove unused ifdefs | Add comment about stack probing and remove unused ifdefs
| C | mit | PaulGrey30/go-get--u-github.com-tools-godep,LefterisJP/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,d-das/cpp-ethereum,joeldo/cpp-ethereum,xeddmc/cpp-ethereum,expanse-org/cpp-expanse,eco/cpp-ethereum,yann300/cpp-ethereum,gluk256/cpp-ethereum,expanse-project/cpp-expanse,karek314/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,expanse-project/cpp-expanse,xeddmc/cpp-ethereum,anthony-cros/cpp-ethereum,xeddmc/cpp-ethereum,xeddmc/cpp-ethereum,expanse-org/cpp-expanse,joeldo/cpp-ethereum,ethers/cpp-ethereum,smartbitcoin/cpp-ethereum,joeldo/cpp-ethereum,ethers/cpp-ethereum,vaporry/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,expanse-org/cpp-expanse,eco/cpp-ethereum,yann300/cpp-ethereum,programonauta/webthree-umbrella,d-das/cpp-ethereum,anthony-cros/cpp-ethereum,expanse-project/cpp-expanse,expanse-project/cpp-expanse,expanse-org/cpp-expanse,smartbitcoin/cpp-ethereum,LefterisJP/cpp-ethereum,expanse-project/cpp-expanse,LefterisJP/cpp-ethereum,ethers/cpp-ethereum,gluk256/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,expanse-org/cpp-expanse,d-das/cpp-ethereum,vaporry/cpp-ethereum,anthony-cros/cpp-ethereum,karek314/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,johnpeter66/ethminer,LefterisJP/webthree-umbrella,Sorceror32/go-get--u-github.com-tools-godep,PaulGrey30/go-get--u-github.com-tools-godep,eco/cpp-ethereum,d-das/cpp-ethereum,d-das/cpp-ethereum,smartbitcoin/cpp-ethereum,programonauta/webthree-umbrella,smartbitcoin/cpp-ethereum,yann300/cpp-ethereum,ethers/cpp-ethereum,eco/cpp-ethereum,karek314/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,expanse-project/cpp-expanse,karek314/cpp-ethereum,vaporry/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,johnpeter66/ethminer,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,joeldo/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,vaporry/webthree-umbrella,expanse-org/cpp-expanse,chfast/webthree-umbrella,joeldo/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,yann300/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,xeddmc/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,yann300/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,eco/cpp-ethereum,ethers/cpp-ethereum,smartbitcoin/cpp-ethereum,karek314/cpp-ethereum,PaulGrey30/go-get--u-github.com-tools-godep,LefterisJP/webthree-umbrella,vaporry/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,arkpar/webthree-umbrella,anthony-cros/cpp-ethereum,PaulGrey30/.-git-clone-https-github.com-ethereum-cpp-ethereum,LefterisJP/cpp-ethereum,Sorceror32/go-get--u-github.com-tools-godep,vaporry/cpp-ethereum,anthony-cros/cpp-ethereum,gluk256/cpp-ethereum,xeddmc/cpp-ethereum,eco/cpp-ethereum,yann300/cpp-ethereum,johnpeter66/ethminer,smartbitcoin/cpp-ethereum,gluk256/cpp-ethereum,d-das/cpp-ethereum,LefterisJP/cpp-ethereum,ethers/cpp-ethereum,LefterisJP/cpp-ethereum,vaporry/cpp-ethereum,gluk256/cpp-ethereum,gluk256/cpp-ethereum,Sorceror32/.-git-clone-https-github.com-ethereum-cpp-ethereum,karek314/cpp-ethereum,anthony-cros/cpp-ethereum,joeldo/cpp-ethereum |
8377ed36990acb2eae2b1a4775f00688ab4490ea | tests/performance.c | tests/performance.c | int test_performance() {
asic_t *device = asic_init(TI83p);
struct timespec start, stop;
unsigned long long t;
int i;
clock_gettime(CLOCK_MONOTONIC_RAW, &start);
for (i = 0; i < 1000000; i++) {
i -= cpu_execute(device->cpu, 1);
}
clock_gettime(CLOCK_MONOTONIC_RAW, &stop);
t = (stop.tv_sec*1000000000UL) + stop.tv_nsec;
t -= (start.tv_sec * 1000000000UL) + start.tv_nsec;
printf("executed 1,000,000 cycles in %llu microseconds (~%llu MHz)\n", t/1000, 1000000000/t);
asic_free(device);
return -1;
}
| int test_performance() {
asic_t *device = asic_init(TI83p);
clock_t start, stop;
int i;
start = clock();
for (i = 0; i < 1000000; i++) {
i -= cpu_execute(device->cpu, 1);
}
stop = clock();
double time = (double)(stop - start) / (CLOCKS_PER_SEC / 1000);
double mHz = 1000.0 / time;
printf("executed 1,000,000 cycles in %f milliseconds (~%f MHz)\n", time, mHz);
asic_free(device);
return -1;
}
| Switch to more common timing functions | Switch to more common timing functions
| C | mit | KnightOS/z80e,KnightOS/z80e |
2e17599c6ff8bef564e07455588a78ca4e9a5f09 | src/lib/arch/aarch64/linux/linux_aarch64.c | src/lib/arch/aarch64/linux/linux_aarch64.c | #include <string.h>
#include <math.h>
#include <sys/mman.h>
#include "expreval_internal.h"
static void *create_executable_code_aarch64_linux(const char *machine_code, int size);
void *compile_function_internal(compiler c, token first_token, int *size)
{
unsigned char code[MAX_CODE_LEN];
unsigned char tmp[] = {0x1e, 0x60, 0x28, 0x00, 0xd6, 0x5f, 0x03, 0xc0};
int n = 8;
memcpy(code, tmp, n);
return create_executable_code_aarch64_linux(code, n);
}
/*
Attraverso opportune chiamate al kernel alloca un vettore della dimensione adatta che contenga
il codice appena compilato, vi copia il codice e lo rende eseguibile (avendo cura di renderlo
non scrivibile, visto che è bene che la memoria non sia mai scrivibile ed eseguibile nello
stesso momento.
*/
static void *create_executable_code_aarch64_linux(const char *machine_code, int size)
{
/* Memoria rw- */
void *mem = mmap(NULL, size, PROT_READ | PROT_WRITE, MAP_ANONYMOUS | MAP_PRIVATE, -1, 0);
if(mem == MAP_FAILED)
return NULL;
/* Scrivo il codice */
memcpy(mem, machine_code, size);
/* Inibisco la scrittura e consento l'esecuzione (r-x) */
if(mprotect(mem, size, PROT_READ | PROT_EXEC) < 0)
{
munmap(mem, size);
return NULL;
}
return mem;
}
| Add aarch64 jit compiler stub | Add aarch64 jit compiler stub
| C | mit | lr94/libexpreval,lr94/libexpreval |
|
8634605ecfa7cb7b339b066e57348ef7f4801e32 | lib/CodeGen/SanitizerBlacklist.h | lib/CodeGen/SanitizerBlacklist.h | //===--- SanitizerBlacklist.h - Blacklist for sanitizers --------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// User-provided blacklist used to disable/alter instrumentation done in
// sanitizers.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_LIB_CODEGEN_SANITIZERBLACKLIST_H
#define LLVM_CLANG_LIB_CODEGEN_SANITIZERBLACKLIST_H
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/SpecialCaseList.h"
#include <memory>
namespace llvm {
class GlobalVariable;
class Function;
class Module;
}
namespace clang {
namespace CodeGen {
class SanitizerBlacklist {
std::unique_ptr<llvm::SpecialCaseList> SCL;
public:
SanitizerBlacklist(llvm::SpecialCaseList *SCL) : SCL(SCL) {}
bool isIn(const llvm::Module &M,
StringRef Category = StringRef()) const;
bool isIn(const llvm::Function &F) const;
bool isIn(const llvm::GlobalVariable &G,
StringRef Category = StringRef()) const;
bool isBlacklistedType(StringRef MangledTypeName) const;
};
} // end namespace CodeGen
} // end namespace clang
#endif
| //===--- SanitizerBlacklist.h - Blacklist for sanitizers --------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// User-provided blacklist used to disable/alter instrumentation done in
// sanitizers.
//
//===----------------------------------------------------------------------===//
#ifndef LLVM_CLANG_LIB_CODEGEN_SANITIZERBLACKLIST_H
#define LLVM_CLANG_LIB_CODEGEN_SANITIZERBLACKLIST_H
#include "clang/Basic/LLVM.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/SpecialCaseList.h"
#include <memory>
namespace llvm {
class GlobalVariable;
class Function;
class Module;
}
namespace clang {
namespace CodeGen {
class SanitizerBlacklist {
std::unique_ptr<llvm::SpecialCaseList> SCL;
public:
SanitizerBlacklist(std::unique_ptr<llvm::SpecialCaseList> SCL)
: SCL(std::move(SCL)) {}
bool isIn(const llvm::Module &M,
StringRef Category = StringRef()) const;
bool isIn(const llvm::Function &F) const;
bool isIn(const llvm::GlobalVariable &G,
StringRef Category = StringRef()) const;
bool isBlacklistedType(StringRef MangledTypeName) const;
};
} // end namespace CodeGen
} // end namespace clang
#endif
| Fix for LLVM API change to SpecialCaseList::create | Fix for LLVM API change to SpecialCaseList::create
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@216926 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,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang |
8eb990df360a6eaac3a6bfe3bcb22636d99edc0b | gspell/gspell-init.h | gspell/gspell-init.h | /*
* This file is part of gspell, a spell-checking library.
*
* Copyright 2016 - Ignacio Casal Quinteiro <[email protected]>
* Copyright 2016 - Sébastien Wilmet <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GSPELL_INIT_H
#define GSPELL_INIT_H
#include <glib.h>
#ifdef G_OS_WIN32
#include <windef.h>
G_GNUC_INTERNAL
HMODULE _gspell_init_get_dll (void);
#endif /* G_OS_WIN32 */
#endif /* GSPELL_INIT_H */
/* ex:set ts=8 noet: */
| /*
* This file is part of gspell, a spell-checking library.
*
* Copyright 2016 - Ignacio Casal Quinteiro <[email protected]>
* Copyright 2016 - Sébastien Wilmet <[email protected]>
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public License
* along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
#ifndef GSPELL_INIT_H
#define GSPELL_INIT_H
#include <glib.h>
#ifdef G_OS_WIN32
#define WIN32_LEAN_AND_MEAN
#include <windows.h>
G_GNUC_INTERNAL
HMODULE _gspell_init_get_dll (void);
#endif /* G_OS_WIN32 */
#endif /* GSPELL_INIT_H */
/* ex:set ts=8 noet: */
| Revert "win32: include windef.h instead of windows.h" | Revert "win32: include windef.h instead of windows.h"
This reverts commit 7a51b17a061cb4e83c5d0e862cb1c4c32c7033e7.
This was actually good, normally. See the discussion at:
https://bugzilla.gnome.org/show_bug.cgi?id=774325
Not tested, I don't test gspell on/for Windows.
| C | lgpl-2.1 | GNOME/gspell,GNOME/gspell |
0f993209fdd1e8bed4e9fd3d9ba758416b39eaa8 | src/plugins/orbbec_hand/TrackedPoint.h | src/plugins/orbbec_hand/TrackedPoint.h | #ifndef TRACKEDPOINT_H
#define TRACKEDPOINT_H
#include <opencv2/core/affine.hpp>
#include "TrackingData.h"
namespace sensekit { namespace plugins { namespace hand {
struct TrackedPoint
{
public:
cv::Point m_position;
cv::Point3f m_worldPosition;
cv::Point3f m_steadyWorldPosition;
cv::Point3f m_worldDeltaPosition;
int m_trackingId;
int m_inactiveFrameCount;
float m_totalContributionArea;
int m_wrongAreaCount;
int m_activeFrameCount;
TrackedPointType m_type;
TrackingStatus m_status;
TrackedPoint(cv::Point position, cv::Point3f worldPosition, int trackingId)
{
m_type = TrackedPointType::CandidatePoint;
m_status = TrackingStatus::NotTracking;
m_position = position;
m_worldPosition = worldPosition;
m_steadyWorldPosition = worldPosition;
m_worldDeltaPosition = cv::Point3f(0, 0, 0);
m_trackingId = trackingId;
m_inactiveFrameCount = 0;
m_activeFrameCount = 0;
m_totalContributionArea = 0;
m_wrongAreaCount = 0;
}
};
}}}
#endif // TRACKEDPOINT_H | #ifndef TRACKEDPOINT_H
#define TRACKEDPOINT_H
#include <opencv2/core/affine.hpp>
#include "TrackingData.h"
namespace sensekit { namespace plugins { namespace hand {
struct TrackedPoint
{
public:
cv::Point m_position;
cv::Point3f m_worldPosition;
cv::Point3f m_worldDeltaPosition;
cv::Point3f m_steadyWorldPosition;
int m_trackingId;
int m_inactiveFrameCount;
int m_activeFrameCount;
TrackedPointType m_type;
TrackingStatus m_status;
TrackedPoint(cv::Point position, cv::Point3f worldPosition, int trackingId)
{
m_type = TrackedPointType::CandidatePoint;
m_status = TrackingStatus::NotTracking;
m_position = position;
m_worldPosition = worldPosition;
m_steadyWorldPosition = worldPosition;
m_worldDeltaPosition = cv::Point3f(0, 0, 0);
m_trackingId = trackingId;
m_inactiveFrameCount = 0;
m_activeFrameCount = 0;
}
};
}}}
#endif // TRACKEDPOINT_H | Remove old tracked point fields | Remove old tracked point fields
| C | apache-2.0 | orbbec/astra,orbbec/astra,orbbec/astra,orbbec/astra,orbbec/astra |
2822ae02ece582706720ef387c37eee8c245a8f6 | lib/c_impl/n_speech_trimmer.c | lib/c_impl/n_speech_trimmer.c | #include "noyes.h"
#undef TRUE
#define TRUE 1
#undef FALSE
#define FALSE 0
SpeechTrimmer * new_speech_trimmer() {
SpeechTrimmer *self = malloc(sizeof(SpeechTrimmer));
self->leader = 5;
self->trailer = 5;
self->speech_started = FALSE;
self->bcm = new_bent_cent_marker();
self->false_count = 0;
self->true_count = 0;
self->queue = n_list_new();
self->eos_reached = FALSE;
self->scs = 20;
self->ecs = 50;
}
void free_speech_trimmer(SpeechTrimmer *self) {
free(self);
}
void speech_trimmer_enqueue(SpeechTrimmer *self, NMatrix1* pcm) {
}
NMatrix1 * speech_trimmer_dequeue(SpeechTrimmer *self) {
if (self->eos_reached || (self->speech_started &&
n_list_size(self->queue) > self->ecs)) {
NMatrix1 * N = n_list_get(self->queue, 0);
n_list_remove(self->queue, 0, 1);
return N;
}
return NULL;
}
int speech_trimmer_eos(SpeechTrimmer *self) {
return self->eos_reached;
}
| #include "noyes.h"
#undef TRUE
#define TRUE 1
#undef FALSE
#define FALSE 0
SpeechTrimmer * new_speech_trimmer() {
SpeechTrimmer *self = malloc(sizeof(SpeechTrimmer));
self->leader = 5;
self->trailer = 5;
self->speech_started = FALSE;
self->bcm = new_bent_cent_marker();
self->false_count = 0;
self->true_count = 0;
self->queue = n_list_new();
self->eos_reached = FALSE;
self->scs = 20;
self->ecs = 50;
return self;
}
void free_speech_trimmer(SpeechTrimmer *self) {
free(self);
}
void speech_trimmer_enqueue(SpeechTrimmer *self, NMatrix1* pcm) {
}
NMatrix1 * speech_trimmer_dequeue(SpeechTrimmer *self) {
if (self->eos_reached || (self->speech_started &&
n_list_size(self->queue) > self->ecs)) {
NMatrix1 * N = n_list_get(self->queue, 0);
n_list_remove(self->queue, 0, 1);
return N;
}
return NULL;
}
int speech_trimmer_eos(SpeechTrimmer *self) {
return self->eos_reached;
}
| Fix memory error due to missing return statement in speech trimmer constructor. | Fix memory error due to missing return statement in speech trimmer constructor.
| C | bsd-2-clause | talkhouse/noyes,talkhouse/noyes,talkhouse/noyes |
25c52209c37546ae811c6653fd725a192c58c602 | components/password_manager/core/browser/browser_save_password_progress_logger.h | components/password_manager/core/browser/browser_save_password_progress_logger.h | // Copyright 2014 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_
#include <string>
#include "components/autofill/core/common/save_password_progress_logger.h"
class PasswordManagerClient;
namespace password_manager {
// This is the SavePasswordProgressLogger specialization for the browser code,
// where the PasswordManagerClient can be directly called.
class BrowserSavePasswordProgressLogger
: public autofill::SavePasswordProgressLogger {
public:
explicit BrowserSavePasswordProgressLogger(PasswordManagerClient* client);
virtual ~BrowserSavePasswordProgressLogger();
protected:
// autofill::SavePasswordProgressLogger:
virtual void SendLog(const std::string& log) OVERRIDE;
private:
// The PasswordManagerClient to which logs can be sent for display. The client
// must outlive this logger.
PasswordManagerClient* const client_;
DISALLOW_COPY_AND_ASSIGN(BrowserSavePasswordProgressLogger);
};
} // namespace password_manager
#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_
| // Copyright 2014 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 COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_
#define COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_
#include <string>
#include "components/autofill/core/common/save_password_progress_logger.h"
namespace password_manager {
class PasswordManagerClient;
// This is the SavePasswordProgressLogger specialization for the browser code,
// where the PasswordManagerClient can be directly called.
class BrowserSavePasswordProgressLogger
: public autofill::SavePasswordProgressLogger {
public:
explicit BrowserSavePasswordProgressLogger(PasswordManagerClient* client);
virtual ~BrowserSavePasswordProgressLogger();
protected:
// autofill::SavePasswordProgressLogger:
virtual void SendLog(const std::string& log) OVERRIDE;
private:
// The PasswordManagerClient to which logs can be sent for display. The client
// must outlive this logger.
PasswordManagerClient* const client_;
DISALLOW_COPY_AND_ASSIGN(BrowserSavePasswordProgressLogger);
};
} // namespace password_manager
#endif // COMPONENTS_PASSWORD_MANAGER_CORE_BROWSER_BROWSER_SAVE_PASSWORD_PROGRESS_LOGGER_H_
| Revert 262696 "Revert 262685 "Fix a forward declaration of Passw..." | Revert 262696 "Revert 262685 "Fix a forward declaration of Passw..."
> Revert 262685 "Fix a forward declaration of PasswordManagerClient"
>
> Compile still fails:
> http://build.chromium.org/p/chromium.linux/buildstatus?builder=Linux%20GTK%20Builder&number=2681
> ../../chrome/browser/ui/gtk/login_prompt_gtk.cc:70:7:error: 'PasswordManager' has not been declared
>
>
> > Fix a forward declaration of PasswordManagerClient
> >
> > This went wrong with landing https://codereview.chromium.org/225093012 and https://codereview.chromium.org/216183008 too close from each other.
> >
> > BUG=347927,348523
> > [email protected]
> > [email protected]
> >
> > Review URL: https://codereview.chromium.org/230883002
>
> [email protected]
>
> Review URL: https://codereview.chromium.org/231043002
[email protected]
Review URL: https://codereview.chromium.org/231033004
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@262700 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | dednal/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,ltilve/chromium,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,dushu1203/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,fujunwei/chromium-crosswalk,dushu1203/chromium.src,axinging/chromium-crosswalk,dednal/chromium.src,PeterWangIntel/chromium-crosswalk,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk-efl,axinging/chromium-crosswalk,jaruba/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,M4sse/chromium.src,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,M4sse/chromium.src,PeterWangIntel/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,Pluto-tv/chromium-crosswalk,ltilve/chromium,bright-sparks/chromium-spacewalk,M4sse/chromium.src,Fireblend/chromium-crosswalk,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,Just-D/chromium-1,bright-sparks/chromium-spacewalk,ltilve/chromium,dushu1203/chromium.src,TheTypoMaster/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,markYoungH/chromium.src,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,markYoungH/chromium.src,dushu1203/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,Just-D/chromium-1,littlstar/chromium.src,krieger-od/nwjs_chromium.src,Chilledheart/chromium,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,bright-sparks/chromium-spacewalk,M4sse/chromium.src,Chilledheart/chromium,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,Just-D/chromium-1,ltilve/chromium,chuan9/chromium-crosswalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,ondra-novak/chromium.src,M4sse/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,Pluto-tv/chromium-crosswalk,dushu1203/chromium.src,M4sse/chromium.src,crosswalk-project/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Just-D/chromium-1,ltilve/chromium,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,Chilledheart/chromium,dushu1203/chromium.src,crosswalk-project/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,ondra-novak/chromium.src,axinging/chromium-crosswalk,Jonekee/chromium.src,jaruba/chromium.src,markYoungH/chromium.src,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,hgl888/chromium-crosswalk-efl,TheTypoMaster/chromium-crosswalk,jaruba/chromium.src,M4sse/chromium.src,littlstar/chromium.src,ondra-novak/chromium.src,littlstar/chromium.src,dednal/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,dushu1203/chromium.src,jaruba/chromium.src,Chilledheart/chromium,dednal/chromium.src,markYoungH/chromium.src,Jonekee/chromium.src,dednal/chromium.src,littlstar/chromium.src,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,fujunwei/chromium-crosswalk,markYoungH/chromium.src,chuan9/chromium-crosswalk,jaruba/chromium.src,fujunwei/chromium-crosswalk,chuan9/chromium-crosswalk,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,littlstar/chromium.src,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,littlstar/chromium.src,Chilledheart/chromium,jaruba/chromium.src,TheTypoMaster/chromium-crosswalk,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,chuan9/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,ltilve/chromium,Jonekee/chromium.src,ltilve/chromium,Chilledheart/chromium,ltilve/chromium,Jonekee/chromium.src,Chilledheart/chromium,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,dednal/chromium.src,Jonekee/chromium.src,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,M4sse/chromium.src,axinging/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,dushu1203/chromium.src,axinging/chromium-crosswalk,Just-D/chromium-1,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,Jonekee/chromium.src,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,Pluto-tv/chromium-crosswalk,hgl888/chromium-crosswalk,Chilledheart/chromium,PeterWangIntel/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dednal/chromium.src,crosswalk-project/chromium-crosswalk-efl,Fireblend/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,Jonekee/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,axinging/chromium-crosswalk,markYoungH/chromium.src |
404504635570833ffec7857cfa28e055b276b521 | optional/capi/ext/proc_spec.c | optional/capi/ext/proc_spec.c | #include <string.h>
#include "ruby.h"
#include "rubyspec.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef HAVE_RB_PROC_NEW
VALUE concat_func(VALUE args) {
int i;
char buffer[500] = {0};
if (TYPE(args) != T_ARRAY) return Qnil;
for(i = 0; i < RARRAY_LEN(args); ++i) {
VALUE v = RARRAY_PTR(args)[i];
strcat(buffer, StringValuePtr(v));
strcat(buffer, "_");
}
buffer[strlen(buffer) - 1] = 0;
return rb_str_new2(buffer);
}
VALUE sp_underline_concat_proc(VALUE self) {
return rb_proc_new(concat_func, Qnil);
}
#endif
void Init_proc_spec() {
VALUE cls;
cls = rb_define_class("CApiProcSpecs", rb_cObject);
#ifdef HAVE_RB_PROC_NEW
rb_define_method(cls, "underline_concat_proc", sp_underline_concat_proc, 0);
#endif
}
#ifdef __cplusplus
}
#endif
| #include <string.h>
#include "ruby.h"
#include "rubyspec.h"
#ifdef __cplusplus
extern "C" {
#endif
#ifdef HAVE_RB_PROC_NEW
VALUE concat_func(VALUE args) {
int i;
char buffer[500] = {0};
if (TYPE(val) != T_ARRAY) return Qnil;
for(i = 0; i < RARRAY_LEN(args); ++i) {
VALUE v = RARRAY_PTR(args)[i];
strcat(buffer, StringValuePtr(v));
strcat(buffer, "_");
}
buffer[strlen(buffer) - 1] = 0;
return rb_str_new2(buffer);
}
VALUE sp_underline_concat_proc(VALUE self) {
return rb_proc_new(concat_func, Qnil);
}
#endif
void Init_proc_spec() {
VALUE cls;
cls = rb_define_class("CApiProcSpecs", rb_cObject);
#ifdef HAVE_RB_PROC_NEW
rb_define_method(cls, "underline_concat_proc", sp_underline_concat_proc, 0);
#endif
}
#ifdef __cplusplus
}
#endif
| Revert "Fix typo in the commit a5312c77." | Revert "Fix typo in the commit a5312c77."
This reverts commit 401825d6045ab8e3bd1514404e7c326a045a92ae.
See the following revert for an explanation.
| C | mit | godfat/rubyspec,chesterbr/rubyspec,kachick/rubyspec,iainbeeston/rubyspec,yous/rubyspec,sferik/rubyspec,flavio/rubyspec,markburns/rubyspec,scooter-dangle/rubyspec,benlovell/rubyspec,lucaspinto/rubyspec,ruby/rubyspec,Zoxc/rubyspec,metadave/rubyspec,saturnflyer/rubyspec,eregon/rubyspec,alex/rubyspec,Aesthetikx/rubyspec,JuanitoFatas/rubyspec,roshats/rubyspec,MagLev/rubyspec,freerange/rubyspec,no6v/rubyspec,xaviershay/rubyspec,chesterbr/rubyspec,terceiro/rubyspec,jannishuebl/rubyspec,lucaspinto/rubyspec,flavio/rubyspec,timfel/rubyspec,rdp/rubyspec,sgarciac/spec,josedonizetti/rubyspec,nevir/rubyspec,sferik/rubyspec,neomadara/rubyspec,marcandre/rubyspec,roshats/rubyspec,rkh/rubyspec,qmx/rubyspec,nevir/rubyspec,agrimm/rubyspec,DawidJanczak/rubyspec,Zoxc/rubyspec,tinco/rubyspec,benburkert/rubyspec,kidaa/rubyspec,wied03/rubyspec,saturnflyer/rubyspec,DawidJanczak/rubyspec,jstepien/rubyspec,terceiro/rubyspec,ruby/spec,wied03/rubyspec,bomatson/rubyspec,sgarciac/spec,eregon/rubyspec,MagLev/rubyspec,nobu/rubyspec,mrkn/rubyspec,griff/rubyspec,askl56/rubyspec,BanzaiMan/rubyspec,shirosaki/rubyspec,iliabylich/rubyspec,atambo/rubyspec,sgarciac/spec,yb66/rubyspec,mbj/rubyspec,DavidEGrayson/rubyspec,iliabylich/rubyspec,amarshall/rubyspec,bl4ckdu5t/rubyspec,JuanitoFatas/rubyspec,iainbeeston/rubyspec,neomadara/rubyspec,mrkn/rubyspec,ruby/spec,kidaa/rubyspec,ericmeyer/rubyspec,yaauie/rubyspec,alexch/rubyspec,DavidEGrayson/rubyspec,no6v/rubyspec,timfel/rubyspec,askl56/rubyspec,alindeman/rubyspec,julik/rubyspec,rdp/rubyspec,yb66/rubyspec,kachick/rubyspec,julik/rubyspec,ruby/rubyspec,xaviershay/rubyspec,jannishuebl/rubyspec,freerange/rubyspec,bomatson/rubyspec,marcandre/rubyspec,teleological/rubyspec,tinco/rubyspec,atambo/rubyspec,BanzaiMan/rubyspec,amarshall/rubyspec,benlovell/rubyspec,alexch/rubyspec,bjeanes/rubyspec,nobu/rubyspec,nobu/rubyspec,kachick/rubyspec,rkh/rubyspec,yaauie/rubyspec,griff/rubyspec,alindeman/rubyspec,jvshahid/rubyspec,oggy/rubyspec,ruby/spec,Aesthetikx/rubyspec,alex/rubyspec,jvshahid/rubyspec,josedonizetti/rubyspec,enricosada/rubyspec,godfat/rubyspec,wied03/rubyspec,benburkert/rubyspec,bjeanes/rubyspec,mbj/rubyspec,qmx/rubyspec,agrimm/rubyspec,markburns/rubyspec,scooter-dangle/rubyspec,ericmeyer/rubyspec,oggy/rubyspec,yous/rubyspec,bl4ckdu5t/rubyspec,shirosaki/rubyspec,metadave/rubyspec,eregon/rubyspec,jstepien/rubyspec,enricosada/rubyspec,teleological/rubyspec |
8e4c186215c3d086a734dc0aec7f119b8a88c0a9 | ui/views/widget/desktop_capture_client.h | ui/views/widget/desktop_capture_client.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 UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_
#define UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "ui/aura/client/capture_client.h"
#include "ui/views/views_export.h"
namespace views {
class VIEWS_EXPORT DesktopCaptureClient : public aura::client::CaptureClient {
public:
DesktopCaptureClient();
virtual ~DesktopCaptureClient();
private:
// Overridden from aura::client::CaptureClient:
virtual void SetCapture(aura::Window* window) OVERRIDE;
virtual void ReleaseCapture(aura::Window* window) OVERRIDE;
virtual aura::Window* GetCaptureWindow() OVERRIDE;
aura::Window* capture_window_;
DISALLOW_COPY_AND_ASSIGN(DesktopCaptureClient);
};
} // namespace views
#endif // UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_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 UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_
#define UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_
#include "base/basictypes.h"
#include "base/compiler_specific.h"
#include "ui/aura/client/capture_client.h"
namespace views {
class DesktopCaptureClient : public aura::client::CaptureClient {
public:
DesktopCaptureClient();
virtual ~DesktopCaptureClient();
private:
// Overridden from aura::client::CaptureClient:
virtual void SetCapture(aura::Window* window) OVERRIDE;
virtual void ReleaseCapture(aura::Window* window) OVERRIDE;
virtual aura::Window* GetCaptureWindow() OVERRIDE;
aura::Window* capture_window_;
DISALLOW_COPY_AND_ASSIGN(DesktopCaptureClient);
};
} // namespace views
#endif // UI_VIEWS_WIDGET_DESKTOP_CAPTURE_CLIENT_H_
| Revert 155836 - Fix static build. | Revert 155836 - Fix static build.
[email protected]
Review URL: https://chromiumcodereview.appspot.com/10918157
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@155841 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | anirudhSK/chromium,Jonekee/chromium.src,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,crosswalk-project/chromium-crosswalk-efl,chuan9/chromium-crosswalk,ltilve/chromium,hujiajie/pa-chromium,axinging/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,ltilve/chromium,nacl-webkit/chrome_deps,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,ltilve/chromium,littlstar/chromium.src,dushu1203/chromium.src,ondra-novak/chromium.src,Chilledheart/chromium,hujiajie/pa-chromium,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,fujunwei/chromium-crosswalk,M4sse/chromium.src,Jonekee/chromium.src,timopulkkinen/BubbleFish,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,littlstar/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,dednal/chromium.src,chuan9/chromium-crosswalk,dednal/chromium.src,krieger-od/nwjs_chromium.src,ondra-novak/chromium.src,ltilve/chromium,jaruba/chromium.src,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,mogoweb/chromium-crosswalk,Pluto-tv/chromium-crosswalk,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,hujiajie/pa-chromium,hujiajie/pa-chromium,Just-D/chromium-1,anirudhSK/chromium,markYoungH/chromium.src,fujunwei/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,Pluto-tv/chromium-crosswalk,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,ltilve/chromium,PeterWangIntel/chromium-crosswalk,fujunwei/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,dushu1203/chromium.src,chuan9/chromium-crosswalk,patrickm/chromium.src,fujunwei/chromium-crosswalk,jaruba/chromium.src,Fireblend/chromium-crosswalk,Jonekee/chromium.src,zcbenz/cefode-chromium,markYoungH/chromium.src,hujiajie/pa-chromium,Fireblend/chromium-crosswalk,hgl888/chromium-crosswalk-efl,bright-sparks/chromium-spacewalk,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,anirudhSK/chromium,axinging/chromium-crosswalk,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,junmin-zhu/chromium-rivertrail,dednal/chromium.src,hgl888/chromium-crosswalk,Chilledheart/chromium,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,krieger-od/nwjs_chromium.src,dednal/chromium.src,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,markYoungH/chromium.src,mogoweb/chromium-crosswalk,ondra-novak/chromium.src,hujiajie/pa-chromium,patrickm/chromium.src,nacl-webkit/chrome_deps,M4sse/chromium.src,Jonekee/chromium.src,TheTypoMaster/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,anirudhSK/chromium,patrickm/chromium.src,anirudhSK/chromium,Jonekee/chromium.src,nacl-webkit/chrome_deps,chuan9/chromium-crosswalk,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Pluto-tv/chromium-crosswalk,jaruba/chromium.src,ondra-novak/chromium.src,Pluto-tv/chromium-crosswalk,Pluto-tv/chromium-crosswalk,Just-D/chromium-1,mogoweb/chromium-crosswalk,M4sse/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,jaruba/chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,mogoweb/chromium-crosswalk,hgl888/chromium-crosswalk,ltilve/chromium,timopulkkinen/BubbleFish,junmin-zhu/chromium-rivertrail,dednal/chromium.src,junmin-zhu/chromium-rivertrail,Chilledheart/chromium,axinging/chromium-crosswalk,chuan9/chromium-crosswalk,ChromiumWebApps/chromium,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,jaruba/chromium.src,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,Just-D/chromium-1,PeterWangIntel/chromium-crosswalk,Fireblend/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,Fireblend/chromium-crosswalk,ChromiumWebApps/chromium,ondra-novak/chromium.src,hgl888/chromium-crosswalk,chuan9/chromium-crosswalk,markYoungH/chromium.src,Chilledheart/chromium,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,hgl888/chromium-crosswalk-efl,dednal/chromium.src,mogoweb/chromium-crosswalk,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,anirudhSK/chromium,crosswalk-project/chromium-crosswalk-efl,Jonekee/chromium.src,ChromiumWebApps/chromium,bright-sparks/chromium-spacewalk,littlstar/chromium.src,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,M4sse/chromium.src,littlstar/chromium.src,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk,hujiajie/pa-chromium,zcbenz/cefode-chromium,pozdnyakov/chromium-crosswalk,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,Chilledheart/chromium,mohamed--abdel-maksoud/chromium.src,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,littlstar/chromium.src,markYoungH/chromium.src,bright-sparks/chromium-spacewalk,timopulkkinen/BubbleFish,dednal/chromium.src,ltilve/chromium,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,krieger-od/nwjs_chromium.src,mohamed--abdel-maksoud/chromium.src,jaruba/chromium.src,krieger-od/nwjs_chromium.src,fujunwei/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,ltilve/chromium,patrickm/chromium.src,krieger-od/nwjs_chromium.src,jaruba/chromium.src,axinging/chromium-crosswalk,Chilledheart/chromium,ltilve/chromium,hgl888/chromium-crosswalk-efl,hujiajie/pa-chromium,timopulkkinen/BubbleFish,ChromiumWebApps/chromium,markYoungH/chromium.src,anirudhSK/chromium,TheTypoMaster/chromium-crosswalk,patrickm/chromium.src,TheTypoMaster/chromium-crosswalk,Jonekee/chromium.src,markYoungH/chromium.src,ChromiumWebApps/chromium,Just-D/chromium-1,nacl-webkit/chrome_deps,Jonekee/chromium.src,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,mogoweb/chromium-crosswalk,krieger-od/nwjs_chromium.src,junmin-zhu/chromium-rivertrail,Just-D/chromium-1,jaruba/chromium.src,jaruba/chromium.src,crosswalk-project/chromium-crosswalk-efl,pozdnyakov/chromium-crosswalk,jaruba/chromium.src,mohamed--abdel-maksoud/chromium.src,fujunwei/chromium-crosswalk,anirudhSK/chromium,hgl888/chromium-crosswalk,anirudhSK/chromium,fujunwei/chromium-crosswalk,Jonekee/chromium.src,Just-D/chromium-1,dushu1203/chromium.src,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,M4sse/chromium.src,Chilledheart/chromium,krieger-od/nwjs_chromium.src,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,bright-sparks/chromium-spacewalk,hujiajie/pa-chromium,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,crosswalk-project/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk-efl,Chilledheart/chromium,dednal/chromium.src,patrickm/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,dushu1203/chromium.src,dushu1203/chromium.src,fujunwei/chromium-crosswalk,jaruba/chromium.src,Jonekee/chromium.src,M4sse/chromium.src,M4sse/chromium.src,nacl-webkit/chrome_deps,dednal/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,axinging/chromium-crosswalk,ondra-novak/chromium.src,TheTypoMaster/chromium-crosswalk,junmin-zhu/chromium-rivertrail,crosswalk-project/chromium-crosswalk-efl,axinging/chromium-crosswalk,M4sse/chromium.src,nacl-webkit/chrome_deps,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,Fireblend/chromium-crosswalk,anirudhSK/chromium,zcbenz/cefode-chromium,ChromiumWebApps/chromium,patrickm/chromium.src,pozdnyakov/chromium-crosswalk,ChromiumWebApps/chromium,axinging/chromium-crosswalk,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,Fireblend/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mogoweb/chromium-crosswalk,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,patrickm/chromium.src,dednal/chromium.src,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,M4sse/chromium.src,hujiajie/pa-chromium,ondra-novak/chromium.src,dushu1203/chromium.src |
8c274b950988b1bb4e56ce734f4817dc4788ecaa | lib/tinynotify-cli.c | lib/tinynotify-cli.c | /* libtinynotify
* (c) 2011 Michał Górny
* 2-clause BSD-licensed
*/
#include "config.h"
#include "tinynotify-cli.h"
#include "tinynotify.h"
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
Notification notification_new_from_cmdline(int argc, char *argv[]) {
int opterr_backup = opterr;
int arg;
const char *icon = NOTIFICATION_DEFAULT_APP_ICON;
const char *summary;
const char *body = NOTIFICATION_NO_BODY;
Notification n;
opterr = 0; /* be quiet about nonsense args */
while (((arg = getopt(argc, argv, "i:"))) != -1) {
switch (arg) {
case 'i':
icon = optarg;
break;
}
}
opterr = opterr_backup;
if (optind >= argc) {
/* XXX, better error handling? */
return NULL;
}
summary = argv[optind++];
if (optind < argc)
body = argv[optind++];
n = notification_new(summary, body);
notification_set_formatting(n, 0);
if (icon)
notification_set_app_icon(n, icon);
return n;
}
| /* libtinynotify
* (c) 2011 Michał Górny
* 2-clause BSD-licensed
*/
#include "config.h"
#include "tinynotify.h"
#include "tinynotify-cli.h"
#include <stdlib.h>
#include <unistd.h>
#include <getopt.h>
Notification notification_new_from_cmdline(int argc, char *argv[]) {
int opterr_backup = opterr;
int arg;
const char *icon = NOTIFICATION_DEFAULT_APP_ICON;
const char *summary;
const char *body = NOTIFICATION_NO_BODY;
Notification n;
opterr = 0; /* be quiet about nonsense args */
while (((arg = getopt(argc, argv, "i:"))) != -1) {
switch (arg) {
case 'i':
icon = optarg;
break;
}
}
opterr = opterr_backup;
if (optind >= argc) {
/* XXX, better error handling? */
return NULL;
}
summary = argv[optind++];
if (optind < argc)
body = argv[optind++];
n = notification_new(summary, body);
notification_set_formatting(n, 0);
if (icon)
notification_set_app_icon(n, icon);
return n;
}
| Switch header order to ensure local gets used before system one. | Switch header order to ensure local gets used before system one.
| C | bsd-2-clause | mortbauer/tinynotify-send,mortbauer/libtinynotify |
3c219200ac98dc367dcfbbf027efab4f3a3b1475 | quic/platform/api/quic_test.h | quic/platform/api/quic_test.h | // Copyright (c) 2017 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 QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
#define QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
#include "quic/platform/api/quic_logging.h"
#include "net/quic/platform/impl/quic_test_impl.h"
using QuicFlagSaver = QuicFlagSaverImpl;
// Defines the base classes to be used in QUIC tests.
using QuicTest = QuicTestImpl;
template <class T>
using QuicTestWithParam = QuicTestWithParamImpl<T>;
// Class which needs to be instantiated in tests which use threads.
using ScopedEnvironmentForThreads = ScopedEnvironmentForThreadsImpl;
#define QUIC_TEST_DISABLED_IN_CHROME(name) \
QUIC_TEST_DISABLED_IN_CHROME_IMPL(name)
inline std::string QuicGetTestMemoryCachePath() {
return QuicGetTestMemoryCachePathImpl();
}
#define QUIC_SLOW_TEST(test) QUIC_SLOW_TEST_IMPL(test)
#endif // QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
| // Copyright (c) 2017 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 QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
#define QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
#include "quic/platform/api/quic_logging.h"
#include "net/quic/platform/impl/quic_test_impl.h"
#include "common/platform/api/quiche_test.h"
using QuicFlagSaver = QuicFlagSaverImpl;
// Defines the base classes to be used in QUIC tests.
using QuicTest = QuicTestImpl;
template <class T>
using QuicTestWithParam = QuicTestWithParamImpl<T>;
// Class which needs to be instantiated in tests which use threads.
using ScopedEnvironmentForThreads = ScopedEnvironmentForThreadsImpl;
#define QUIC_TEST_DISABLED_IN_CHROME(name) \
QUIC_TEST_DISABLED_IN_CHROME_IMPL(name)
inline std::string QuicGetTestMemoryCachePath() {
return QuicGetTestMemoryCachePathImpl();
}
#define QUIC_SLOW_TEST(test) QUIC_SLOW_TEST_IMPL(test)
#endif // QUICHE_QUIC_PLATFORM_API_QUIC_TEST_H_
| Move EXPECT_EQ macro magic from quic/platform to quiche/platform. | Move EXPECT_EQ macro magic from quic/platform to quiche/platform.
The purpose of this machinary is to override EXPECT_EQ and similar comparison
macros so that -Wsigned-compare actually catches signed-unsigned comparison in
internal builds (where gTest implementation is slightly different so otherwise
the warning would not be effective). This CL moves it from
quic/platform/api/quic_test.h to quiche/common/platform/quiche_test.h, while
also adding an include of the latter to the former, to make users of either
header benefit from it.
The change to frame_formatter_test.cc is necessary to avoid the following
error:
third_party/http2/tools/frame_formatter_test.cc:75:3: error: non-const lvalue reference to type 'basic_string<...>' cannot bind to a temporary of type 'basic_string<...>'
EXPECT_EQ("\x01 a", std::move(status_or_parsed).value());
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./third_party/quiche/common/platform/impl/quiche_test_impl.h:73:3: note: expanded from macro 'EXPECT_EQ'
QUIC_LOGGING_INTERNAL_EXPECT_EXT(EqHelper::Compare, ==, val1, val2)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./third_party/quiche/common/platform/impl/quiche_test_impl.h:68:3: note: expanded from macro 'QUIC_LOGGING_INTERNAL_EXPECT_EXT'
QUIC_LOGGING_INTERNAL_INNER_COMPARE(_comparison_symbol, _val1, _val2); \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./net/quic/platform_overrides/quiche_platform_impl/quiche_logging_impl.h:164:30: note: expanded from macro 'QUIC_LOGGING_INTERNAL_INNER_COMPARE'
const decltype(_val2)& _local_val2 = (_val2); \
PiperOrigin-RevId: 390165392
| C | bsd-3-clause | google/quiche,google/quiche,google/quiche,google/quiche |
ec11df6a1272f275bbda22375ee8a84c034e09b4 | modules/modinclude.h | modules/modinclude.h | #include "../main.h"
class ConfigReader;
class ModuleInterface; // forward-declare so it can be used in modules and server
#include "../connection.h" // declare other classes that use it
#include "../modules.h"
#include "../config.cpp"
#include "../modinterface.cpp" | #include "../main.h"
class ConfigReader;
class ModuleInterface; // forward-declare so it can be used in modules and server
#include "../connection.h" // declare other classes that use it
#include "../modules.h"
#include "../config.cpp"
#include "../modules.cpp"
#include "../modinterface.cpp" | Add a file to the module include. | Add a file to the module include.
| C | mit | ElementalAlchemist/RoBoBo,ElementalAlchemist/RoBoBo |
addd55dcf27bda9e3f6cfe4301c067276fa67161 | plugins/ua_debug_dump_pkgs.c | plugins/ua_debug_dump_pkgs.c | /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
* See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
#include "ua_util.h"
#include <ctype.h>
#include <stdio.h>
void UA_dump_hex_pkg(UA_Byte* buffer, size_t bufferLen) {
printf("--------------- HEX Package Start ---------------\n");
char ascii[17];
memset(ascii,0,17);
for (size_t i = 0; i < bufferLen; i++)
{
if (i == 0)
printf("%08zx ", i);
else if (i%16 == 0)
printf("|%s|\n%08zx ", ascii, i);
if (isprint((int)(buffer[i])))
ascii[i%16] = (char)buffer[i];
else
ascii[i%16] = '.';
printf("%02X ", (unsigned char)buffer[i]);
}
size_t fillPos = bufferLen %16;
ascii[fillPos] = 0;
for (size_t i=fillPos; i<16; i++) {
printf(" ");
}
printf("|%s|\n%08zx\n", ascii, bufferLen);
printf("--------------- HEX Package END ---------------\n");
}
| /* This work is licensed under a Creative Commons CCZero 1.0 Universal License.
* See http://creativecommons.org/publicdomain/zero/1.0/ for more information. */
#include "ua_util.h"
#include <ctype.h>
#include <stdio.h>
void UA_dump_hex_pkg(UA_Byte* buffer, size_t bufferLen) {
printf("--------------- HEX Package Start ---------------\n");
char ascii[17];
memset(ascii,0,17);
for (size_t i = 0; i < bufferLen; i++)
{
if (i == 0)
printf("%08zx ", i);
else if (i%16 == 0)
printf(" |%s|\n%08zx ", ascii, i);
if (isprint((int)(buffer[i])))
ascii[i%16] = (char)buffer[i];
else
ascii[i%16] = '.';
if (i%8==0)
printf(" ");
printf("%02X ", (unsigned char)buffer[i]);
}
size_t fillPos = bufferLen %16;
ascii[fillPos] = 0;
for (size_t i=fillPos; i<16; i++) {
if (i%8==0)
printf(" ");
printf(" ");
}
printf(" |%s|\n%08zx\n", ascii, bufferLen);
printf("--------------- HEX Package END ---------------\n");
}
| Align format with `hexdump -C` | Align format with `hexdump -C`
| C | mpl-2.0 | JGrothoff/open62541,open62541/open62541,JGrothoff/open62541,JGrothoff/open62541,jpfr/open62541,jpfr/open62541,open62541/open62541,open62541/open62541,StalderT/open62541,jpfr/open62541,JGrothoff/open62541,StalderT/open62541,StalderT/open62541,StalderT/open62541,open62541/open62541,jpfr/open62541 |
f412fab9497a47ca77eece623fe53927302948c0 | TWTValidation/TWTValidationLocalization.h | TWTValidation/TWTValidationLocalization.h | //
// TWTValidationLocalization.h
// TWTValidation
//
// Created by Prachi Gauriar on 4/3/2014.
// Copyright (c) 2014 Two Toasters, LLC. All rights reserved.
//
#define TWTLocalizedString(key) \
[[NSBundle bundleForClass:[self class]] localizedStringForKey:(key) value:@"" table:@"TWTValidation"]
| //
// TWTValidationLocalization.h
// TWTValidation
//
// Created by Prachi Gauriar on 4/3/2014.
// Copyright (c) 2014 Two Toasters, LLC.
//
// 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.
//
#define TWTLocalizedString(key) \
[[NSBundle bundleForClass:[self class]] localizedStringForKey:(key) value:@"" table:@"TWTValidation"]
| Add license to localization header | Add license to localization header
| C | mit | twotoasters/TWTValidation,twotoasters/TWTValidation,twotoasters/TWTValidation |
a305a32942efd7c37196b6229ac765d5c850d1fa | bibdesk/BDSKSearchGroupViewController.h | bibdesk/BDSKSearchGroupViewController.h | //
// BDSKSearchGroupViewController.h
// Bibdesk
//
// Created by Christiaan Hofman on 1/2/07.
/*
This software is Copyright (c) 2007
Christiaan Hofman. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
- Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
- 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.
- Neither the name of Christiaan Hofman nor the names of any
contributors may be used to endorse or promote products derived
from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS 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 COPYRIGHT
OWNER 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.
*/
#import <Cocoa/Cocoa.h>
@class BDSKCollapsibleView, BDSKEdgeView, BDSKSearchGroup;
@interface BDSKSearchGroupViewController : NSWindowController {
IBOutlet BDSKCollapsibleView *view;
IBOutlet BDSKEdgeView *edgeView;
IBOutlet NSSearchField *searchField;
IBOutlet NSButton *searchButton;
BDSKSearchGroup *group;
}
- (NSView *)view;
- (BDSKSearchGroup *)group;
- (void)setGroup:(BDSKSearchGroup *)newGroup;
- (IBAction)changeSearchTerm:(id)sender;
- (IBAction)nextSearch:(id)sender;
@end
| Add new header file. (or: xcode is stupid) | Add new header file. (or: xcode is stupid)
| C | bsd-3-clause | JackieXie168/skim,JackieXie168/skim,JackieXie168/skim,JackieXie168/skim,JackieXie168/skim |
|
895dedeb2104e08ae4256d6f8f862798cb4d92f0 | chrome/browser/ui/panels/panel_browser_window_gtk.h | chrome/browser/ui/panels/panel_browser_window_gtk.h | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
#define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
#include "chrome/browser/ui/gtk/browser_window_gtk.h"
class Panel;
class PanelBrowserWindowGtk : public BrowserWindowGtk {
public:
PanelBrowserWindowGtk(Browser* browser, Panel* panel);
virtual ~PanelBrowserWindowGtk() {}
// BrowserWindowGtk overrides
virtual void Init() OVERRIDE;
// BrowserWindow overrides
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
protected:
// BrowserWindowGtk overrides
virtual bool GetWindowEdge(int x, int y, GdkWindowEdge* edge) OVERRIDE;
virtual bool HandleTitleBarLeftMousePress(
GdkEventButton* event,
guint32 last_click_time,
gfx::Point last_click_position) OVERRIDE;
virtual void SaveWindowPosition() OVERRIDE;
virtual void SetGeometryHints() OVERRIDE;
virtual bool UseCustomFrame() OVERRIDE;
private:
void SetBoundsImpl();
scoped_ptr<Panel> panel_;
DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk);
};
#endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
| // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
#define CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
#include "chrome/browser/ui/gtk/browser_window_gtk.h"
class Panel;
class PanelBrowserWindowGtk : public BrowserWindowGtk {
public:
PanelBrowserWindowGtk(Browser* browser, Panel* panel);
virtual ~PanelBrowserWindowGtk() {}
// BrowserWindowGtk overrides
virtual void Init() OVERRIDE;
// BrowserWindow overrides
virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE;
protected:
// BrowserWindowGtk overrides
virtual bool GetWindowEdge(int x, int y, GdkWindowEdge* edge) OVERRIDE;
virtual bool HandleTitleBarLeftMousePress(
GdkEventButton* event,
guint32 last_click_time,
gfx::Point last_click_position) OVERRIDE;
virtual void SaveWindowPosition() OVERRIDE;
virtual void SetGeometryHints() OVERRIDE;
virtual bool UseCustomFrame() OVERRIDE;
private:
void SetBoundsImpl();
Panel* panel_;
DISALLOW_COPY_AND_ASSIGN(PanelBrowserWindowGtk);
};
#endif // CHROME_BROWSER_UI_PANELS_PANEL_BROWSER_WINDOW_GTK_H_
| Revert 88154 - Use scoped_ptr for Panel in PanelBrowserWindowGTK. Reason: PanelBrowserWindow dtor is now complex and cannot be inlined. | Revert 88154 - Use scoped_ptr for Panel in PanelBrowserWindowGTK.
Reason: PanelBrowserWindow dtor is now complex and cannot be inlined.
BUG=None
TEST=Verified WindowOpenPanel test now hits Panel destructor.
Review URL: http://codereview.chromium.org/7120011
[email protected]
Review URL: http://codereview.chromium.org/7003035
git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@88159 0039d316-1c4b-4281-b951-d872f2087c98
| C | bsd-3-clause | nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,littlstar/chromium.src,axinging/chromium-crosswalk,hujiajie/pa-chromium,dushu1203/chromium.src,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,markYoungH/chromium.src,hujiajie/pa-chromium,zcbenz/cefode-chromium,mohamed--abdel-maksoud/chromium.src,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,Fireblend/chromium-crosswalk,dednal/chromium.src,dushu1203/chromium.src,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,keishi/chromium,hujiajie/pa-chromium,axinging/chromium-crosswalk,patrickm/chromium.src,dushu1203/chromium.src,zcbenz/cefode-chromium,anirudhSK/chromium,ondra-novak/chromium.src,chuan9/chromium-crosswalk,zcbenz/cefode-chromium,robclark/chromium,bright-sparks/chromium-spacewalk,littlstar/chromium.src,axinging/chromium-crosswalk,rogerwang/chromium,anirudhSK/chromium,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,M4sse/chromium.src,ondra-novak/chromium.src,crosswalk-project/chromium-crosswalk-efl,ChromiumWebApps/chromium,junmin-zhu/chromium-rivertrail,patrickm/chromium.src,Jonekee/chromium.src,Jonekee/chromium.src,fujunwei/chromium-crosswalk,nacl-webkit/chrome_deps,M4sse/chromium.src,robclark/chromium,axinging/chromium-crosswalk,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,Fireblend/chromium-crosswalk,pozdnyakov/chromium-crosswalk,Just-D/chromium-1,mogoweb/chromium-crosswalk,pozdnyakov/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,Jonekee/chromium.src,krieger-od/nwjs_chromium.src,M4sse/chromium.src,robclark/chromium,zcbenz/cefode-chromium,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,chuan9/chromium-crosswalk,markYoungH/chromium.src,Just-D/chromium-1,Jonekee/chromium.src,crosswalk-project/chromium-crosswalk-efl,jaruba/chromium.src,ltilve/chromium,markYoungH/chromium.src,chuan9/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,junmin-zhu/chromium-rivertrail,littlstar/chromium.src,jaruba/chromium.src,M4sse/chromium.src,anirudhSK/chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk-efl,mohamed--abdel-maksoud/chromium.src,mogoweb/chromium-crosswalk,mohamed--abdel-maksoud/chromium.src,axinging/chromium-crosswalk,littlstar/chromium.src,keishi/chromium,robclark/chromium,chuan9/chromium-crosswalk,hujiajie/pa-chromium,anirudhSK/chromium,ChromiumWebApps/chromium,zcbenz/cefode-chromium,nacl-webkit/chrome_deps,rogerwang/chromium,keishi/chromium,patrickm/chromium.src,ChromiumWebApps/chromium,anirudhSK/chromium,hgl888/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,Fireblend/chromium-crosswalk,littlstar/chromium.src,ondra-novak/chromium.src,keishi/chromium,Fireblend/chromium-crosswalk,chuan9/chromium-crosswalk,mogoweb/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,hgl888/chromium-crosswalk,ChromiumWebApps/chromium,ChromiumWebApps/chromium,hujiajie/pa-chromium,Jonekee/chromium.src,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,ChromiumWebApps/chromium,Chilledheart/chromium,markYoungH/chromium.src,mohamed--abdel-maksoud/chromium.src,timopulkkinen/BubbleFish,patrickm/chromium.src,timopulkkinen/BubbleFish,hgl888/chromium-crosswalk-efl,robclark/chromium,hujiajie/pa-chromium,pozdnyakov/chromium-crosswalk,anirudhSK/chromium,ChromiumWebApps/chromium,dushu1203/chromium.src,zcbenz/cefode-chromium,jaruba/chromium.src,markYoungH/chromium.src,mogoweb/chromium-crosswalk,Chilledheart/chromium,ondra-novak/chromium.src,nacl-webkit/chrome_deps,mohamed--abdel-maksoud/chromium.src,dednal/chromium.src,rogerwang/chromium,ltilve/chromium,junmin-zhu/chromium-rivertrail,nacl-webkit/chrome_deps,ChromiumWebApps/chromium,pozdnyakov/chromium-crosswalk,bright-sparks/chromium-spacewalk,hgl888/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,hujiajie/pa-chromium,dushu1203/chromium.src,pozdnyakov/chromium-crosswalk,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,Just-D/chromium-1,markYoungH/chromium.src,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,PeterWangIntel/chromium-crosswalk,ondra-novak/chromium.src,anirudhSK/chromium,dushu1203/chromium.src,Just-D/chromium-1,axinging/chromium-crosswalk,ltilve/chromium,Fireblend/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,robclark/chromium,mohamed--abdel-maksoud/chromium.src,Just-D/chromium-1,Just-D/chromium-1,pozdnyakov/chromium-crosswalk,markYoungH/chromium.src,hujiajie/pa-chromium,fujunwei/chromium-crosswalk,ondra-novak/chromium.src,bright-sparks/chromium-spacewalk,Fireblend/chromium-crosswalk,ltilve/chromium,hujiajie/pa-chromium,ChromiumWebApps/chromium,hgl888/chromium-crosswalk,axinging/chromium-crosswalk,nacl-webkit/chrome_deps,krieger-od/nwjs_chromium.src,dednal/chromium.src,M4sse/chromium.src,fujunwei/chromium-crosswalk,dednal/chromium.src,hgl888/chromium-crosswalk-efl,krieger-od/nwjs_chromium.src,ChromiumWebApps/chromium,dednal/chromium.src,Pluto-tv/chromium-crosswalk,pozdnyakov/chromium-crosswalk,dednal/chromium.src,ltilve/chromium,hgl888/chromium-crosswalk-efl,hgl888/chromium-crosswalk-efl,dushu1203/chromium.src,nacl-webkit/chrome_deps,Chilledheart/chromium,keishi/chromium,dushu1203/chromium.src,M4sse/chromium.src,hgl888/chromium-crosswalk-efl,PeterWangIntel/chromium-crosswalk,hgl888/chromium-crosswalk,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,crosswalk-project/chromium-crosswalk-efl,rogerwang/chromium,bright-sparks/chromium-spacewalk,chuan9/chromium-crosswalk,pozdnyakov/chromium-crosswalk,krieger-od/nwjs_chromium.src,Pluto-tv/chromium-crosswalk,zcbenz/cefode-chromium,timopulkkinen/BubbleFish,fujunwei/chromium-crosswalk,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,littlstar/chromium.src,dushu1203/chromium.src,rogerwang/chromium,keishi/chromium,crosswalk-project/chromium-crosswalk-efl,timopulkkinen/BubbleFish,nacl-webkit/chrome_deps,hgl888/chromium-crosswalk,rogerwang/chromium,patrickm/chromium.src,jaruba/chromium.src,robclark/chromium,junmin-zhu/chromium-rivertrail,rogerwang/chromium,timopulkkinen/BubbleFish,PeterWangIntel/chromium-crosswalk,keishi/chromium,jaruba/chromium.src,bright-sparks/chromium-spacewalk,TheTypoMaster/chromium-crosswalk,M4sse/chromium.src,dednal/chromium.src,junmin-zhu/chromium-rivertrail,dednal/chromium.src,zcbenz/cefode-chromium,hgl888/chromium-crosswalk-efl,Just-D/chromium-1,junmin-zhu/chromium-rivertrail,jaruba/chromium.src,dushu1203/chromium.src,M4sse/chromium.src,littlstar/chromium.src,jaruba/chromium.src,M4sse/chromium.src,keishi/chromium,fujunwei/chromium-crosswalk,ltilve/chromium,krieger-od/nwjs_chromium.src,Chilledheart/chromium,robclark/chromium,pozdnyakov/chromium-crosswalk,dednal/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,fujunwei/chromium-crosswalk,dednal/chromium.src,Just-D/chromium-1,ltilve/chromium,Pluto-tv/chromium-crosswalk,littlstar/chromium.src,crosswalk-project/chromium-crosswalk-efl,crosswalk-project/chromium-crosswalk-efl,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,timopulkkinen/BubbleFish,Fireblend/chromium-crosswalk,Pluto-tv/chromium-crosswalk,anirudhSK/chromium,Jonekee/chromium.src,anirudhSK/chromium,fujunwei/chromium-crosswalk,krieger-od/nwjs_chromium.src,nacl-webkit/chrome_deps,mogoweb/chromium-crosswalk,patrickm/chromium.src,markYoungH/chromium.src,hgl888/chromium-crosswalk,jaruba/chromium.src,krieger-od/nwjs_chromium.src,Jonekee/chromium.src,chuan9/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,hgl888/chromium-crosswalk,timopulkkinen/BubbleFish,zcbenz/cefode-chromium,rogerwang/chromium,bright-sparks/chromium-spacewalk,ondra-novak/chromium.src,timopulkkinen/BubbleFish,Chilledheart/chromium,junmin-zhu/chromium-rivertrail,Pluto-tv/chromium-crosswalk,axinging/chromium-crosswalk,fujunwei/chromium-crosswalk,jaruba/chromium.src,jaruba/chromium.src,mogoweb/chromium-crosswalk,TheTypoMaster/chromium-crosswalk,rogerwang/chromium,patrickm/chromium.src,PeterWangIntel/chromium-crosswalk,markYoungH/chromium.src,hujiajie/pa-chromium,hgl888/chromium-crosswalk-efl,chuan9/chromium-crosswalk,axinging/chromium-crosswalk,timopulkkinen/BubbleFish,ondra-novak/chromium.src,ondra-novak/chromium.src,Fireblend/chromium-crosswalk,markYoungH/chromium.src,junmin-zhu/chromium-rivertrail,timopulkkinen/BubbleFish,Chilledheart/chromium,Just-D/chromium-1,zcbenz/cefode-chromium,anirudhSK/chromium,Jonekee/chromium.src,Jonekee/chromium.src,robclark/chromium,junmin-zhu/chromium-rivertrail,Fireblend/chromium-crosswalk,nacl-webkit/chrome_deps,axinging/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,Chilledheart/chromium,mogoweb/chromium-crosswalk,bright-sparks/chromium-spacewalk,bright-sparks/chromium-spacewalk,dednal/chromium.src,junmin-zhu/chromium-rivertrail,M4sse/chromium.src,anirudhSK/chromium,anirudhSK/chromium,Chilledheart/chromium,M4sse/chromium.src,robclark/chromium,TheTypoMaster/chromium-crosswalk,keishi/chromium,dushu1203/chromium.src,PeterWangIntel/chromium-crosswalk,patrickm/chromium.src,keishi/chromium,junmin-zhu/chromium-rivertrail,ltilve/chromium,keishi/chromium,Pluto-tv/chromium-crosswalk,PeterWangIntel/chromium-crosswalk,Jonekee/chromium.src,ltilve/chromium,Jonekee/chromium.src,ChromiumWebApps/chromium |
b07ec29109a2ca1603d3a4c199132f4c510ef763 | third_party/lua-5.2.3/src/floating_temple.c | third_party/lua-5.2.3/src/floating_temple.c | /*
** Hook functions for integration with the Floating Temple distributed
** interpreter
*/
#include <stddef.h>
#define floating_temple_c
#define LUA_CORE
#include "lua.h"
#include "floating_temple.h"
#include "lobject.h"
#include "luaconf.h"
static int ft_defaultnewstringhook (lua_State *L, StkId obj, const char *str,
size_t len) {
return 0;
}
static int ft_defaultnewtablehook (lua_State *L, StkId obj, int b, int c) {
return 0;
}
#define FT_DEFINE_HOOK_FUNC(install_func, hook_type, hook_var, \
default_hook_func) \
LUAI_DDEF hook_type hook_var = &default_hook_func; \
\
LUA_API hook_type install_func (hook_type hook) { \
hook_type old_hook = hook_var; \
hook_var = hook; \
return old_hook; \
}
FT_DEFINE_HOOK_FUNC(ft_installnewstringhook, ft_NewStringHook, ft_newstringhook,
ft_defaultnewstringhook)
FT_DEFINE_HOOK_FUNC(ft_installnewtablehook, ft_NewTableHook, ft_newtablehook,
ft_defaultnewtablehook)
#undef FT_DEFINE_HOOK_FUNC
| /*
** Hook functions for integration with the Floating Temple distributed
** interpreter
*/
#include <stddef.h>
#define floating_temple_c
#define LUA_CORE
#include "lua.h"
#include "floating_temple.h"
#include "lobject.h"
#include "luaconf.h"
#define FT_DEFINE_HOOK_FUNC(install_func, hook_type, hook_var, hook_params, \
default_hook_func) \
static int default_hook_func hook_params { \
return 0; \
} \
\
LUAI_DDEF hook_type hook_var = &default_hook_func; \
\
LUA_API hook_type install_func (hook_type hook) { \
hook_type old_hook = hook_var; \
hook_var = hook; \
return old_hook; \
}
FT_DEFINE_HOOK_FUNC(ft_installnewstringhook, ft_NewStringHook, ft_newstringhook,
(lua_State *L, StkId obj, const char *str, size_t len),
ft_defaultnewstringhook)
FT_DEFINE_HOOK_FUNC(ft_installnewtablehook, ft_NewTableHook, ft_newtablehook,
(lua_State *L, StkId obj, int b, int c),
ft_defaultnewtablehook)
#undef FT_DEFINE_HOOK_FUNC
| Add the definition of the default hook function to the FT_DEFINE_HOOK_FUNCTION macro. | Add the definition of the default hook function to the FT_DEFINE_HOOK_FUNCTION macro.
| C | apache-2.0 | snyderek/floating_temple,snyderek/floating_temple,snyderek/floating_temple |
72f86cdd70ccbe468222911d421f064981d34746 | content/browser/renderer_host/quota_dispatcher_host.h | content/browser/renderer_host/quota_dispatcher_host.h | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
#include "base/basictypes.h"
#include "content/browser/browser_message_filter.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaType.h"
class GURL;
class QuotaDispatcherHost : public BrowserMessageFilter {
public:
~QuotaDispatcherHost();
bool OnMessageReceived(const IPC::Message& message, bool* message_was_ok);
private:
void OnQueryStorageUsageAndQuota(
int request_id,
const GURL& origin_url,
WebKit::WebStorageQuotaType type);
void OnRequestStorageQuota(
int request_id,
const GURL& origin_url,
WebKit::WebStorageQuotaType type,
int64 requested_size);
};
#endif // CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
| // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
#define CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
#include "base/basictypes.h"
#include "content/browser/browser_message_filter.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageQuotaType.h"
class GURL;
class QuotaDispatcherHost : public BrowserMessageFilter {
public:
~QuotaDispatcherHost();
virtual bool OnMessageReceived(const IPC::Message& message,
bool* message_was_ok);
private:
void OnQueryStorageUsageAndQuota(
int request_id,
const GURL& origin_url,
WebKit::WebStorageQuotaType type);
void OnRequestStorageQuota(
int request_id,
const GURL& origin_url,
WebKit::WebStorageQuotaType type,
int64 requested_size);
};
#endif // CONTENT_BROWSER_RENDERER_HOST_QUOTA_DISPATCHER_HOST_H_
| Fix clang build that have been broken by 81364. | Fix clang build that have been broken by 81364.
BUG=none
TEST=green tree
TBR=jam
Review URL: http://codereview.chromium.org/6838008
git-svn-id: dd90618784b6a4b323ea0c23a071cb1c9e6f2ac7@81368 4ff67af0-8c30-449e-8e8b-ad334ec8d88c
| C | bsd-3-clause | wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser,wistoch/meego-app-browser |
e3c439a4decc4c07c3ea2e086ae5a0eea1c084c7 | src/kernel/task/idesc_table.c | src/kernel/task/idesc_table.c | /**
* @file
*
* @brief
*
* @date 09.11.2013
* @author Anton Bondarev
*/
union idesc_table_entry {
unsigned int flags;
struct idesc *idesc;
};
struct idesc_table {
union idesc_table_entry idesc_entry[TASKS_RES_QUANTITY];
struct indexator indexator;
};
int idesc_table_add(struct idesc *idesc, int cloexec) {
struct task task;
struct idesc_table *idesc_table;
int idx;
task = task_self();
idesc_table = &task->idesc_table;
idx = index_alloc(&idesc_table->indexator, INDEX_MIN);
idesc_table->idesc_entry[idx] = idesc;
return idx;
}
int idesc_table_del(int idx) {
struct task task;
struct idesc_table *idesc_table;
task = task_self();
idesc_table = &task->idesc_table;
idesc_table->idesc_entry[idx] = NULL;
index_free(&idesc_table->indexator, idx);
return 0;
}
struct idesc *idesc_table_get(int idx) {
struct task task;
struct idesc_table *idesc_table;
task = task_self();
idesc_table = &task->idesc_table;
return idesc_table->idesc_entry[idx];
}
int idesc_table_init(struct idesc_table *idesc_table) {
return 0;
}
| Add some stubs for idec_table | desc: Add some stubs for idec_table | C | bsd-2-clause | gzoom13/embox,vrxfile/embox-trik,Kefir0192/embox,embox/embox,mike2390/embox,mike2390/embox,Kakadu/embox,Kefir0192/embox,abusalimov/embox,gzoom13/embox,gzoom13/embox,vrxfile/embox-trik,Kefir0192/embox,Kakadu/embox,vrxfile/embox-trik,vrxfile/embox-trik,vrxfile/embox-trik,mike2390/embox,abusalimov/embox,gzoom13/embox,Kefir0192/embox,embox/embox,embox/embox,mike2390/embox,abusalimov/embox,mike2390/embox,embox/embox,Kakadu/embox,Kakadu/embox,embox/embox,Kakadu/embox,vrxfile/embox-trik,vrxfile/embox-trik,Kakadu/embox,gzoom13/embox,Kefir0192/embox,mike2390/embox,gzoom13/embox,Kakadu/embox,Kefir0192/embox,Kefir0192/embox,abusalimov/embox,abusalimov/embox,mike2390/embox,embox/embox,gzoom13/embox,abusalimov/embox |
|
2d18d120f8c161bcc9d7b719e9acc293f96b3a6a | src/vm/instruction-visitor.h | src/vm/instruction-visitor.h | #ifndef INSTRUCTION_VISITOR_H_
#define INSTRUCTION_VISITOR_H_
#include "vm/instruction.h"
#include "vm/instructions.h"
namespace grok {
namespace vm {
class InstructionVisitor {
public:
#define DECLARE_VIRTUAL_METHOD(Instr, Class) \
virtual void Visit(Class##Instruction *instr) = 0;
INSTRUCTION_LIST_FOR_EACH(DECLARE_VIRTUAL_METHOD)
#undef DECLARE_VIRTUAL_METHOD
};
}
}
#endif
| Add InstructionVisitor class for visitor pattern | Add InstructionVisitor class for visitor pattern
| C | apache-2.0 | PrinceDhaliwal/grok,PrinceDhaliwal/grok,PrinceDhaliwal/grok |
|
0dd1f0b32359949a948c557a2c20f5f735e00c3a | generic/include/clc/float/definitions.h | generic/include/clc/float/definitions.h | #define FLT_DIG 6
#define FLT_MANT_DIG 24
#define FLT_MAX_10_EXP +38
#define FLT_MAX_EXP +128
#define FLT_MIN_10_EXP -37
#define FLT_MIN_EXP -125
#define FLT_RADIX 2
#define FLT_MAX 0x1.fffffep127f
#define FLT_MIN 0x1.0p-126f
#define FLT_EPSILON 0x1.0p-23f
#ifdef cl_khr_fp64
#define DBL_DIG 15
#define DBL_MANT_DIG 53
#define DBL_MAX_10_EXP +308
#define DBL_MAX_EXP +1024
#define DBL_MIN_10_EXP -307
#define DBL_MIN_EXP -1021
#define DBL_MAX 0x1.fffffffffffffp1023
#define DBL_MIN 0x1.0p-1022
#define DBL_EPSILON 0x1.0p-52
#endif
| #define FLT_DIG 6
#define FLT_MANT_DIG 24
#define FLT_MAX_10_EXP +38
#define FLT_MAX_EXP +128
#define FLT_MIN_10_EXP -37
#define FLT_MIN_EXP -125
#define FLT_RADIX 2
#define FLT_MAX 0x1.fffffep127f
#define FLT_MIN 0x1.0p-126f
#define FLT_EPSILON 0x1.0p-23f
#define M_PI_F 0x1.921fb6p+1
#ifdef cl_khr_fp64
#define DBL_DIG 15
#define DBL_MANT_DIG 53
#define DBL_MAX_10_EXP +308
#define DBL_MAX_EXP +1024
#define DBL_MIN_10_EXP -307
#define DBL_MIN_EXP -1021
#define DBL_MAX 0x1.fffffffffffffp1023
#define DBL_MIN 0x1.0p-1022
#define DBL_EPSILON 0x1.0p-52
#endif
| Add definition for M_PI_F v3 | Add definition for M_PI_F v3
v2:
- Use a hexadecimal constant.
v3:
- Use a hexadecimal constant in floating-point notation.
git-svn-id: e7f1ab7c2a259259587475a3e7520e757882f167@204666 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc,llvm-mirror/libclc |
f90fc43d4d7518e454793a5bb6b6a882e7e01d9a | test/Driver/offloading-interoperability.c | test/Driver/offloading-interoperability.c | // REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp %s 2>&1 \
// RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE
//
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" {{.*}}"-m" "elf64lppc"
| // REQUIRES: clang-driver
// REQUIRES: powerpc-registered-target
// REQUIRES: nvptx-registered-target
//
// Verify that CUDA device commands do not get OpenMP flags.
//
// RUN: %clang -### -x cuda -target powerpc64le-linux-gnu -std=c++11 --cuda-gpu-arch=sm_35 -fopenmp=libomp %s 2>&1 \
// RUN: | FileCheck %s --check-prefix NO-OPENMP-FLAGS-FOR-CUDA-DEVICE
//
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: clang{{.*}}" "-cc1" "-triple" "nvptx64-nvidia-cuda"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NOT: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ptxas" "-m64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: fatbinary" "--cuda" "-64"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: clang{{.*}}" "-cc1" "-triple" "powerpc64le--linux-gnu"
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE: -fopenmp
// NO-OPENMP-FLAGS-FOR-CUDA-DEVICE-NEXT: ld" {{.*}}"-m" "elf64lppc"
| Make test not fail on hosts where the default omp library is gomp. | Make test not fail on hosts where the default omp library is gomp.
This is the case on some linuxes, just force libomp so we get the
desired results.
git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@277138 91177308-0d34-0410-b5e6-96231b3b80d8
| C | apache-2.0 | llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,apple/swift-clang,apple/swift-clang,llvm-mirror/clang,llvm-mirror/clang,apple/swift-clang |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.