#include <pthread.h>
#include "racemacros.h"

int g;
int *g1;
int *g2;

pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;

void *t_fun(void *arg) {
  pthread_mutex_lock(&mutex);
  access(*g1);
  pthread_mutex_lock(&mutex);
  return NULL;
}

int main(void) {
  g1 = g2 = &g;

  create_threads(t);

  assert_racefree(*g2); // UNKNOWN

  join_threads(t);
  return 0;
}

#include <pthread.h>
#include "racemacros.h"

int g;
int *g1;
int *g2;

pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;

void *t_fun(void *arg) {
  pthread_mutex_lock(&mutex);
  access(*g1);
  pthread_mutex_lock(&mutex);
  return NULL;
}

int main(void) {
  g1 = g2 = &g;

  create_threads(t);
  pthread_mutex_lock(&mutex);
  assert_racefree(*g2);
  pthread_mutex_lock(&mutex);
  join_threads(t);
  return 0;
}

Fix 28/36 to actually be race free

Fix 28/36 to actually be race free

It was the same as 28/37.


#ifndef ADAPTERBOARD_H
#define ADAPTERBOARD_H

#include <RGBLed.h>

#define LED_R 13
#define LED_G 9
#define LED_B 10
#define BACKLIGHT_PIN 0

class AdapterBoard
{
  public:
    AdapterBoard();
    void init();
    void poll();

  private:
    RGBLed led;
    Backlight backlight;
};

#endif

#ifndef ADAPTERBOARD_H
#define ADAPTERBOARD_H

#include <RGBLed.h>

#define LED_R 13
#define LED_G 9
#define LED_B 10
#define BACKLIGHT_PIN 11
#define SW_ON 4
#define SW_UP 12
#define SW_DOWN 6

class AdapterBoard
{
  public:
    AdapterBoard();
    void init();
    void poll();

  private:
    RGBLed led;
    Backlight backlight;
};

#endif

Add switch pin definitions, fix pin for backlight


#include <firestorm.h>
#include <gpio.h>

#define LED_1 1

void main(void) {
    gpio_enable_output(LED_0);
    gpio_enable_output(LED_1);

    while(1) {
      gpio_set(LED_0);
      gpio_clear(LED_1);
      delay_ms(500);
      gpio_set(LED_1);
      gpio_clear(LED_0);
      delay_ms(500);
    }
}

#include <firestorm.h>
#include <gpio.h>

#define LED_1 1

/* Delay for for the given microseconds (approximately).
 *
 * For a 16 MHz CPU, 1us == 16 instructions (assuming each instruction takes
 * one cycle). */
static void busy_delay_us(int duration)
{
	// The inner loop instructions are: 14 NOPs + 1 SUBS/ADDS + 1 CMP
	while (duration-- != 0) {
		__asm volatile (
			"nop\n"
			"nop\n"
			"nop\n"
			"nop\n"
			"nop\n"
			"nop\n"
			"nop\n"
			"nop\n"
			"nop\n"
			"nop\n"
			"nop\n"
			"nop\n"
			"nop\n"
			"nop\n"
		);
	}
}

/* Delay for for the given milliseconds (approximately).
 *
 * Note that this is not precise as there are 2 extra instructions on the inner
 * loop. Therefore, there is 1us added every 8 iterations. */
static void busy_delay_ms(int duration)
{
	while (duration-- != 0) {
		busy_delay_us(1000);
	}
}

void main(void) {
    gpio_enable_output(LED_0);
    gpio_enable_output(LED_1);

    while(1) {
      gpio_set(LED_0);
      gpio_clear(LED_1);
      busy_delay_ms(500);
      gpio_set(LED_1);
      gpio_clear(LED_0);
      busy_delay_ms(500);
    }
}

Use a "busy" delay function for blinky

WORKAROUND: Use a "busy" delay function for blinky

While the timer support is not fixed, use a delay function the keeps the CPU
busy using a certain amount of NOPs.


//-----------------------------------------------------------------------------
// Element Access
//-----------------------------------------------------------------------------

template<class T>
T& matrix<T>::at( std::size_t row, std::size_t col ){
  return data_.at(row*cols_+col);
}

template<class T>
const T& matrix<T>::at( std::size_t row, std::size_t col ) const{
  return data_.at(row*cols_+col);
}

template<class T>
typename matrix<T>::matrix_row matrix<T>::operator[]( std::size_t row ){
  return 0;
}

template<class T>
const typename matrix<T>::matrix_row matrix<T>::operator[](
    std::size_t row ) const{
  return 0;
}

//-----------------------------------------------------------------------------
// Element Access
//-----------------------------------------------------------------------------

template<class T>
T& matrix<T>::at( std::size_t row, std::size_t col ){
  // TODO throw if out of bounds
  return data_.at(row*cols_+col);
}

template<class T>
const T& matrix<T>::at( std::size_t row, std::size_t col ) const{
  // TODO throw if out of bounds
  return data_.at(row*cols_+col);
}

template<class T>
typename matrix<T>::matrix_row matrix<T>::operator[]( std::size_t row ){
  return 0;
}

template<class T>
const typename matrix<T>::matrix_row matrix<T>::operator[](
    std::size_t row ) const{
  return 0;
}

Add todo comment on at() functions.

Add todo comment on at() functions.


typedef struct Bundle Bundle;

struct Bundle {
	MatrixServer* matrix;
	Db* db;
	int epfd;
	int threadNo; //for init only, not used in the threads
	std::string portNo; //for init only, not used in the threads
};

Move struct definition to header as it is reused in different cpp files


#include "bst.h"

static void BST_Transplant(BST* T, BSTNode* u, BSTNode* v);

struct BSTNode
{
	BSTNode* left;
	BSTNode* right;
	BSTNode* p;
	void* k;
};

struct BST
{
	BSTNode* root;
};

BST* BST_Create(void)
{
	BST* T = (BST* )malloc(sizeof(BST));
	T->root = NULL;
	return T;
}

BSTNode* BSTNode_Create(void* k)
{
	BSTNode* n = (BSTNode* )malloc(sizeof(BSTNode));
	n->left = NULL;
	n->right = NULL;
	n->p = NULL;
	n->k = k;
}

void BST_Inorder_Tree_Walk(BSTNode* n, void (f)(void*))
{
	if (n != NULL)
	{
		BST_Inorder_Tree_Walk(n->left, f);
		f(n->k);
		BST_Inorder_Tree_Walk(n->right, f);
	}
}

Add BST inorder traversal function implementation


#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

static char *dircat(char *d1, char *d2)
{
    char *new = malloc(strlen(d1) + strlen(d2) + 2);
    sprintf(new, "%s/%s", d1, d2);
    return new;
}

void dirwalk(char *name, void (*func)(char *, void *), void *ctx)
{
    DIR *dir = opendir(name);
    struct dirent *d;

    func(name, ctx);

    readdir(dir); readdir(dir); /* Ignore "." and ".." */
    while ((d = readdir(dir)) != NULL) {
        if (d->d_type == DT_DIR && d->d_name[0] != '.') {
            char *nextdir = dircat(name, d->d_name);
            dirwalk(nextdir, func, ctx);
            free(nextdir);
        }
    }
    closedir(dir);
}

#include <dirent.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>

static char *dircat(char *d1, char *d2)
{
    char *new = malloc(strlen(d1) + strlen(d2) + 2);
    sprintf(new, "%s/%s", d1, d2);
    return new;
}

void dirwalk(char *name, void (*func)(char *, void *), void *ctx)
{
    DIR *dir = opendir(name);
    struct dirent *d;

    func(name, ctx);

    while ((d = readdir(dir)) != NULL) {
        if (d->d_type == DT_DIR && d->d_name[0] != '.') {
            char *nextdir = dircat(name, d->d_name);
            dirwalk(nextdir, func, ctx);
            free(nextdir);
        }
    }
    closedir(dir);
}

Fix bug with . and ..

Fix bug with . and ..


// vim:ts=4:sw=4:expandtab

#include <stdlib.h>
#include <stdio.h>
#include "randr.h"
#include "types.h"
#include "globals.h"

int main(void) {
    // TODO
}

// vim:ts=4:sw=4:expandtab

#include <stdlib.h>
#include <stdio.h>
#include <err.h>
#include <xcb/xcb.h>
#include <xcb/xcb_aux.h>
#include "randr.h"
#include "types.h"
#include "globals.h"

xcb_connection_t *connection;
xcb_window_t root;

static void initialize(void) {
    int display;
    connection = xcb_connect(NULL, &display);
    if (xcb_connection_has_error(connection)) {
        errx(EXIT_FAILURE, "could not connect to the X server, bailing out.");
    }

    xcb_screen_t *screen = xcb_aux_get_screen(connection, display);
    root = screen->root;
}

int main(void) {
    initialize();
    xcb_disconnect(connection);
    exit(EXIT_SUCCESS);
}

Initialize X11 connection and root screen.


//===--- Dwarf.h - DWARF constants ------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines several temporary Swift-specific DWARF constants.
//
//===----------------------------------------------------------------------===//

#ifndef SWIFT_BASIC_DWARF_H
#define SWIFT_BASIC_DWARF_H

#include "llvm/Support/Dwarf.h"

namespace swift {
  /// The DWARF version emitted by the Swift compiler.
  const unsigned DWARFVersion = 4;

  static const char MachOASTSegmentName[] = "__SWIFT";
  static const char MachOASTSectionName[] = "__ast";
  static const char ELFASTSectionName[] = ".swift_ast";
  static const char COFFASTSectionName[] = "swiftast";
} // end namespace swift

#endif // SWIFT_BASIC_DWARF_H

//===--- Dwarf.h - DWARF constants ------------------------------*- C++ -*-===//
//
// This source file is part of the Swift.org open source project
//
// Copyright (c) 2014 - 2017 Apple Inc. and the Swift project authors
// Licensed under Apache License v2.0 with Runtime Library Exception
//
// See https://swift.org/LICENSE.txt for license information
// See https://swift.org/CONTRIBUTORS.txt for the list of Swift project authors
//
//===----------------------------------------------------------------------===//
//
// This file defines several temporary Swift-specific DWARF constants.
//
//===----------------------------------------------------------------------===//

#ifndef SWIFT_BASIC_DWARF_H
#define SWIFT_BASIC_DWARF_H

#include "llvm/BinaryFormat/Dwarf.h"

namespace swift {
  /// The DWARF version emitted by the Swift compiler.
  const unsigned DWARFVersion = 4;

  static const char MachOASTSegmentName[] = "__SWIFT";
  static const char MachOASTSectionName[] = "__ast";
  static const char ELFASTSectionName[] = ".swift_ast";
  static const char COFFASTSectionName[] = "swiftast";
} // end namespace swift

#endif // SWIFT_BASIC_DWARF_H

Adjust for new LLVM BinaryFormat library in r304864.


// This file is distributed under the MIT license.
// See the LICENSE file for details.

#pragma once

#ifndef VSNRAY_COMMON_IMAGE_BASE_H
#define VSNRAY_COMMOM_IMAGE_BASE_H 1

#include <cstddef>
#include <cstdint>
#include <string>
#include <vector>

#include <visionaray/pixel_format.h>

namespace visionaray
{

class image_base
{
public:

    friend class image;

public:

    virtual bool load(std::string const& filename);
    virtual bool save(std::string const& filename);

    size_t width() const;
    size_t height() const;

    pixel_format format() const;

    uint8_t const* data() const;

protected:

    size_t width_;
    size_t height_;

    pixel_format format_ = PF_RGB8;

    std::vector<uint8_t> data_;

};

} // visionaray

#endif // VSNRAY_COMMOM_IMAGE_BASE_H

// This file is distributed under the MIT license.
// See the LICENSE file for details.

#pragma once

#ifndef VSNRAY_COMMON_IMAGE_BASE_H
#define VSNRAY_COMMOM_IMAGE_BASE_H 1

#include <cstddef>
#include <cstdint>
#include <string>

#include <visionaray/aligned_vector.h>
#include <visionaray/pixel_format.h>

namespace visionaray
{

class image_base
{
public:

    friend class image;

public:

    virtual bool load(std::string const& filename);
    virtual bool save(std::string const& filename);

    size_t width() const;
    size_t height() const;

    pixel_format format() const;

    uint8_t const* data() const;

protected:

    size_t width_;
    size_t height_;

    pixel_format format_ = PF_RGB8;

    aligned_vector<uint8_t> data_;

};

} // visionaray

#endif // VSNRAY_COMMOM_IMAGE_BASE_H

Store image data in aligned_vector

Store image data in aligned_vector


#ifndef SYSMOBTS_UTILS_H
#define SYSMOBTS_UTILS_H

#include <stdint.h>
#include "femtobts.h"

struct gsm_bts_trx;

int band_femto2osmo(GsmL1_FreqBand_t band);

int sysmobts_select_femto_band(struct gsm_bts_trx *trx, uint16_t arfcn);

int sysmobts_get_nominal_power(struct gsm_bts_trx *trx);

int sysmobts_get_target_power(struct gsm_bts_trx *trx);

void sysmobts_pa_pwr_init(struct gsm_bts_trx *trx);
void sysmobts_pa_maybe_step(struct gsm_bts_trx *trx);
#endif

#ifndef SYSMOBTS_UTILS_H
#define SYSMOBTS_UTILS_H

#include <stdint.h>
#include "femtobts.h"

struct gsm_bts_trx;

int band_femto2osmo(GsmL1_FreqBand_t band);

int sysmobts_select_femto_band(struct gsm_bts_trx *trx, uint16_t arfcn);

int sysmobts_get_nominal_power(struct gsm_bts_trx *trx);
#endif

sysmobts: Remove left-over from non-generic power control


 /*
  *  mbedtls_device.h
  *
  *  Copyright (C) 2018, Arm Limited, All Rights Reserved
  *  SPDX-License-Identifier: Apache-2.0
  *
  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
  *  not use this file except in compliance with the License.
  *  You may obtain a copy of the License at
  *
  *  http://www.apache.org/licenses/LICENSE-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 __MBEDTLS_DEVICE__
#define __MBEDTLS_DEVICE__

#define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT
#define MBEDTLS_SHA1_ALT
#define MBEDTLS_SHA256_ALT
#define MBEDTLS_SHA512_ALT
#define MBEDTLS_CCM_ALT
#define MBEDTLS_ECDSA_VERIFY_ALT
#define MBEDTLS_ECDSA_SIGN_ALT
#define MBEDTLS_ECDSA_GENKEY_ALT
#define MBEDTLS_ECDH_GEN_PUBLIC_ALT
#define MBEDTLS_ECDH_COMPUTE_SHARED_ALT

#endif //__MBEDTLS_DEVICE__

 /*
  *  mbedtls_device.h
  *
  *  Copyright (C) 2018, Arm Limited, All Rights Reserved
  *  SPDX-License-Identifier: Apache-2.0
  *
  *  Licensed under the Apache License, Version 2.0 (the "License"); you may
  *  not use this file except in compliance with the License.
  *  You may obtain a copy of the License at
  *
  *  http://www.apache.org/licenses/LICENSE-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 __MBEDTLS_DEVICE__
#define __MBEDTLS_DEVICE__

#define MBEDTLS_PLATFORM_SETUP_TEARDOWN_ALT
#define MBEDTLS_SHA1_ALT
#define MBEDTLS_SHA256_ALT
//#define MBEDTLS_SHA512_ALT
#define MBEDTLS_CCM_ALT
#define MBEDTLS_ECDSA_VERIFY_ALT
#define MBEDTLS_ECDSA_SIGN_ALT
#define MBEDTLS_ECDSA_GENKEY_ALT
#define MBEDTLS_ECDH_GEN_PUBLIC_ALT
#define MBEDTLS_ECDH_COMPUTE_SHARED_ALT

#endif //__MBEDTLS_DEVICE__

Make the alternative sha512 optional

Make the alternative sha512 optional

Have the alternative sha512 undefined by default,
in order not to break backwards compatability.


#ifndef __CS_143__Router__
#define __CS_143__Router__

#include <string>
#include "Device.h"

class Router : public Device
{
public:
    // Bellman-Ford
    //void updateRouting(Packet);

    // create static routing table
    void addRouting(Packet);

    // add a link to the router
    void addLink(std::string link_id);

    // get proper routing given host id
    std::string getRouting(std::string targ_host);

    // react to a packet event
    void giveEvent(std::unique_ptr<PacketEvent>);

private:
    // Routing table maps destination host ids to link ids
    std::map<std::string, std::string> routing_table;

    // All links connected to this router
    std::vector<std::string> links;
};

#endif /* defined(__CS_143__Router__) */

#ifndef __CS_143__Router__
#define __CS_143__Router__

#include <string>
#include "Device.h"

class Router : public Device
{
public:
    // Bellman-Ford
    //void updateRouting(Packet);

    // create static routing table
    void addRouting(Packet);

    // add a link to the router
    void addLink(std::string link_id);

    // get proper routing given host id
    std::string getRouting(std::string targ_host);

    // react to a packet event
    void giveEvent(std::unique_ptr<PacketEvent>);

private:
    // TODO: this could probably be an unordered_map
    // Routing table maps destination host ids to link ids
    std::map<std::string, std::string> routing_table;

    // All links connected to this router
    std::vector<std::string> links;
};

#endif /* defined(__CS_143__Router__) */

Add comment about unordered map

Add comment about unordered map


/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */

#ifndef DGOSPREY_REVISION_H
#define DGOSPREY_REVISION_H

#define DGOSPREY_REVISION "git commit 8603d37 on 2015-01-21"

#endif // DGOSPREY_REVISION_H

/* THIS FILE IS AUTOGENERATED - DO NOT EDIT */

#ifndef DGOSPREY_REVISION_H
#define DGOSPREY_REVISION_H

#define DGOSPREY_REVISION "git commit 660a43d on 2015-02-09"

#endif // DGOSPREY_REVISION_H

Test run successful after libmesh update


/*
 * Copyright (C) 2016 Glyptodon, Inc.
 *
 * 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 GUACENC_IMAGE_STREAM_H
#define GUACENC_IMAGE_STREAM_H

#include "config.h"

/**
 * The current state of an allocated Guacamole image stream.
 */
typedef struct guacenc_image_stream {

    /**
     * STUB: Placeholder property. This property exists only so that the
     * guacenc_image_stream struct can be defined prior to implementation.
     */
    int __PLACEHOLDER;

} guacenc_image_stream;

#endif

/*
 * Copyright (C) 2016 Glyptodon, Inc.
 *
 * 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 GUACENC_IMAGE_STREAM_H
#define GUACENC_IMAGE_STREAM_H

#include "config.h"

/**
 * The current state of an allocated Guacamole image stream.
 */
typedef struct guacenc_image_stream {

    /**
     * The index of the destination layer or buffer.
     */
    int index;

    /**
     * The Guacamole protocol compositing operation (channel mask) to apply
     * when drawing the image.
     */
    int mask;

} guacenc_image_stream;

#endif

GUAC-236: Replace placeholder with required mask and index properties.


//
//  TSKPinFailureReport.h
//  TrustKit
//
//  Created by Alban Diquet on 5/27/15.
//  Copyright (c) 2015 Data Theorem. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface TSKPinFailureReport : NSObject

@property (readonly) NSString *appBundleId;
@property (readonly) NSString *appVersion;
@property (readonly) NSString *notedHostname;
@property (readonly) NSString *serverHostname;
@property (readonly) NSNumber *serverPort;
@property (readonly) NSDate *dateTime;
@property (readonly) BOOL includeSubdomains;
@property (readonly) NSArray *validatedCertificateChain;
@property (readonly) NSArray *knownPins;

// Init with default bundle ID and current time as the date-time
- (instancetype) initWithAppBundleId:(NSString *) appBundleId appVersion:(NSString *)appVersion notedHostname:(NSString *)notedHostname serverHostname:(NSString *)serverHostname port:(NSNumber *)serverPort dateTime:(NSDate *)dateTime includeSubdomains:(BOOL) includeSubdomains validatedCertificateChain:(NSArray *)validatedCertificateChain knownPins:(NSArray *)knownPins;

// Return the report in JSON format for POSTing it
- (NSData *)json;

// Return a request ready to be sent with the report in JSON format in the response's body
- (NSMutableURLRequest *)requestToUri:(NSURL *)reportUri;

@end

//
//  TSKPinFailureReport.h
//  TrustKit
//
//  Created by Alban Diquet on 5/27/15.
//  Copyright (c) 2015 Data Theorem. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface TSKPinFailureReport : NSObject

@property (readonly, nonatomic) NSString *appBundleId; // Not part of the HPKP spec
@property (readonly, nonatomic) NSString *appVersion; // Not part of the HPKP spec
@property (readonly, nonatomic) NSString *notedHostname;
@property (readonly, nonatomic) NSString *serverHostname;
@property (readonly, nonatomic) NSNumber *serverPort;
@property (readonly, nonatomic) NSDate *dateTime;
@property (readonly, nonatomic) BOOL includeSubdomains;
@property (readonly, nonatomic) NSArray *validatedCertificateChain;
@property (readonly, nonatomic) NSArray *knownPins;

// Init with default bundle ID and current time as the date-time
- (instancetype) initWithAppBundleId:(NSString *) appBundleId appVersion:(NSString *)appVersion notedHostname:(NSString *)notedHostname serverHostname:(NSString *)serverHostname port:(NSNumber *)serverPort dateTime:(NSDate *)dateTime includeSubdomains:(BOOL) includeSubdomains validatedCertificateChain:(NSArray *)validatedCertificateChain knownPins:(NSArray *)knownPins;

// Return the report in JSON format for POSTing it
- (NSData *)json;

// Return a request ready to be sent with the report in JSON format in the response's body
- (NSMutableURLRequest *)requestToUri:(NSURL *)reportUri;

@end

Switch to non atomic properties

Switch to non atomic properties


#ifndef __WORDCOUNTS_H__
#define __WORDCOUNTS_H__

#include <string>
#include <map>
#include <Rcpp.h>

typedef std::unordered_map<std::string, int> hashmap;

class WordCounts
{
private:
    hashmap map;

public:

    WordCounts();
    ~WordCounts();

    void print();

    Rcpp::DataFrame as_data_frame();

    void add_word(std::string);
};

#endif

#ifndef __WORDCOUNTS_H__
#define __WORDCOUNTS_H__

#include <string>
#include <unordered_map>
#include <Rcpp.h>

typedef std::unordered_map<std::string, int> hashmap;

class WordCounts
{
private:
    hashmap map;

public:

    WordCounts();
    ~WordCounts();

    void print();

    Rcpp::DataFrame as_data_frame();

    void add_word(std::string);
};

#endif

Replace include <map> with <unordered_map>


#include "h_iconv.h"

// Wrapper functions, since iconv_open et al are macros in libiconv.
iconv_t h_iconv_open(const char *tocode, const char *fromcode) {
    return iconv_open(tocode, fromcode);
}

void h_iconv_close(iconv_t cd) {
    iconv_close(cd);
}

size_t h_iconv(iconv_t cd, char **inbuf, size_t *inbytesleft,
                char **outbuf, size_t *outbytesleft) {
    return iconv(cd, (void*)inbuf, inbytesleft, outbuf, outbytesleft);
}

#include "h_iconv.h"

// Wrapper functions, since iconv_open et al are macros in libiconv.
iconv_t h_iconv_open(const char *tocode, const char *fromcode) {
    return iconv_open(tocode, fromcode);
}

void h_iconv_close(iconv_t cd) {
    iconv_close(cd);
}

size_t h_iconv(iconv_t cd, char **inbuf, size_t *inbytesleft,
                char **outbuf, size_t *outbytesleft) {
    // Cast inbuf to (void*) so that it works both on Solaris, which expects
    // a (const char**), and on other platforms (e.g. Linux), which expect
    // a (char **).
    return iconv(cd, (void*)inbuf, inbytesleft, outbuf, outbytesleft);
}

Add a comment explaining why iconv needs a (void*) for its parameter.


#ifndef WProgram_h
#define WProgram_h

#ifndef HOST_MIDIDUINO
#define HOST_MIDIDUINO
#endif

#define _BV(i) (1 << (i))
#define PSTR(s) (s)

#define GUI_NUM_ENCODERS 4
#define GUI_NUM_BUTTONS 4

#define BUTTON_PRESSED(i) false
#define BUTTON_RELEASED(i) false
#define BUTTON_DOWN(i) false
#define BUTTON_UP(i) true

#include <stdio.h>

void handleIncomingMidi();

#define BOARD_ID 0x89
#define SYSEX_BUF_SIZE 8192

#define setLed()
#define clearLed()
#define setLed2()
#define clearLed2()

#define PROGMEM

#ifdef __cplusplus
extern "C" {
#endif
#include <inttypes.h>
#ifdef __cplusplus
}
#endif

#include "helpers.h"

#include "WMath.h"

#define MIDIDUINO_HANDLE_SYSEX
#include "Midi.h"
#include "MidiClock.h"

#include "MidiUartHost.h"
#include "GUI_private.h"

void hexDump(uint8_t *data, uint16_t len);

#endif /* WProgram_h */

#ifndef WProgram_h
#define WProgram_h

#ifndef HOST_MIDIDUINO
#define HOST_MIDIDUINO
#endif

#define _BV(i) (1 << (i))
#define PSTR(s) (s)

#define GUI_NUM_ENCODERS 4
#define GUI_NUM_BUTTONS 8

#include <stdio.h>

void handleIncomingMidi();

#define BOARD_ID 0x89
#define SYSEX_BUF_SIZE 8192

#define setLed()
#define clearLed()
#define setLed2()
#define clearLed2()

#define PROGMEM

#ifdef __cplusplus
extern "C" {
#endif
#include <inttypes.h>
#ifdef __cplusplus
}
#endif

#include "helpers.h"

#include "WMath.h"

#define MIDIDUINO_HANDLE_SYSEX
#include "Midi.h"
#include "MidiClock.h"

#include "MidiUartHost.h"
#include "GUI_private.h"

void hexDump(uint8_t *data, uint16_t len);

#endif /* WProgram_h */

Fix number of buttons on the host and remove the placeholder macros


// @(#)root/sqlite:$Id$
// Author: o.freyermuth <o.f@cern.ch>, 01/06/2013

/*************************************************************************
 * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TPgSQLRow
#define ROOT_TPgSQLRow

#ifndef ROOT_TSQLRow
#include "TSQLRow.h"
#endif

#if !defined(__CINT__)
#include <sqlite3.h>
#else
struct sqlite3_stmt;
#endif

class TSQLiteRow : public TSQLRow {

private:
   sqlite3_stmt *fResult;       // current result set
   Bool_t        IsValid(Int_t field);

public:
   TSQLiteRow(void *result, ULong_t rowHandle);
   ~TSQLiteRow();

   void        Close(Option_t *opt="");
   ULong_t     GetFieldLength(Int_t field);
   const char *GetField(Int_t field);

   ClassDef(TSQLiteRow,0)  // One row of SQLite query result
};

#endif

// @(#)root/sqlite:
// Author: o.freyermuth <o.f@cern.ch>, 01/06/2013

/*************************************************************************
 * Copyright (C) 1995-2013, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TSQLiteRow
#define ROOT_TSQLiteRow

#ifndef ROOT_TSQLRow
#include "TSQLRow.h"
#endif

#if !defined(__CINT__)
#include <sqlite3.h>
#else
struct sqlite3_stmt;
#endif

class TSQLiteRow : public TSQLRow {

private:
   sqlite3_stmt *fResult;       // current result set
   Bool_t        IsValid(Int_t field);

public:
   TSQLiteRow(void *result, ULong_t rowHandle);
   ~TSQLiteRow();

   void        Close(Option_t *opt="");
   ULong_t     GetFieldLength(Int_t field);
   const char *GetField(Int_t field);

   ClassDef(TSQLiteRow,0)  // One row of SQLite query result
};

#endif

Fix fatal typo in code guard

Fix fatal typo in code guard


/**
https://www.urionlinejudge.com.br/judge/en/problems/view/1098

TODO:
Resolver a formatação da última impressão do loop.
Está:
I=2.0 J=3.0
I=2.0 J=4.0
I=2.0 J=5.0
Mas deveria estar:
I=2 J=3
I=2 J=4
I=2 J=5

*/

#include <stdio.h>

int main(){

	double i, j;

	i = 0;
	do{

		for (j = 1; j <= 3; j++){
			if (i == (int) i){
				printf("I=%.0lf J=%.0lf\n", i, i+j);
			} else{
				printf("I=%.1lf J=%.1lf\n", i, i+j);
			}
		}

		i += 0.2;
		//printf("Finalizando loop... Double: %lf e Float: %d\n", (double) i, (int) i); // debug
	} while(i <= 2.0);

    return 0;
}

/**
https://www.urionlinejudge.com.br/judge/en/problems/view/1098
*/

#include <stdio.h>

int main(){

	int i, j;
	float iR, jR;

	for(i = 0; i <= 20; i += 2){
		for (j = 10; j <= 30; j += 10){

			iR = (float) i/10;
			jR = (float) (i+j)/10;

			if (i % 10) printf("I=%.1f J=%.1f\n", iR, jR);
			else 		printf("I=%.0f J=%.0f\n", iR, jR);

		}
	}

    return 0;
}

Fix bug and solves the sequence

Fix bug and solves the sequence


/*
 * This file is part of Kotaka, a mud library for DGD
 * http://github.com/shentino/kotaka
 *
 * Copyright (C) 2012  Raymond Jennings
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Affero General Public License as
 * published by the Free Software Foundation, either version 3 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Affero General Public License for more details.
 *
 * You should have received a copy of the GNU Affero General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */
#include <kotaka/paths.h>
#include <kotaka/log.h>
#include <text/paths.h>

inherit LIB_WIZBIN;

void main(string args)
{
	mixed **dirinfo;

	dirinfo = proxy_call("get_dir", args);

	send_out("There are " + sizeof(dirinfo[0]) + " files there.\n");
}

Add rudimentary directory listing command


/**
 * @file
 * @brief
 *
 * @author  Alexander Kalmuk
 * @date    24.08.2018
 */

#include <assert.h>

#include <stm32f4_discovery.h>

#include <pdm_filter.h>

void PDM_Filter_Init(PDMFilter_InitStruct * Filter) {
	assert(0);
}

int32_t PDM_Filter_64_MSB(uint8_t* data, uint16_t* dataOut,
		uint16_t MicGain, PDMFilter_InitStruct * Filter) {
	assert(0);
	return -1;
}

int32_t PDM_Filter_64_LSB(uint8_t* data, uint16_t* dataOut,
		uint16_t MicGain, PDMFilter_InitStruct * Filter) {
	assert(0);
	return -1;
}

Add stub for PDM sound filter

stm32f4: Add stub for PDM sound filter


/*
 * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <debug.h>

/* mbed TLS headers */
#include <mbedtls/memory_buffer_alloc.h>
#include <mbedtls/platform.h>

/*
 * mbed TLS heap
 */
#if (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDSA)
#define MBEDTLS_HEAP_SIZE		(14*1024)
#elif (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA)
#define MBEDTLS_HEAP_SIZE		(6*1024)
#endif
static unsigned char heap[MBEDTLS_HEAP_SIZE];

/*
 * mbed TLS initialization function
 */
void mbedtls_init(void)
{
	static int ready;

	if (!ready) {
		/* Initialize the mbed TLS heap */
		mbedtls_memory_buffer_alloc_init(heap, MBEDTLS_HEAP_SIZE);

		/* Use reduced version of snprintf to save space. */
		mbedtls_platform_set_snprintf(tf_snprintf);

		ready = 1;
	}
}

/*
 * Copyright (c) 2015-2017, ARM Limited and Contributors. All rights reserved.
 *
 * SPDX-License-Identifier: BSD-3-Clause
 */

#include <debug.h>

/* mbed TLS headers */
#include <mbedtls/memory_buffer_alloc.h>
#include <mbedtls/platform.h>

/*
 * mbed TLS heap
 */
#if (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_ECDSA)
#define MBEDTLS_HEAP_SIZE		(14*1024)
#elif (TF_MBEDTLS_KEY_ALG_ID == TF_MBEDTLS_RSA)
#define MBEDTLS_HEAP_SIZE		(7*1024)
#endif
static unsigned char heap[MBEDTLS_HEAP_SIZE];

/*
 * mbed TLS initialization function
 */
void mbedtls_init(void)
{
	static int ready;

	if (!ready) {
		/* Initialize the mbed TLS heap */
		mbedtls_memory_buffer_alloc_init(heap, MBEDTLS_HEAP_SIZE);

		/* Use reduced version of snprintf to save space. */
		mbedtls_platform_set_snprintf(tf_snprintf);

		ready = 1;
	}
}

Increase heapsize for mbedtls library

Increase heapsize for mbedtls library

The mbedTLS library requires larger heap memory for verification of RSASSA-PSS
signature in certificates during Trusted Board Boot. This patch increases the
heap memory for the same.

Change-Id: I3c3123d7142b7b7b01463516ec436734895da159
Signed-off-by: Soby Mathew <4d7af7c5c404e07961f9e1e79d6f17409c1d7db7@arm.com>


// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

#ifndef RUNTIME_BIN_SOCKET_BASE_FUCHSIA_H_
#define RUNTIME_BIN_SOCKET_BASE_FUCHSIA_H_

#if !defined(RUNTIME_BIN_SOCKET_BASE_H_)
#error Do not include socket_base_fuchsia.h directly. Use socket_base.h.
#endif

#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>

#endif  // RUNTIME_BIN_SOCKET_BASE_FUCHSIA_H_

// Copyright (c) 2016, the Dart project authors.  Please see the AUTHORS file
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.

#ifndef RUNTIME_BIN_SOCKET_BASE_FUCHSIA_H_
#define RUNTIME_BIN_SOCKET_BASE_FUCHSIA_H_

#if !defined(RUNTIME_BIN_SOCKET_BASE_H_)
#error Do not include socket_base_fuchsia.h directly. Use socket_base.h.
#endif

#include <arpa/inet.h>
#include <netdb.h>
#include <sys/socket.h>
#include <sys/un.h>

#endif  // RUNTIME_BIN_SOCKET_BASE_FUCHSIA_H_

[dart:io] Fix Unix domain socket headers for Fuchsia

Change-Id: I053b41e29184f5edb3d4f19573ead5124528f12c
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/140624
Reviewed-by: Zichang Guo <d26af3001798f91912fb1504666bca93c093d553@google.com>
Commit-Queue: Jason Simmons <345008440c885d4763d50f58e545b9839f60f79f@google.com>


#include "event.h"

int init_event_system(void)
{
	event_loop = uv_loop_new();
	return 1;
}

void cleanup_event_system(void)
{
	log_message(LOG_DEBUG, "cleaning up event system!\n");
	uv_loop_close(event_loop);
	free(event_loop);
}

void event_process(void)
{
	log_message(LOG_DEBUG, "processing events!\n");
	uv_run(event_loop, UV_RUN_DEFAULT);
}

#include "event.h"

int init_event_system(void)
{
	event_loop = malloc(sizeof *event_loop);
	if (!event_loop) {
	    log_message(LOG_ERROR, "Could not allocate memory for event loop");
	    return 0;
	}

        if (uv_loop_init(event_loop) < 0) {
	    log_message(LOG_ERROR, "Could not initialize event loop");
	    free(event_loop);
	    return 0;
        }

	return 1;
}

void cleanup_event_system(void)
{
	log_message(LOG_DEBUG, "cleaning up event system!\n");
	uv_loop_close(event_loop);
	free(event_loop);
}

void event_process(void)
{
	log_message(LOG_DEBUG, "processing events!\n");
	uv_run(event_loop, UV_RUN_DEFAULT);
}

Initialize loop using new API

Initialize loop using new API


#ifndef JTL_HASH_MAP_H__
#define JTL_HASH_MAP_H__
#include <memory>

namespace jtl {

template <typename Key,
          typename Value>
class HashMap {

  struct MapNode {
    MapNode(Key k, Value v) : key(k), value(v) {}
    ~MapNode() {
      delete key;
      delete value;
    }

    Key key;
    Value value;
  }; // struct MapNode

  class HashMapBase_ {
    private:
      // bins is an array of pointers to arrays of key-value nodes
      MapNode** bins_;

  }; // class HashMapBase_
  public:
  private:
    Key* bins_;
}; // class HashMap
} // namespace jtl
#endif

Add initial layout of hash map implementation


/*
 * Copyright 2010 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 <setjmp.h>
#include <stdio.h>

static jmp_buf buf;

int main(void) {
  volatile int result = -1;
  if (!setjmp(buf) ) {
    result = 55;
    printf("setjmp was invoked\n");
    longjmp(buf, 1);
    printf("this print statement is not reached\n");
    return -1;
  } else {
    printf("longjmp was invoked\n");
    return result;
  }
}

/*
 * Copyright 2010 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 <setjmp.h>
#include <stdio.h>

#include "native_client/src/include/nacl_assert.h"

static jmp_buf buf;

int trysetjmp(int longjmp_arg) {
  volatile int result = -1;
  int setjmp_ret = -1;

  setjmp_ret = setjmp(buf);
  if (!setjmp_ret) {
    /* Check that setjmp() doesn't return 0 multiple times */
    ASSERT_EQ(result, -1);

    result = 55;
    printf("setjmp was invoked\n");
    longjmp(buf, longjmp_arg);
    printf("this print statement is not reached\n");
    return -1;
  } else {
    int expected_ret = longjmp_arg != 0 ? longjmp_arg : 1;
    ASSERT_EQ(setjmp_ret, expected_ret);
    printf("longjmp was invoked\n");
    return result;
  }
}

int main(void) {
  if (trysetjmp(1) != 55 ||
      trysetjmp(0) != 55 ||
      trysetjmp(-1) != 55)
    return -1;
  return 55;
}

Test that invoking longjmp with an argument of 0 causes setjmp to return 1

Newlib's x86_64 implementation of longjmp previously failed for this case.
Update the setlongjmp.c test to check the return value of setjmp.
Additionally fail if setjmp returns 0 twice to avoid an infinite
loop in the recent failure case.

BUG= https://code.google.com/p/nativeclient/issues/detail?id=4088
R=mseaborn@chromium.org

Review URL: https://codereview.chromium.org/926533003


// RUN: clang -verify -emit-llvm -o - %s

int f0(int x) {
  int vla[x];
  return vla[x-1]; // expected-error {{cannot compile this return inside scope with VLA yet}}
}

// RUN: clang -verify -emit-llvm -o - %s

void *x = L"foo"; // expected-error {{cannot compile this wide string yet}}

Update test case; VLA's are now supported.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@64168 91177308-0d34-0410-b5e6-96231b3b80d8


/******************************************************************************\
 * gloperate
 *
 * Copyright (C) 2014 Computer Graphics Systems Group at the
 * Hasso-Plattner-Institut (HPI), Potsdam, Germany.
\******************************************************************************/

// Turn off warnings generated by Qt headers (this project uses 'treat warning as errors')

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#pragma GCC diagnostic ignored "-Wfloat-conversion"
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wswitch"
#endif

/******************************************************************************\
 * gloperate
 *
 * Copyright (C) 2014 Computer Graphics Systems Group at the
 * Hasso-Plattner-Institut (HPI), Potsdam, Germany.
\******************************************************************************/

// Turn off warnings generated by Qt headers (this project uses 'treat warning as errors')

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wfloat-equal"
#pragma GCC diagnostic ignored "-Wconversion"
#pragma GCC diagnostic ignored "-Wswitch"
#endif

Remove unrecognized gcc warning flag

Remove unrecognized gcc warning flag


//PARAM: --enable ana.int.enums --disable ana.int.def_exc
int main(){
    int top = rand();
    int x,y;

    if(top){
        x = 1;
    } else{
        x = 0;
    }

    assert(x<2);
    return 0;
}

Add test case for less-than comparision on enums.


#include "../sccs.h"

/*
 * Copyright (c) 2001 Andrew Chang       All rights reserved.
 */

int
gui_useDisplay(void)
{
	char	*p;

	if ((p = getenv("BK_NO_GUI_PROMPT")) && *p) return (0);
	if (win32() || macosx()) return ((p = getenv("BK_GUI")) && *p);
	return (getenv("DISPLAY") && (p = getenv("BK_GUI")) && *p);
}

char *
gui_displayName(void)
{
#ifdef WIN32
	return ("monitor");
#else
	if (gui_useAqua()) {return ("monitor");}
	return (getenv("DISPLAY"));
#endif

}

int
gui_useAqua(void)
{
#ifdef	__APPLE__
	char	*disp = getenv("DISPLAY");

	if ((disp == 0) || strneq(disp, "/tmp/launch", 11)) return (1);
#endif
	return 0;
}

#include "../sccs.h"

/*
 * Copyright (c) 2001 Andrew Chang       All rights reserved.
 */

int
gui_useDisplay(void)
{
	char	*p;

	if ((p = getenv("BK_NO_GUI_PROMPT")) && *p) return (0);
	if (win32() || macosx()) return ((p = getenv("BK_GUI")) && *p);
	return (getenv("DISPLAY") && (p = getenv("BK_GUI")) && *p);
}

char *
gui_displayName(void)
{
#ifdef WIN32
	return ("monitor");
#else
	if (gui_useAqua()) {return ("monitor");}
	return (getenv("DISPLAY"));
#endif

}

int
gui_useAqua(void)
{
#ifdef	__APPLE__
	char	*disp = getenv("DISPLAY");

	if ((disp == 0) || strneq(disp, "/tmp/launch", 11) ||
	    strstr(disp, "com.apple.launchd")) return (1);
#endif
	return 0;
}

Fix launching our GUIs in Mac OS X 10.10.

bk: 54947f4dZaedAuVpUTDfrtsbDBPyVA


#include <stdlib.h>
#include <stdio.h>

#include "../src/prompt.h"

int main(void)
{
  for (;;)
  {
    char *line = prompt("> ");
    if (line == NULL)
      break;

    printf("You wrote '%s'\n", line);
    free(line);
  }

  prompt_free();
  return 0;
}

#include <stdlib.h>
#include <stdio.h>

#ifdef DEBUG
#  include "../src/prompt.h"
#else
#  include <prompt.h>
#endif

int main(void)
{
  for (;;)
  {
    char *line = prompt("> ");
    if (line == NULL)
      break;

    printf("You wrote '%s'\n", line);
    free(line);
  }

  prompt_free();
  return 0;
}

Set header location depending on flags

Set header location depending on flags


/**
 * xmp3 - XMPP Proxy
 * Copyright (c) 2012 Drexel University
 *
 * @file jid_test.c
 * Unit tests for JID functions.
 */

#include <test-dept.h>
#include <stdlib.h>
#include <stdio.h>

#include "jid.h"

void setup(void) {
}

void teardown(void) {
    restore_function(&calloc);
}

static void* always_failing_calloc() {
    return NULL;
}

void test_new_bad_malloc(void) {
    replace_function(&calloc, &always_failing_calloc);
    struct jid* jid = jid_new();
    assert_pointer_equals(NULL, jid);
}

void test_from_str1(void) {
    struct jid* jid = jid_new_from_str("local@domain/resource");
    assert_string_equals("local", jid_local(jid));
    assert_string_equals("domain", jid_domain(jid));
    assert_string_equals("resource", jid_resource(jid));
    jid_del(jid);
}

void test_from_str2(void) {
    struct jid* jid = jid_new_from_str("local@domain");
    assert_string_equals("local", jid_local(jid));
    assert_string_equals("domain", jid_domain(jid));
    assert_pointer_equals(NULL, jid_resource(jid));
    jid_del(jid);
}

void test_from_str3(void) {
    struct jid* jid = jid_new_from_str("domain");
    assert_pointer_equals(NULL, jid_local(jid));
    assert_string_equals("domain", jid_domain(jid));
    assert_pointer_equals(NULL, jid_resource(jid));
    jid_del(jid);
}

Add some beginning test functions (for jid.c).


// PARAM: --disable ana.int.interval --disable ana.int.def_exc --enable ana.int.enums
void main(){
    int n = 1;
    for (; n; n++) { // fixed point not reached here
	}
	return;
}

Add failing test case for enums

Add failing test case for enums


/* CMSIS-DAP Interface Firmware
 * Copyright (c) 2009-2013 ARM Limited
 *
 * 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 "target_config.h"

// frdm-k64f target information
const target_cfg_t target_device = {
    .board_id   = "0000",
    .secret     = "xxxxxxxx",
    .sector_size    = 2048,
    // Assume memory is regions are same size. Flash algo should ignore requests
    //  when variable sized sectors exist
    // .sector_cnt = ((.flash_end - .flash_start) / .sector_size);
    .sector_cnt     = (kB(512)/2048),
    .flash_start    = 0,
    .flash_end      = kB(512),
    .ram_start      = 0x1FFF0000,
    .ram_end        = 0x20010000,
    .disc_size      = kB(512)
};

Add target description for KL26Z

Add target description for KL26Z


#ifndef _LOGINWINDOW_H_
#define _LOGINWINDOW_H_
#include <string>
#include <iostream>
#include "window.h"
using namespace std;
class LoginWindow : public Window {
    string name;
    string pass;
    public:
    LoginWindow():Window("Login") {}
    const string& getUsername() const {
        return name;
    }
    const string& getPassword() const {
        return pass;
    }
    virtual void handle() {
        bool passSet = false;
        bool nameSet = false;
        do {
            drawTitle();
            cout << "User: " << name << endl;
            cout << "Password: " << pass << endl;
            cout << endl << "Write 'u' to edit the username, 'p' to edit the password." << endl;
            string cmd = readCommand();
            if(cmd == "u") {
                string name = readCommand("User > ");
                this->name = name;
                nameSet = (name != "");
            }else if(cmd == "p") {
                string pass = readCommand("Pass > ");
                this->pass = pass;
                passSet = (pass != "");
            }
        }while(!passSet || !nameSet);
    }
};
#endif

#ifndef _LOGINWINDOW_H_
#define _LOGINWINDOW_H_
#include <string>
#include <iostream>
#include "window.h"
using namespace std;
class LoginWindow : public Window {
    string name;
    string pass;
    public:
    LoginWindow():Window("Login") {}
    const string& getUsername() const {
        return name;
    }
    const string& getPassword() const {
        return pass;
    }
    virtual void handle() {
        bool complete = false;
        do {
            drawTitle();
            cout << "User: " << name << endl;
            cout << "Password: " << string(pass.length(),'*') << endl;
            cout << endl << "Write 'u' to edit the username, 'p' to edit the password." << endl;
            if(pass != "" && name != "") {
                cout << "Write 'l' to login." << endl;
            }
            string cmd = readCommand();
            if(cmd == "u") {
                string name = readCommand("User > ");
                this->name = name;
            }else if(cmd == "p") {
                string pass = readCommand("Pass > ");
                this->pass = pass;
            }else if(pass != "" && name != "" && cmd == "l") {
                complete = true;
            }
        }while(!complete);
    }
};
#endif

Change login logic, add 'l' cmd

Change login logic, add 'l' cmd


// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/document/base/globalid.h>
#include <vespa/document/bucket/bucketid.h>
#include <persistence/spi/types.h>

namespace proton::bucketdb {

class RemoveBatchEntry {
    document::GlobalId      _gid;
    document::BucketId      _bucket_id;
    storage::spi::Timestamp _timestamp;
    uint32_t                _doc_size;
public:
    RemoveBatchEntry(const document::GlobalId& gid, const document::BucketId& bucket_id, const storage::spi::Timestamp& timestamp, uint32_t doc_size) noexcept
        : _gid(gid),
          _bucket_id(bucket_id),
          _timestamp(timestamp),
          _doc_size(doc_size)
    {
    }

    const document::GlobalId& get_gid() const noexcept { return _gid; }
    const document::BucketId& get_bucket_id() const noexcept { return _bucket_id; }
    const storage::spi::Timestamp& get_timestamp() const noexcept { return _timestamp; }
    uint32_t get_doc_size() const noexcept { return _doc_size; }
};

}

// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include <vespa/document/base/globalid.h>
#include <vespa/document/bucket/bucketid.h>
#include <persistence/spi/types.h>

namespace proton::bucketdb {

/*
 * Class containing meta data for a single document being removed from
 * bucket db.
 */
class RemoveBatchEntry {
    document::GlobalId      _gid;
    document::BucketId      _bucket_id;
    storage::spi::Timestamp _timestamp;
    uint32_t                _doc_size;
public:
    RemoveBatchEntry(const document::GlobalId& gid, const document::BucketId& bucket_id, const storage::spi::Timestamp& timestamp, uint32_t doc_size) noexcept
        : _gid(gid),
          _bucket_id(bucket_id),
          _timestamp(timestamp),
          _doc_size(doc_size)
    {
    }

    const document::GlobalId& get_gid() const noexcept { return _gid; }
    const document::BucketId& get_bucket_id() const noexcept { return _bucket_id; }
    const storage::spi::Timestamp& get_timestamp() const noexcept { return _timestamp; }
    uint32_t get_doc_size() const noexcept { return _doc_size; }
};

}

Add class comment for proton::bucketdb::RemoveBatchEntry.


#ifndef _SYSTEMEMORY_H_
#define _SYSTEMEMORY_H_

#include "windows.h"

class SystemMemory
{
private:
	MEMORYSTATUSEX memoryStat;
private:
	int memoryCall();
public:
	int getLoadPercent(int &val);
	int getUsage(double &val);
	int getTotalByte(DWORD &val);
	int getFreeByte(DWORD &val);
};

#endif

#ifndef _SYSTEMEMORY_H_
#define _SYSTEMEMORY_H_

#include "windows.h"

typedef unsigned long       DWORD;

class SystemMemory
{
private:
	MEMORYSTATUSEX memoryStat;
private:
	int memoryCall();
public:
	int getLoadPercent(int &val);
	int getUsage(double &val);
	int getTotalByte(DWORD &val);
	int getFreeByte(DWORD &val);
};

#endif

Define 'unsigned long' as 'DWORD' for cross-platform


#ifndef FINAL_SEQUENTIALSA_SA_H_
#define FINAL_SEQUENTIALSA_SA_H_

#endif  // FINAL_SEQUENTIALSA_SA_H_

#ifndef FINAL_SEQUENTIALSA_SA_H_
#define FINAL_SEQUENTIALSA_SA_H_

#define TEMPERATURE 100 /*Initial temperature*/
#define TEMPERATURE_DECREMENT 0.99 /*The amount by which teh temperature is decrement each iteration*/
#define TEMPERATURE_FINAL 0.01 /*The coolest temperature, time to stop*/
#define NUMBER_ITERATIONS 1000 /*Total number of iterations to execute before reducing temperature*/
#define ITERATIONS_PER_FILE 5 /*Number of times to run each input file*/

#endif  // FINAL_SEQUENTIALSA_SA_H_

Move constant declarations to header file


#ifndef _GMTK_H_
#define _GMTK_H_

#include "half.h"
#include "angle.h"
#include "vector.h"
#include "matrix.h"
#include "quaternion.h"

#endif//_GMTK_H_

#ifndef _GMTK_H_
#define _GMTK_H_

#include "half.h"
#include "angle.h"
#include "percent.h"
#include "vector.h"
#include "matrix.h"
#include "quaternion.h"

#endif//_GMTK_H_

Add percentage class to main header

Add percentage class to main header


#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>

struct termios orig_termios;

void disable_raw_mode() {
	tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}

void enable_raw_mode() {
	tcgetattr(STDIN_FILENO, &orig_termios);
	atexit(disable_raw_mode);

	struct termios raw = orig_termios;
	raw.c_lflag &= ~(ECHO | ICANON);

	tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}

int main() {
	enable_raw_mode();

	char c;
	while (read(STDIN_FILENO, &c, 1) == 1 && c != 'q') {
		if (iscntrl(c)) {
			printf("%d\n", c);
		} else {
			printf("%d ('%c')\n", c, c);
		}
	}
	return 0;
}

#include <ctype.h>
#include <stdio.h>
#include <stdlib.h>
#include <termios.h>
#include <unistd.h>

struct termios orig_termios;

void disable_raw_mode() {
	tcsetattr(STDIN_FILENO, TCSAFLUSH, &orig_termios);
}

void enable_raw_mode() {
	tcgetattr(STDIN_FILENO, &orig_termios);
	atexit(disable_raw_mode);

	struct termios raw = orig_termios;
	raw.c_lflag &= ~(ECHO | ICANON | ISIG);

	tcsetattr(STDIN_FILENO, TCSAFLUSH, &raw);
}

int main() {
	enable_raw_mode();

	char c;
	while (read(STDIN_FILENO, &c, 1) == 1 && c != 'q') {
		if (iscntrl(c)) {
			printf("%d\n", c);
		} else {
			printf("%d ('%c')\n", c, c);
		}
	}
	return 0;
}

Disable Ctrl-C and Ctrl-Z (Ctrl-Y on macOS)


#include <stdio.h>
#include <stdlib.h>
#include <vulkan/vulkan.h>

VKAPI_ATTR VkBool32 VKAPI_CALL
debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
              VkDebugUtilsMessageTypeFlagsEXT messageType,
              const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData,
              void *pUserData) {
  fprintf(stderr, "Validation: %s\n", pCallbackData->pMessage);
  return VK_FALSE;
}

VKAPI_ATTR VkBool32 VKAPI_CALL
debugCallbackFatal(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
                   VkDebugUtilsMessageTypeFlagsEXT messageType,
                   const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData,
                   void *pUserData) {
  int errorBitSet = VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT & messageSeverity;
  int isError = VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT == errorBitSet;

  fprintf(stderr, "Validation: %s\n", pCallbackData->pMessage);

  if (isError) {
    fprintf(stderr, "Aborting on validation error.\n");
    abort();
  }
  return VK_FALSE;
}

#include <stdio.h>
#include <stdlib.h>
#include <vulkan/vulkan.h>

VKAPI_ATTR VkBool32 VKAPI_CALL
debugCallback(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
              VkDebugUtilsMessageTypeFlagsEXT messageType,
              const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData,
              void *pUserData) {
  fprintf(stderr, "Validation: %s\n", pCallbackData->pMessage);
  return VK_FALSE;
}

VKAPI_ATTR VkBool32 VKAPI_CALL
debugCallbackFatal(VkDebugUtilsMessageSeverityFlagBitsEXT messageSeverity,
                   VkDebugUtilsMessageTypeFlagsEXT messageType,
                   const VkDebugUtilsMessengerCallbackDataEXT *pCallbackData,
                   void *pUserData) {
  debugCallback(messageSeverity, messageType, pCallbackData, pUserData);

  if (messageSeverity & VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT) {
    fprintf(stderr, "Aborting on validation error.\n");
    abort();
  }
  return VK_FALSE;
}

Write debugCallbackFatal in terms of debugCallback


#pragma once

#include <functional>
#include <vector>

#include <threadingzeug/threadingzeug.h>

namespace threadingzeug
{

template<typename T>
THREADINGZEUG_API void parallel_for(const std::vector<T>& elements, std::function<void(const T& element)> callback);

template<typename T>
THREADINGZEUG_API void parallel_for(std::vector<T>& elements, std::function<void(T& element)> callback);

THREADINGZEUG_API void parallel_for(int start, int end, std::function<void(int i)> callback);

template<typename T>
THREADINGZEUG_API void sequential_for(const std::vector<T>& elements, std::function<void(const T& element)> callback);

template<typename T>
THREADINGZEUG_API void sequential_for(std::vector<T>& elements, std::function<void(T& element)> callback);

THREADINGZEUG_API void sequential_for(int start, int end, std::function<void(int i)> callback);

} // namespace threadingzeug

#include <threadingzeug/parallelfor.hpp>

#pragma once

#include <functional>
#include <vector>

#include <threadingzeug/threadingzeug.h>

namespace threadingzeug
{

template<typename T>
void parallel_for(const std::vector<T>& elements, std::function<void(const T& element)> callback);

template<typename T>
void parallel_for(std::vector<T>& elements, std::function<void(T& element)> callback);

THREADINGZEUG_API void parallel_for(int start, int end, std::function<void(int i)> callback);

template<typename T>
void sequential_for(const std::vector<T>& elements, std::function<void(const T& element)> callback);

template<typename T>
void sequential_for(std::vector<T>& elements, std::function<void(T& element)> callback);

THREADINGZEUG_API void sequential_for(int start, int end, std::function<void(int i)> callback);

} // namespace threadingzeug

#include <threadingzeug/parallelfor.hpp>

Fix compile warning on Windows: C4273: 'threadingzeug::parallel_for' : inconsistent dll linkage


#define MODULE sample
#include <sqmodule.h>
#include <stdio.h>

DECLARE_SQAPI

static SQInteger func(HSQUIRRELVM v)
{
    static char s[] = "Hello, modules!";
    SQAPI(pushstring)(v, s, sizeof(s) - 1);
    return 1;
}

// Module init function

SQRESULT MODULE_INIT(HSQUIRRELVM v, HSQAPI api)
{
    printf("in sqmodule_load\n");

    INIT_SQAPI(api);

    SQAPI(pushstring)(v, _SC("func"), -1);
    SQAPI(newclosure)(v, func, 0);
    SQAPI(newslot)(v, -3, SQFalse);

    printf("out sqmodule_load\n");

    return SQ_OK;
}

#define MODULE sample
#include <sqmodule.h>
#include <stdio.h>

DECLARE_SQAPI

static SQInteger func(HSQUIRRELVM v)
{
    static char s[] = "Hello, modules!";
    SQAPI(pushstring)(v, s, sizeof(s) - 1);
    return 1;
}

// Module init function

SQRESULT MODULE_INIT(HSQUIRRELVM v, HSQAPI api)
{
    printf("in sqmodule_load\n");

    INIT_SQAPI(v, api);

    SQAPI(pushstring)(v, _SC("func"), -1);
    SQAPI(newclosure)(v, func, 0);
    SQAPI(newslot)(v, -3, SQFalse);

    printf("out sqmodule_load\n");

    return SQ_OK;
}

Update for sqmodule API change.

Update for sqmodule API change.


// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

# pragma once

#include <vespa/vespalib/datastore/entryref.h>

namespace search::memoryindex {

/**
 * Entry per document in memory index posting list.
 */
class PostingListEntry {
    mutable datastore::EntryRef _features; // reference to compressed features

public:
    PostingListEntry(datastore::EntryRef features)
        : _features(features)
    {
    }

    PostingListEntry()
        : _features()
    {
    }
       datastore::EntryRef get_features() const { return _features; }

    // Reference moved data (used when compacting FeatureStore)
    void update_features(datastore::EntryRef features) const { _features = features; }
};

}

// Copyright 2019 Oath Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

# pragma once

#include <vespa/vespalib/datastore/entryref.h>

namespace search::memoryindex {

/**
 * Entry per document in memory index posting list.
 */
class PostingListEntry {
    mutable datastore::EntryRef _features; // reference to compressed features

public:
    PostingListEntry(datastore::EntryRef features)
        : _features(features)
    {
    }

    PostingListEntry()
        : _features()
    {
    }

    datastore::EntryRef get_features() const { return _features; }

    /*
     * Reference moved features (used when compacting FeatureStore).
     * The moved features must have the same content as the original
     * features.
     */
    void update_features(datastore::EntryRef features) const { _features = features; }
};

}

Fix indentation and update comment.

Fix indentation and update comment.


/* mbed Microcontroller Library
 * Copyright (c) 2006-2013 ARM Limited
 *
 * 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 <stdlib.h>
#include <stdarg.h>
#include "device.h"
#include "toolchain.h"
#include "mbed_error.h"
#include "mbed_interface.h"
#if DEVICE_STDIO_MESSAGES
#include <stdio.h>
#endif

WEAK void error(const char* format, ...) {
    va_list arg;
    va_start(arg, format);
    mbed_error_vfprintf(format, arg);
    va_end(arg);
    exit(1);
}

/* mbed Microcontroller Library
 * Copyright (c) 2006-2013 ARM Limited
 *
 * 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 <stdlib.h>
#include <stdarg.h>
#include "device.h"
#include "toolchain.h"
#include "mbed_error.h"
#include "mbed_interface.h"
#if DEVICE_STDIO_MESSAGES
#include <stdio.h>
#endif

WEAK void error(const char* format, ...) {
#ifndef NDEBUG
    va_list arg;
    va_start(arg, format);
    mbed_error_vfprintf(format, arg);
    va_end(arg);
#endif
    exit(1);
}

Allow the trace output by mbed error to be conditional of NDEBUG.

This change avoid inclusion of printf and friends code in a binary when it
is compiled with the macro NDEBUG enabled (this macro is usually enabled
for production builds).

Unlike assert, the error function will still crash/halt the execution of the
application even if NDEBUG is enabled; the traces are just not outputed.


//
// ResponseDetective.h
//
// Copyright (c) 2016 Netguru Sp. z o.o. All rights reserved.
// Licensed under the MIT License.
//

/// Project version number for ResponseDetective.
extern double ResponseDetectiveVersionNumber;

/// Project version string for ResponseDetective.
extern const unsigned char ResponseDetectiveVersionString[];

#import <ResponseDetective/RDTBodyDeserializer.h>
#import <ResponseDetective/RDTXMLBodyDeserializer.h>
#import <ResponseDetective/RDTHTMLBodyDeserializer.h>

//
// ResponseDetective.h
//
// Copyright (c) 2016 Netguru Sp. z o.o. All rights reserved.
// Licensed under the MIT License.
//

/// Project version number for ResponseDetective.
extern double ResponseDetectiveVersionNumber;

/// Project version string for ResponseDetective.
extern const unsigned char ResponseDetectiveVersionString[];

@import Foundation;

#import <ResponseDetective/RDTBodyDeserializer.h>
#import <ResponseDetective/RDTXMLBodyDeserializer.h>
#import <ResponseDetective/RDTHTMLBodyDeserializer.h>

Add global foundation import to umbrella header


#ifndef _SOCKET_H_
#define _SOCKET_H_

namespace bittorrent
{
    namespace socket
    {
        struct Buffer
        {
            Buffer(char *b, std::size_t bl)
                : buf(b), buflen(bl), used(0) { }

            char *buf;
            std::size_t buflen;
            std::size_t used;
        };

        class BufferAllocator
        {
        public:
            static Buffer AllocBuf(std::size_t size);
            static void DeallocBuf(Buffer& buf);
        };

        class Socket
        {
        public:
            Socket();

            void Send(Buffer& buf);
            void Recv(Buffer& buf);
        };

        class Acceptor
        {
        public:
            Acceptor();
        };
    } // namespace socket
} // namespace bittorrent

#endif // _SOCKET_H_

#ifndef _SOCKET_H_
#define _SOCKET_H_

#include <WinSock2.h>
#include <cstddef>

namespace bittorrent
{
    namespace socket
    {
        struct Buffer
        {
            Buffer(char *b, std::size_t bl)
                : buf(b), buflen(bl), used(0) { }

            char *buf;
            std::size_t buflen;
            std::size_t used;
        };

        class BufferAllocator
        {
        public:
            static Buffer AllocBuf(std::size_t size);
            static void DeallocBuf(Buffer& buf);
        };

        class Address
        {
        public:
            static const long any = INADDR_ANY;

            Address();
            Address(long hladdress);
            Address(const char *address);

            operator long () const { return address_; }

        private:
            long address_;
        };

        class Port
        {
        public:
            Port(short hsport);
            operator short () const { return port_; }

        private:
            short port_;
        };

        class IoService;

        class Socket
        {
        public:
            Socket();

            void Connect(const Address& address, const Port& port);
            void Send(Buffer& buf);
            void Recv(Buffer& buf);
            void Close();
            SOCKET GetRawSock() const;

        private:
            SOCKET sock_;
            IoService *service_;
        };

        class Acceptor
        {
        public:
            Acceptor(const Address& address, const Port& port);

            void Accept(Socket& sock);
            void Close();
            SOCKET GetRawSock() const;

        private:
            SOCKET sock_;
            IoService *service_;
        };

        class IoService
        {
        public:
            typedef HANDLE ServiceHandle;
            IoService();

            void Send(Socket *socket, Buffer& buf);
            void Recv(Socket *socket, Buffer& buf);
            void Connect(Socket *socket, const sockaddr *name);
            void Accept(Acceptor *acceptor, Socket& socket);

        private:
            ServiceHandle handle_;
        };
    } // namespace socket
} // namespace bittorrent

#endif // _SOCKET_H_

Add Address, Port and IoService classes in namespace socket, and complete classes' declaration.


/*
 * QLogic iSCSI HBA Driver
 * Copyright (c)  2003-2012 QLogic Corporation
 *
 * See LICENSE.qla4xxx for copyright and licensing details.
 */

#define QLA4XXX_DRIVER_VERSION	"5.03.00-k4"

/*
 * QLogic iSCSI HBA Driver
 * Copyright (c)  2003-2012 QLogic Corporation
 *
 * See LICENSE.qla4xxx for copyright and licensing details.
 */

#define QLA4XXX_DRIVER_VERSION	"5.03.00-k5"

Update driver version to 5.03.00-k5

[SCSI] qla4xxx: Update driver version to 5.03.00-k5

Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>


/*
 * QLogic iSCSI HBA Driver
 * Copyright (c)  2003-2012 QLogic Corporation
 *
 * See LICENSE.qla4xxx for copyright and licensing details.
 */

#define QLA4XXX_DRIVER_VERSION	"5.03.00-k3"

/*
 * QLogic iSCSI HBA Driver
 * Copyright (c)  2003-2012 QLogic Corporation
 *
 * See LICENSE.qla4xxx for copyright and licensing details.
 */

#define QLA4XXX_DRIVER_VERSION	"5.03.00-k4"

Update driver version to 5.03.00-k4

[SCSI] qla4xxx: Update driver version to 5.03.00-k4

Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>


/*
 * QLogic iSCSI HBA Driver
 * Copyright (c)  2003-2012 QLogic Corporation
 *
 * See LICENSE.qla4xxx for copyright and licensing details.
 */

#define QLA4XXX_DRIVER_VERSION	"5.03.00-k8"

/*
 * QLogic iSCSI HBA Driver
 * Copyright (c)  2003-2012 QLogic Corporation
 *
 * See LICENSE.qla4xxx for copyright and licensing details.
 */

#define QLA4XXX_DRIVER_VERSION	"5.03.00-k9"

Update driver version to 5.03.00-k9

[SCSI] qla4xxx: Update driver version to 5.03.00-k9

Signed-off-by: Vikas Chaudhary <c251871a64d7d31888eace0406cb3d4c419d5f73@qlogic.com>
Signed-off-by: James Bottomley <1acebbdca565c7b6b638bdc23b58b5610d1a56b8@Parallels.com>


/*
 * registers.h
 */

#ifndef	REGISTERS_H
#define	REGISTERS_H

#define REGSIZE	8	/* number of registers */
/* Program Registers */
#define EAX		0x0
#define ECX		0x1
#define EDX		0x2
#define EBX		0x3
#define ESP		0x4
#define EBP		0x5
#define ESI		0x6
#define EDI		0x7
#define RNONE	0xf	/* i.e. - no register needed */

/* Condition Codes (CC) */
#define ZF		0x2		/* zero flag     - bit 2 of the CC */
#define SF		0x1		/* sign flag     - bit 1 of the CC */
#define OF		0x0		/* overflow flag - bit 0 of the CC */

void clearCC(void);
void clearRegisters(void);
unsigned int getCC(unsigned int bitNumber);
unsigned int getRegister(int regNum);
void setCC(unsigned int bitNumber, unsigned int value);
void setRegister(int regNum, unsigned int regValue);

#endif	/* REGISTERS_H */

/*
 * registers.h
 */

#ifndef	REGISTERS_H
#define	REGISTERS_H

#define REGSIZE	8	/* number of registers */
/* Program Registers */
#define EAX		0x0
#define ECX		0x1
#define EDX		0x2
#define EBX		0x3
#define ESP		0x4
#define EBP		0x5
#define ESI		0x6
#define EDI		0x7
#define RNONE	0xf	/* i.e. - no register needed */

/* Condition Codes (CC) */
/*
 * Set with each arithmetic/logical operation (OPL).
 * ZF: was the result 0?
 * SF: was the result < 0?
 * OF: did the result overflow? (2's complement)
 */
#define ZF		0x2		/* zero flag     - bit 2 of the CC */
#define SF		0x1		/* sign flag     - bit 1 of the CC */
#define OF		0x0		/* overflow flag - bit 0 of the CC */

void clearCC(void);
void clearRegisters(void);
unsigned int getCC(unsigned int bitNumber);
unsigned int getRegister(int regNum);
void setCC(unsigned int bitNumber, unsigned int value);
void setRegister(int regNum, unsigned int regValue);

#endif	/* REGISTERS_H */

Add descriptions of the CC's

Add descriptions of the CC's


/****************************************************************************/
/* This file is part of the Simbatch project                                */
/* written by Jean-Sebastien Gay, ENS Lyon                                  */
/*                                                                          */
/* Copyright (c) 2007 Jean-Sebastien Gay. All rights reserved.              */
/*                                                                          */
/* This program is free software; you can redistribute it and/or modify it  */
/* under the terms of the license (GNU LGPL) which comes with this package. */
/****************************************************************************/

#ifndef _BATCH_H_
#define _BATCH_H_

/*
 * Simulates the behavior of a Batch system
 * MSG_tasks to use when calling the function:
 * SB_TASK
 * SB_RES to make reservations
 * SB_ACK when a task has been done
 * SB_DIET when working with DIET
 * SED_PRED to perform a prediction of when the task will
 *   be able to execute
 * SED_HPF
 * PF_INIT to initialize the batch
 */
int SB_batch(int argc, char ** argv);

#endif

/****************************************************************************/
/* This file is part of the Simbatch project.                               */
/* written by Jean-Sebastien Gay and Ghislain Charrier, ENS Lyon.           */
/*                                                                          */
/* Copyright (c) 2007, Simbatch Team. All rights reserved.                  */
/*                                                                          */
/* This program is free software; you can redistribute it and/or modify it  */
/* under the terms of the license (GNU LGPL) which comes with this package. */
/****************************************************************************/

#ifndef _BATCH_H_
#define _BATCH_H_

/**
 * \file batch.h
 * Define the batch process.
 */

/**
 * Simulates the behavior of a Batch system.
 *
 * The behaviour of the batch process consists in responding to incoming
 * messages and to schedule jobs sent by clients. Messages are MSG_task
 * datatype provided by the simgrid library.
 *
 * Here is a short description of the different tasks received:
 * SB_TASK conatins the job to schedule.
 * SB_RES to make reservations.
 * SB_ACK when a task has been done on a cpu. 5 cpus for a task => 5 SB_ACK.
 * SB_DIET to allow Diet for using Simbatch.
 * SED_PRED to perform a prediction of when the task will be able to execute.
 * SED_HPF (work in progess)
 * PF_INIT to initialize the batch
 *
 * \param argc number of parameters transmitted to the SB_batch process.
 * \param **argv array containing the parameters. argc and argc are
 * automacilly filled by simgrid when parsing the deployment.xml file.
 * \return an error code.
 */
int
SB_batch(int argc, char **argv);

#endif

Add documentation in doxygen style (use JAVA_BRIEF)

git-svn-id: 20e1f66da029c194d4fbd4305fcdc34286e936b0@6168 48e7efb5-ca39-0410-a469-dd3cf9ba447f


#ifndef             __VALUES_H__
# define            __VALUES_H__

#include "mpc.h"

typedef struct {
    int             type;
    long            num;

    /* Error and Symbol types have some string data */
    char*           err;
    char*           sym;

    /* Count and Pointer to a list of "lval*" */
    int             count;
    struct lval**   cell;
} lval;

/* Create Enumeration of Possible lval Types */
enum {
    LVAL_ERR,
    LVAL_NUM,
    LVAL_SYM,
    LVAL_SEXPR
};

/* Create Enumeration of Possible Error Types */
enum {
    LERR_DIV_ZERO,
    LERR_BAD_OP,
    LERR_BAD_NUM
};

lval*           lval_num(long);
lval*           lval_err(char*);
lval*           lval_sym(char*);
lval*           lval_sexpr(void);
lval*           lval_add(lval*, struct lval*);
void            lval_del(lval*);
lval*           lval_read_num(mpc_ast_t*);
lval*           lval_read(mpc_ast_t*);
void            lval_expr_print(lval*, char, char);
void            lval_print(lval*);
void            lval_println(lval*);

#endif

#ifndef             __VALUES_H__
# define            __VALUES_H__

#include "mpc.h"

typedef struct      s_lval {
    int             type;
    long            num;

    /* Error and Symbol types have some string data */
    char*           err;
    char*           sym;

    /* Count and Pointer to a list of "lval*" */
    int             count;
    struct s_lval** cell;
}                   lval;

/* Create Enumeration of Possible lval Types */
enum {
    LVAL_ERR,
    LVAL_NUM,
    LVAL_SYM,
    LVAL_SEXPR
};

/* Create Enumeration of Possible Error Types */
enum {
    LERR_DIV_ZERO,
    LERR_BAD_OP,
    LERR_BAD_NUM
};

lval*           lval_num(long);
lval*           lval_err(char*);
lval*           lval_sym(char*);
lval*           lval_sexpr(void);
lval*           lval_add(lval*, struct lval*);
void            lval_del(lval*);
lval*           lval_read_num(mpc_ast_t*);
lval*           lval_read(mpc_ast_t*);
void            lval_expr_print(lval*, char, char);
void            lval_print(lval*);
void            lval_println(lval*);

#endif

Fix forward lval struct declaration

Fix forward lval struct declaration


/*
 * Copyright 2013 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by 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 _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H

#define BTA_DISABLE_DELAY 100 /* in milliseconds */

#define BTM_WBS_INCLUDED TRUE
#define BTIF_HF_WBS_PREFERRED TRUE

#endif

/*
 * Copyright 2013 The Android Open Source Project
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by 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 _BDROID_BUILDCFG_H
#define _BDROID_BUILDCFG_H

#define BTA_DISABLE_DELAY 100 /* in milliseconds */

#define BTM_WBS_INCLUDED TRUE
#define BTIF_HF_WBS_PREFERRED TRUE
#define BLE_VND_INCLUDED TRUE
#endif

Use run time parameters to control LE features

    Use values read from controller to enable and control LE features such as
    multi advertising, RPA offload, maximum irk size etc
    bug 15393216


extern void print_int(int x);
extern void print_string(char c[]);

int x;
char c;

void main(void){

    // check signed-ness of char -> int conversion
    x = -1;
    c = x;
    print_string("should get -1\ngot: ");
    print_int(c);
    print_string("\n\n");

    x = -2147483647;
    print_string("should get -2147483647\ngot: ");
    print_int(x);
    print_string("\n\n");

    // check signed-ness of char -> int conversion
    x = -2147483648;
    print_string("should get -2147483648\ngot: ");
    print_int(x);
    print_string("\n\n");
}

extern void print_int(int x);
extern void print_string(char c[]);

int x;
char c;

void main(void){

    /* check signed-ness of char -> int conversion */
    x = -1;
    c = x;
    print_string("should get -1\ngot: ");
    print_int(c);
    print_string("\n\n");

    x = -2147483647;
    print_string("should get -2147483647\ngot: ");
    print_int(x);
    print_string("\n\n");

    /* check signed-ness of char -> int conversion */
    x = -2147483648;
    print_string("should get -2147483648\ngot: ");
    print_int(x);
    print_string("\n\n");
}

Edit comments so they align with our C-- spec


#ifndef _UNWIND_DATATYPE_H
#define _UNWIND_DATATYPE_H

#include <unwind/common/std_unw_cursor.h>
typedef void* unw_word_t;

#endif

Add _unw_datatypes.h to unwind/mips directory


/** @file
  Monotonic Counter Architectural Protocol as defined in PI SPEC VOLUME 2 DXE

  This code provides the services required to access the systems monotonic counter

  Copyright (c) 2006 - 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 __ARCH_PROTOCOL_MONTONIC_COUNTER_H__
#define __ARCH_PROTOCOL_MONTONIC_COUNTER_H__

///
/// Global ID for the Monotonic Counter Architectural Protocol
///
#define EFI_MONTONIC_COUNTER_ARCH_PROTOCOL_GUID \
  {0x1da97072, 0xbddc, 0x4b30, {0x99, 0xf1, 0x72, 0xa0, 0xb5, 0x6f, 0xff, 0x2a} }

extern EFI_GUID gEfiMonotonicCounterArchProtocolGuid;

#endif

/** @file
  Monotonic Counter Architectural Protocol as defined in PI SPEC VOLUME 2 DXE

  This code provides the services required to access the systems monotonic counter

  Copyright (c) 2006 - 2010, 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 __ARCH_PROTOCOL_MONTONIC_COUNTER_H__
#define __ARCH_PROTOCOL_MONTONIC_COUNTER_H__

///
/// Global ID for the Monotonic Counter Architectural Protocol
///
#define EFI_MONOTONIC_COUNTER_ARCH_PROTOCOL_GUID \
  {0x1da97072, 0xbddc, 0x4b30, {0x99, 0xf1, 0x72, 0xa0, 0xb5, 0x6f, 0xff, 0x2a} }

extern EFI_GUID gEfiMonotonicCounterArchProtocolGuid;

#endif

Fix typo in Monotonic Counter GUID macro name

git-svn-id: 5648d1bec6962b0a6d1d1b40eba8cf5cdb62da3d@9806 6f19259b-4bc3-4df7-8a09-765794883524


/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
 */
#define HAVE_ALLOCA_H 1

/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#define HAVE_FSEEKO 1

/* Define to 1 if you have the `pthread' library (-lpthread). */
#define HAVE_LIBPTHREAD 1

/* Define to 1 if you have the `realpath' function. */
#define HAVE_REALPATH 1

#if defined(__MINGW32__)
#undef HAVE_ALLOCA_H
#undef HAVE_REALPATH
#endif
#if defined(_MSC_VER)
#undef HAVE_ALLOCA_H
#undef HAVE_REALPATH
#undef HAVE_LIBPTHREAD
#undef HAVE_FSEEKO
#endif

# ifndef __STDC_FORMAT_MACROS
#  define __STDC_FORMAT_MACROS 1
# endif

/* Define to 1 if you have <alloca.h> and it should be used (not on Ultrix).
 */
#define HAVE_ALLOCA_H 1

/* Define to 1 if fseeko (and presumably ftello) exists and is declared. */
#define HAVE_FSEEKO 1

/* Define to 1 if you have the `pthread' library (-lpthread). */
#define HAVE_LIBPTHREAD 1

/* Define to 1 if you have the `realpath' function. */
#define HAVE_REALPATH 1

#if defined(__MINGW32__)
#undef HAVE_ALLOCA_H
#undef HAVE_REALPATH
#endif
#if defined(_MSC_VER)
#undef HAVE_ALLOCA_H
#undef HAVE_REALPATH
#undef HAVE_LIBPTHREAD
#undef HAVE_FSEEKO
#endif
#ifdef __FreeBSD__
#undef HAVE_ALLOCA_H
#endif

# ifndef __STDC_FORMAT_MACROS
#  define __STDC_FORMAT_MACROS 1
# endif

Fix build on FreeBSD, which has no alloca.h


/***************************************************************************
*   Copyright © 2004 Jason Kivlighn <jkivlighn@gmail.com>                 *
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
***************************************************************************/

#ifndef KREBORDER_H
#define KREBORDER_H

#include <QColor>
#include <QString>

//typedef enum KreBorderStyle { None = 0, Dotted, Dashed, Solid, Double, Groove, Ridge, Inset, Outset };

class KreBorder
{
public:
	KreBorder( int w = 1, const QString & s = "none", const QColor &c = Qt::black );

	int width;
	QString style;
	QColor color;
};

#endif //KREBORDER_H

/***************************************************************************
*   Copyright © 2004 Jason Kivlighn <jkivlighn@gmail.com>                 *
*                                                                         *
*   This program is free software; you can redistribute it and/or modify  *
*   it under the terms of the GNU General Public License as published by  *
*   the Free Software Foundation; either version 2 of the License, or     *
*   (at your option) any later version.                                   *
***************************************************************************/

#ifndef KREBORDER_H
#define KREBORDER_H

#include <QColor>
#include <QString>

//typedef enum KreBorderStyle { None = 0, Dotted, Dashed, Solid, Double, Groove, Ridge, Inset, Outset };

class KreBorder
{
public:
	explicit KreBorder( int w = 1, const QString & s = "none", const QColor &c = Qt::black );

	int width;
	QString style;
	QColor color;
};

#endif //KREBORDER_H

Fix Krazy warnings: explicit - KreBorder

svn path=/trunk/extragear/utils/krecipes/; revision=1119814


// PARAM: --set ana.activated[+] var_eq
// ldv-benchmarks: u__linux-concurrency_safety__drivers---net---ethernet---ethoc.ko.cil.c
#include <assert.h>

struct resource {
   char const *name ;
   unsigned long flags ;
   struct resource *parent ;
   struct resource *sibling ;
   struct resource *child ;
};

struct resource *magic();

int main() {
  struct resource *res = (struct resource *)0;
  res = magic();

  if (res == (struct resource *)0)
    assert(1); // reachable
  else
    assert(1); // TODO reachable

  return 0;
}

Add var_eq unsound unknown function invalidate test


#ifndef __THREAD_INFO_H
#define __THREAD_INFO_H

#include "globals.h"
#include "sift_writer.h"
#include "bbv_count.h"

#include "pin.H"
#include <deque>

typedef struct {
   Sift::Writer *output;
   std::deque<ADDRINT> *dyn_address_queue;
   Bbv *bbv;
   UINT64 thread_num;
   ADDRINT bbv_base;
   UINT64 bbv_count;
   ADDRINT bbv_last;
   BOOL bbv_end;
   UINT64 blocknum;
   UINT64 icount;
   UINT64 icount_detailed;
   UINT32 last_syscall_number;
   UINT32 last_syscall_returnval;
   UINT64 flowcontrol_target;
   ADDRINT tid_ptr;
   ADDRINT last_routine;
   BOOL last_syscall_emulated;
   BOOL running;
   #if defined(TARGET_IA32)
      uint8_t __pad[41];
   #elif defined(TARGET_INTEL64)
      uint8_t __pad[13];
   #endif
} __attribute__((packed)) thread_data_t;

extern thread_data_t *thread_data;

void initThreads();

#endif // __THREAD_INFO_H

#ifndef __THREAD_INFO_H
#define __THREAD_INFO_H

#include "globals.h"
#include "sift_writer.h"
#include "bbv_count.h"

#include "pin.H"
#include <deque>

typedef struct {
   Sift::Writer *output;
   std::deque<ADDRINT> *dyn_address_queue;
   Bbv *bbv;
   UINT64 thread_num;
   ADDRINT bbv_base;
   UINT64 bbv_count;
   ADDRINT bbv_last;
   BOOL bbv_end;
   UINT64 blocknum;
   UINT64 icount;
   UINT64 icount_detailed;
   ADDRINT last_syscall_number;
   ADDRINT last_syscall_returnval;
   UINT64 flowcontrol_target;
   ADDRINT tid_ptr;
   ADDRINT last_routine;
   BOOL last_syscall_emulated;
   BOOL running;
   #if defined(TARGET_IA32)
      uint8_t __pad[41];
   #elif defined(TARGET_INTEL64)
      uint8_t __pad[5];
   #endif
} __attribute__((packed)) thread_data_t;

extern thread_data_t *thread_data;

void initThreads();

#endif // __THREAD_INFO_H

[sift] Fix data type for syscall return value to be native word size (ADDRINT rather than INT32) so negative system call return values are passed back correctly


/*
* OAEP
* (C) 1999-2007 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/

#ifndef BOTAN_OAEP_H_
#define BOTAN_OAEP_H_

#include <botan/eme.h>
#include <botan/hash.h>

namespace Botan {

/**
* OAEP (called EME1 in IEEE 1363 and in earlier versions of the library)
*/
class BOTAN_PUBLIC_API(2,0) OAEP final : public EME
   {
   public:
      size_t maximum_input_size(size_t) const override;

      /**
      * @param hash function to use for hashing (takes ownership)
      * @param P an optional label. Normally empty.
      */
      OAEP(HashFunction* hash, const std::string& P = "");
   private:
      secure_vector<uint8_t> pad(const uint8_t in[],
                              size_t in_length,
                              size_t key_length,
                              RandomNumberGenerator& rng) const override;

      secure_vector<uint8_t> unpad(uint8_t& valid_mask,
                                const uint8_t in[],
                                size_t in_len) const override;

      secure_vector<uint8_t> m_Phash;
      std::unique_ptr<HashFunction> m_hash;
   };

}

#endif

/*
* OAEP
* (C) 1999-2007 Jack Lloyd
*
* Botan is released under the Simplified BSD License (see license.txt)
*/

#ifndef BOTAN_OAEP_H_
#define BOTAN_OAEP_H_

#include <botan/eme.h>
#include <botan/hash.h>

namespace Botan {

/**
* OAEP (called EME1 in IEEE 1363 and in earlier versions of the library)
* as specified in PKCS#1 v2.0 (RFC 2437)
*/
class BOTAN_PUBLIC_API(2,0) OAEP final : public EME
   {
   public:
      size_t maximum_input_size(size_t) const override;

      /**
      * @param hash function to use for hashing (takes ownership)
      * @param P an optional label. Normally empty.
      */
      OAEP(HashFunction* hash, const std::string& P = "");
   private:
      secure_vector<uint8_t> pad(const uint8_t in[],
                              size_t in_length,
                              size_t key_length,
                              RandomNumberGenerator& rng) const override;

      secure_vector<uint8_t> unpad(uint8_t& valid_mask,
                                const uint8_t in[],
                                size_t in_len) const override;

      secure_vector<uint8_t> m_Phash;
      std::unique_ptr<HashFunction> m_hash;
   };

}

#endif

Add note on OAEP version implemented

Add note on OAEP version implemented [ci skip]


#import <Foundation/Foundation.h>

/**
 *  Type for objects that describe a component category to use for fallbacks using `HUBComponentFallbackHandler`
 *
 *  An application using the Hub Framework can declare any number of categories to use when performing fallback logic
 *  for components, in case an unknown component namespace/name combo was encountered.
 *
 *  Ideally, a component category should be generic enough to apply to a range of components with similar visuals and
 *  behavior, but still contain enough information for a `HUBComponentFallbackHandler` to create appropriate fallback
 *  components based on them.
 */
typedef NSObject<NSCopying, NSCoding> HUBComponentCategory;

/// Category for components that have a row-like appearance, with a full screen width and a compact height
static HUBComponentCategory * const HUBComponentCategoryRow = @"row";

/// Category for components that have a card-like appearance, that are placable in a grid with compact width & height
static HUBComponentCategory * const HUBComponentCategoryCard = @"card";

/// Category for components that have a carousel-like apperance, with a swipeable horizontal set of child components
static HUBComponentCategory * const HUBComponentCategoryCarousel = @"carousel";

/// Category for components that have a banner-like appearance, imagery-heavy with a full screen width and compact height
static HUBComponentCategory * const HUBComponentCategoryBanner = @"banner";

Add component category for banners

Add component category for banners

Needed for components like billboards, promotions etc that are neither
cards or rows.


__attribute__((objc_root_class))
@interface ImplicitProperties
- (id)implicitProperty;
- (void)setImplicitProperty:(id)implicitProperty;

- (void)setAnotherImplicitProperty:(int)implicitProperty;
- (int)anotherImplicitProperty;
@end

__attribute__((objc_root_class))
@interface BadImplicitProperties
- (int)nonVoidReturn;
- (int)setNonVoidReturn:(int)val;

- (void)setNonMatchingType:(id)val;
- (int)nonMatchingType;

- (int)wrongGetterArgs:(int)val;
- (void)setWrongGetterArgs:(int)val;

- (void)setWrongSetterArgs:(int)val extra:(int)another;
- (int)wrongSetterArgs;

- (int)wrongSetterArgs2;
- (void)setWrongSetterArgs2;

- (int)getterOnly;

- (void)setSetterOnly:(int)val;
@end

@protocol PropertiesProto
- (id)methodInProto;
@property id propertyInProto;
@end

__attribute__((objc_root_class))
@interface Base <PropertiesProto>
- (id)methodInBase;
@property(readonly) id propertyInBase;

- (id)methodPairInBase;
- (void)setMethodPairInBase:(id)value;

- (id)getterOnlyInBase;

- (void)setSetterOnlyInBase:(id)value;

@property id methodInProto;
- (id)propertyInProto;
- (id)methodInBaseButPropertyInProto;
@property id propertyInBaseButMethodInProto;
@end

@protocol SubProto
- (id)propertyInBaseButMethodInProto;
@property id methodInBaseButPropertyInProto;
@end

@interface Sub : Base <SubProto>
@property id methodInBase;
- (id)propertyInBase;

- (void)setMethodPairInBase:(id)value;

- (id)getterOnlyInBase;
- (void)setGetterOnlyInBase:(id)value;

- (id)setterOnlyInBase;
@end

[ClangImporter] Add some more tests for mixing methods and properties.

The rule right now is basically "the class is most important, followed by
the superclass, followed by protocols", which I think is the right rule.
As long as we aren't required to /check/ the conformance to an Objective-C
protocol, we should be fine.

Swift SVN r16036


// RUN: %clang_cc1 -triple mips64-unknown-freebsd -std=c11 -verify %s
// RUN: %clang_cc1 -triple mips-unknown-freebsd -std=c11 -verify %s
// RUN: %clang_cc1 -triple mips-unknown-linux-std=c11 -verify %s
// RUN: %clang_cc1 -triple mips64-unknown-linux-std=c11 -verify %s
// expected-no-diagnostics

#ifdef _ABI64
#  ifdef __FreeBSD__
_Static_assert(sizeof(long double) == 8, "sizeof long double is wrong");
_Static_assert(_Alignof(long double) == 8, "alignof long double is wrong");
#  else
_Static_assert(sizeof(long double) == 16, "sizeof long double is wrong");
_Static_assert(_Alignof(long double) == 16, "alignof long double is wrong");
#  endif
#else
_Static_assert(sizeof(long double) == 8, "sizeof long double is wrong");
_Static_assert(_Alignof(long double) == 8, "alignof long double is wrong");
#endif

// RUN: %clang_cc1 -triple mips64-unknown-freebsd -std=c11 -verify %s
// RUN: %clang_cc1 -triple mips-unknown-freebsd -std=c11 -verify %s
// RUN: %clang_cc1 -triple mips-unknown-linux -std=c11 -verify %s
// RUN: %clang_cc1 -triple mips64-unknown-linux -std=c11 -verify %s
// expected-no-diagnostics

#ifdef _ABI64
#  ifdef __FreeBSD__
_Static_assert(sizeof(long double) == 8, "sizeof long double is wrong");
_Static_assert(_Alignof(long double) == 8, "alignof long double is wrong");
#  else
_Static_assert(sizeof(long double) == 16, "sizeof long double is wrong");
_Static_assert(_Alignof(long double) == 16, "alignof long double is wrong");
#  endif
#else
_Static_assert(sizeof(long double) == 8, "sizeof long double is wrong");
_Static_assert(_Alignof(long double) == 8, "alignof long double is wrong");
#endif

Add missing spaces. This doesn't cause problems in practice because we only warn
about _Static_assert with -pedantic.

git-svn-id: ffe668792ed300d6c2daa1f6eba2e0aa28d7ec6c@171860 91177308-0d34-0410-b5e6-96231b3b80d8


/*
 * 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 107
#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 108
#endif

Update Skia milestone to 108

Update Skia milestone to 108

Change-Id: I9b44ccf2c942eefbb9992e0a130690c8d24116ac
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/581916
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Auto-Submit: Rakshit Sharma <e91e6cdce3825eaad0fa11b55195605cfed87fab@google.com>
Reviewed-by: Rakshit Sharma <e91e6cdce3825eaad0fa11b55195605cfed87fab@google.com>
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>


#include <truth/cpu.h>
#include <truth/types.h>
#include <truth/log.h>
#include <truth/physical_allocator.h>

void kernel_main(void *multiboot_tables) {
    init_interrupts();
    enum status unused(status) = init_log("log");
    init_physical_allocator(multiboot_tables);
    logf("The Kernel of Truth\n\tVersion %d.%d.%d\n\tCommit %s\n", kernel_major, kernel_minor, kernel_patch, vcs_version);
    halt();
}

#include <truth/cpu.h>
#include <truth/types.h>
#include <truth/log.h>
#include <truth/physical_allocator.h>

void kernel_main(void *multiboot_tables) {
    init_interrupts();
    enum status unused(status) = init_log("log");
    init_physical_allocator(multiboot_tables);
    logf("The Kernel of Truth\n\tVersion %d.%d.%d\n\tCommit %s\n\t%s\n",
         kernel_major, kernel_minor, kernel_patch, vcs_version,
         project_website);
    halt();
}

Add project website to startup message

Add project website to startup message


//
//  TKDOMProxyMaker.h
//  TumblKitNG
//
//  Created by uasi on 09/10/31.
//  Copyright 2009 99cm.org. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
#import <ActorKit/ActorKit.h>

// TKDOMMaker
//
// Make a DOMDocument from given URL synchronously
//
@interface TKDOMMaker : NSObject {
    NSMutableSet *workerPool_;
}

+ (id)DOMMaker;

// NOTE:
// - Do NOT perform newDOMDocumentWithURLString on the main thread
// - Returned DOMDocument MUST be released with releaseDOM:
//
- (DOMDocument *)newDOMDocumentWithURLString:(NSString *)URLString;
- (void)releaseDOM:(id)object;

@end

//
//  TKDOMProxyMaker.h
//  TumblKitNG
//
//  Created by uasi on 09/10/31.
//  Copyright 2009 99cm.org. All rights reserved.
//

#import <Cocoa/Cocoa.h>
#import <WebKit/WebKit.h>
#import <ActorKit/ActorKit.h>

// TKDOMMaker
//
// Make a DOMDocument from given URL synchronously
//
@interface TKDOMMaker : NSObject {
}

+ (id)DOMMaker;

// NOTE:
// - Do NOT perform newDOMDocumentWithURLString on the main thread
// - Returned DOMDocument MUST be released with releaseDOM:
//
- (DOMDocument *)newDOMDocumentWithURLString:(NSString *)URLString;
- (void)releaseDOM:(id)object;

@end

Remove unused instance variable 'workerPool_'


/*
Copyright (C) 2015 George White <stonehippo@gmail.com>, All rights reserved.

See https://raw.githubusercontent.com/stonehippo/sploder/master/LICENSE.txt for license details.
*/

// ******************* Timing helpers *******************
void startTimer(long &timer) {
  timer = millis();
}

boolean isTimerExpired(long &timer, int expiration) {
  long current = millis() - timer;
  return current > expiration;
}

void clearTimer(long &timer) {
  timer = 0;
}

/*
Copyright (C) 2015 George White <stonehippo@gmail.com>, All rights reserved.

See https://raw.githubusercontent.com/stonehippo/sploder/master/LICENSE.txt for license details.
*/

// ******************* Timing helpers *******************
void startTimer(long &timer) {
  timer = millis();
}

boolean isTimerExpired(long &timer, long expiration) {
  long current = millis() - timer;
  return current > expiration;
}

void clearTimer(long &timer) {
  timer = 0;
}

Fix bug in timing helper

Fix bug in timing helper


/* $Id$Revision: */
/* vim:set shiftwidth=4 ts=8: */

/**********************************************************
*      This software is part of the graphviz package      *
*                http://www.graphviz.org/                 *
*                                                         *
*            Copyright (c) 1994-2004 AT&T Corp.           *
*                and is licensed under the                *
*            Common Public License, Version 1.0           *
*                      by AT&T Corp.                      *
*                                                         *
*        Information and Software Systems Research        *
*              AT&T Research, Florham Park NJ             *
**********************************************************/

#ifndef MULTISPLINE_H
#define MULTISPLINE_H

#include <render.h>
#include <pathutil.h>

typedef struct router_s router_t;

extern void freeRouter (router_t* rtr);
extern router_t* mkRouter (Ppoly_t** obs, int npoly);
extern int makeMultiSpline(edge_t* e, router_t * rtr, int);

#endif

Add support for edge routing to ports on the periphery of nodes, and splines for multiedges.