/*****************************************************************************
* PROGRAM NAME: CNodeO.h
* PROGRAMMER: Wei Sun	wsun@vt.edu
* PURPOSE: Define the node object in user defined function
*****************************************************************************/
#ifndef COPASI_CNodeO
#define	COPASI_CNodeO

#include <string>
#include <vector>

#include "copasi.h"
#include "model/model.h"
#include "utilities/utilities.h"
#include "function/function.h"

class CNodeO: public CNodeK
{
private:
	/**
	 *  Title of the node.
	 */
	string mTitle;
	/**
     *  Type of the node's Datum.
	 */
	C_INT32 mDatumType;
	/**
	 * I String of the node
	 */
	string mI;
	/**
	 * J String of the node
	 */
	string mJ;

public:
	/**
     * Default constructor
     */
    CNodeO();
	/**
	 * Constructor for operator
	 * @param "const string" title
	 * @param "const C_INT32" type
	 * @param "const string" i_str
	 * @param "const string" j_str
	 */
	CNodeO(string title, C_INT32 type, string i_str, string j_str);

	/**
	 * Destructor
	 */
	~CNodeO();

	/**
	 * Delete
	 */
	void cleanup();

	/**
     *  Loads an object with data coming from a CReadConfig object.
     *  (CReadConfig object reads an input stream)
     *  @param pconfigbuffer reference to a CReadConfig object.
     *  @return Fail
     */
    C_INT32 load(CReadConfig & configbuffer);

	/**
     *  Saves the contents of the object to a CWriteConfig object.
     *  (Which usually has a file attached but may also have socket)
     *  @param pconfigbuffer reference to a CWriteConfig object.
     *  @return Fail
     */
    C_INT32 save(CWriteConfig & configbuffer) const;

    /**
     * Retrieving the Title of a node
     * @return string
     */
    string getTitle() const;

   /**
    * Retrieving I String of a node
    * @return string
    */
   string getIString() const;

   /**
    * Retrieving J String of a node
    * @return string
    */
   string getJString() const;

   /**
    * Setting Title of the node
    * @param "const string" &title
    */
   void setTitle(const string& title);

   /**
    * Setting I String of the node
    * @param "const string" &i_string
    */

   void setIString(const string & i_string);

   /**
    * Setting I String of the node
    * @param "const string" &j_string
    */
   void setJString(const string & j_string);

   /**
    * Get the node's Datum type
	*/
   C_INT32 getDatumType() const;

   /**
    * Set the node's Datum Type
	*/
   void setDatumType(const C_INT32 datumType);
};
#endif

Save each node in User Defined Functions


// RUN: clang -checker-simple -verify %s &&
// RUN: clang -checker-simple -analyzer-store-region -verify %s

struct s {
  int data;
  int data_array[10];
};

typedef struct {
  int data;
} STYPE;

void g1(struct s* p);

void f(void) {
  int a[10];
  int (*p)[10];
  p = &a;
  (*p)[3] = 1;

  struct s d;
  struct s *q;
  q = &d;
  q->data = 3;
  d.data_array[9] = 17;
}

void f2() {
  char *p = "/usr/local";
  char (*q)[4];
  q = &"abc";
}

void f3() {
  STYPE s;
}

void f4() {
  int a[] = { 1, 2, 3};
  int b[3] = { 1, 2 };
}

void f5() {
  struct s data;
  g1(&data);
}

void f6() {
  char *p;
  p = __builtin_alloca(10);
  p[1] = 'a';
}

struct s2;

void g2(struct s2 *p);

void f7() {
  struct s2 *p = __builtin_alloca(10);
  g2(p);
}

void f8() {
  int a[10];
  a[sizeof(a) - 1] = 1;
}

Add test for unsigned array index.

Add test for unsigned array index.

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


#ifndef __VIDEO_RX_H__
#define __VIDEO_RX_H__

#include "libavformat/avformat.h"

typedef struct DecodedFrame {
	AVFrame* pFrameRGB;
	uint8_t *buffer;
} DecodedFrame;

typedef struct FrameManager {
	enum PixelFormat pix_fmt;
	void (*put_video_frame_rx)(uint8_t *data, int with, int height, int nframe);
	DecodedFrame* (*get_decoded_frame_buffer)(int width, int height);
	void (*release_decoded_frame_buffer)(void);
} FrameManager;

int start_video_rx(const char* sdp, int maxDelay, FrameManager *frame_manager);
int stop_video_rx();

#endif /* __VIDEO_RX_H__ */

#ifndef __VIDEO_RX_H__
#define __VIDEO_RX_H__

#include "libavformat/avformat.h"

typedef struct DecodedFrame {
	AVFrame* pFrameRGB;
	uint8_t *buffer;
} DecodedFrame;

typedef struct FrameManager {
	enum PixelFormat pix_fmt;
	void (*put_video_frame_rx)(uint8_t *data, int width, int height, int nframe);
	DecodedFrame* (*get_decoded_frame_buffer)(int width, int height);
	void (*release_decoded_frame_buffer)(void);
} FrameManager;

int start_video_rx(const char* sdp, int maxDelay, FrameManager *frame_manager);
int stop_video_rx();

#endif /* __VIDEO_RX_H__ */

Fix width param name in put_video_frame_rx function pointer.


/* Unit tests for functions that implement aspects of bitblasting.
 *
 * SCL; 2016
 */

#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>

#include "ptree.h"
#include "tests_common.h"

int main( int argc, char **argv )
{
    ptree_t *head = NULL;

    head = var_to_bool( "x", 2 );
    if (head == NULL) {
        ERRPRINT( "var_to_bool() unexpectedly returned NULL (error)." );
        abort();
    }

    delete_tree( head );
    head = NULL;

    return 0;
}

/* Unit tests for functions that implement aspects of bitblasting.
 *
 * SCL; 2016
 */

#define _POSIX_C_SOURCE 200809L
#include <stdlib.h>
#include <string.h>

#include "ptree.h"
#include "tests_common.h"

int main( int argc, char **argv )
{
    ptree_t *head = NULL;

    head = var_to_bool( "x", 2 );
    if (head == NULL) {
        ERRPRINT( "var_to_bool() unexpectedly returned NULL (error)." );
        abort();
    }
    if (tree_size( head ) != 2) {
        ERRPRINT1( "var_to_bool() returned list of %d variables, "
                   "rather than list of length 2.",
                   tree_size( head ) );
        abort();
    }
    if (strncmp( "x0", (get_list_item( head, 0 ))->name, 2 )
        || strncmp( "x1", (get_list_item( head, 1 ))->name, 2 )) {
        ERRPRINT( "unexpected bit-index variable name from var_to_bool()" );
        abort();
    }

    delete_tree( head );
    head = NULL;

    return 0;
}

TEST: Test more aspects of return value from var_to_bool


#ifndef CJET_PEER_TESTING_H
#define CJET_PEER_TESTING_H

#ifdef TESTING

#ifdef __cplusplus
extern "C" {
#endif

int fake_read(int fd, void *buf, size_t count);
int fake_send(int fd, void *buf, size_t count, int flags);

#ifdef __cplusplus
}
#endif

#define READ fake_read
#define SEND fake_send
#define WRITEV fake_writev
#else

#define READ read
#define SEND send
#define WRITEV writev

#endif

#endif

#ifndef CJET_PEER_TESTING_H
#define CJET_PEER_TESTING_H

#ifdef TESTING

#ifdef __cplusplus
extern "C" {
#endif

int fake_read(int fd, void *buf, size_t count);
int fake_send(int fd, void *buf, size_t count, int flags);
int fake_writev(int fd, const struct iovec *iov, int iovcnt);

#ifdef __cplusplus
}
#endif

#define READ fake_read
#define SEND fake_send
#define WRITEV fake_writev
#else

#define READ read
#define SEND send
#define WRITEV writev

#endif

#endif

Add missing prototype for fake_writev().


///////////////////////////////////////////////////////////////////////////////
// Copyright (C) 2013, PAL Robotics S.L.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//   * Redistributions of source code must retain the above copyright notice,
//     this list of conditions and the following disclaimer.
//   * Redistributions in binary form must reproduce the above copyright
//     notice, this list of conditions and the following disclaimer in the
//     documentation and/or other materials provided with the distribution.
//   * Neither the name of hiDOF, Inc. nor the names of its
//     contributors may be used to endorse or promote products derived from
//     this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//////////////////////////////////////////////////////////////////////////////

/// \author Adolfo Rodriguez Tsouroukdissian

#ifndef TRANSMISSION_INTERFACE_ROBOT_TRANSMISSIONS_H
#define TRANSMISSION_INTERFACE_ROBOT_TRANSMISSIONS_H

#include <hardware_interface/internal/interface_manager.h>
#include <hardware_interface/robot_hw.h>

namespace transmission_interface
{

/**
 * \brief Robot transmissions interface.
 *
 * This class provides a standardized interface to a set of robot transmission interfaces that allow to map between
 * actuator and joint spaces. It is meant to be used as a building block for robot hardware abstractions.
 *
 * This class implements a 1-to-1 map between the names of transmission interface types and instances of those
 * interface types.
 */
class RobotTransmissions : public hardware_interface::InterfaceManager {};

} // namespace

#endif // header guard

Add class for holding transmission interfaces.

- Mirrors hardware_interface::RobotHW, but for transmissions.


/*
   For more information, please see: http://software.sci.utah.edu

   The MIT License

   Copyright (c) 2013 Scientific Computing and Imaging Institute,
   University of Utah.

   Permission is hereby granted, free of charge, to any person obtaining a
   copy of this software and associated documentation files (the "Software"),
   to deal in the Software without restriction, including without limitation
   the rights to use, copy, modify, merge, publish, distribute, sublicense,
   and/or sell copies of the Software, and to permit persons to whom the
   Software is furnished to do so, subject to the following conditions:

   The above copyright notice and this permission notice shall be included
   in all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
   DEALINGS IN THE SOFTWARE.
*/

/// \author James Hughes
/// \date   October 2013

#ifndef NAMESPACES_H
#define NAMESPACES_H

// 'Forward declaration' of namespaces.
namespace CPM_SPIRE_NS {}

namespace CPM_SPIRE_SCIRUN_NS {

// Renaming namespaces in our top level.
namespace spire = CPM_SPIRE_NS;

} // namespace CPM_SPIRE_SCIRUN_NS

#endif

/*
   For more information, please see: http://software.sci.utah.edu

   The MIT License

   Copyright (c) 2013 Scientific Computing and Imaging Institute,
   University of Utah.

   Permission is hereby granted, free of charge, to any person obtaining a
   copy of this software and associated documentation files (the "Software"),
   to deal in the Software without restriction, including without limitation
   the rights to use, copy, modify, merge, publish, distribute, sublicense,
   and/or sell copies of the Software, and to permit persons to whom the
   Software is furnished to do so, subject to the following conditions:

   The above copyright notice and this permission notice shall be included
   in all copies or substantial portions of the Software.

   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
   OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
   FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
   THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
   LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
   FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
   DEALINGS IN THE SOFTWARE.
*/

/// \author James Hughes
/// \date   October 2013

#ifndef MODULE_SPIRE_SCIRUN_NAMESPACES_H
#define MODULE_SPIRE_SCIRUN_NAMESPACES_H

// 'Forward declaration' of namespaces.
namespace CPM_SPIRE_NS {}

namespace CPM_SPIRE_SCIRUN_NS {

namespace spire = CPM_SPIRE_NS;

} // namespace CPM_SPIRE_SCIRUN_NS

#endif

Make include guard more specific.

Make include guard more specific.


#if __has_include(<Braintree/BraintreeVenmo.h>)
#import <Braintree/BraintreeCore.h>
#else
#import <BraintreeCore/BraintreeCore.h>
#endif

/**
 Contains information about a Venmo Account payment method
 */
@interface BTVenmoAccountNonce : BTPaymentMethodNonce

/**
 The email associated with the Venmo account
*/
@property (nonatomic, nullable, readonly, copy) NSString *email;

/**
 The external ID associated with the Venmo account
*/
@property (nonatomic, nullable, readonly, copy) NSString *externalId;

/**
 The first name associated with the Venmo account
*/
@property (nonatomic, nullable, readonly, copy) NSString *firstName;

/**
 The last name associated with the Venmo account
*/
@property (nonatomic, nullable, readonly, copy) NSString *lastName;

/**
 The phone number associated with the Venmo account
*/
@property (nonatomic, nullable, readonly, copy) NSString *phoneNumber;

/**
 The username associated with the Venmo account
*/
@property (nonatomic, nullable, readonly, copy) NSString *username;

@end

#if __has_include(<Braintree/BraintreeVenmo.h>)
#import <Braintree/BraintreeCore.h>
#else
#import <BraintreeCore/BraintreeCore.h>
#endif

/**
 Contains information about a Venmo Account payment method
 */
@interface BTVenmoAccountNonce : BTPaymentMethodNonce

/**
 :nodoc:
 The email associated with the Venmo account
*/
@property (nonatomic, nullable, readonly, copy) NSString *email;

/**
 :nodoc:
 The external ID associated with the Venmo account
*/
@property (nonatomic, nullable, readonly, copy) NSString *externalId;

/**
 :nodoc:
 The first name associated with the Venmo account
*/
@property (nonatomic, nullable, readonly, copy) NSString *firstName;

/**
 :nodoc:
 The last name associated with the Venmo account
*/
@property (nonatomic, nullable, readonly, copy) NSString *lastName;

/**
 :nodoc:
 The phone number associated with the Venmo account
*/
@property (nonatomic, nullable, readonly, copy) NSString *phoneNumber;

/**
 The username associated with the Venmo account
*/
@property (nonatomic, nullable, readonly, copy) NSString *username;

@end

Add nodoc for beta fields.

Add nodoc for beta fields.


#ifndef APIMOCK_REQUESTDATA_H
#define APIMOCK_REQUESTDATA_H

#include <string>

namespace ApiMock {
	struct RequestData {
		enum HTTP_VERSION {
			HTTP_1_1,
		} httpVersion;

		enum METHOD {
			GET,
			POST,
			PUT,
			DELETE,
		} method;

		std::string requestUri;
	};
}

#endif

#ifndef APIMOCK_REQUESTDATA_H
#define APIMOCK_REQUESTDATA_H

#include <string>
#include <unordered_map>

namespace ApiMock {
	struct RequestData {
		enum HTTP_VERSION {
			HTTP_1_1,
		} httpVersion;

		enum METHOD {
			GET,
			POST,
			PUT,
			DELETE,
		} method;

		std::string requestUri;
		std::unordered_map<std::string, std::string> headers;
	};
}

#endif

Add headers to request data

Add headers to request data


/*
 * Generic NUMBBO runtime implementation.
 *
 * Other language interfaces might want to replace this so that memory
 * allocation and error handling goes through the respective language
 * runtime.
 */
#include <stdio.h>
#include <stdlib.h>

#include "numbbo.h"

void numbbo_error(const char *message) {
    fprintf(stderr, "FATAL ERROR: %s\n", message);
    exit(EXIT_FAILURE);
}

void numbbo_warning(const char *message) {
    fprintf(stderr, "WARNING: %s\n", message);
}

void *numbbo_allocate_memory(size_t size) {
    void *data = malloc(size);
    if (data == NULL)
        numbbo_error("numbbo_allocate_memory() failed.");
    return data;
}

void numbbo_free_memory(void *data) {
    free(data);
}

/*
 * Generic NUMBBO runtime implementation.
 *
 * Other language interfaces might want to replace this so that memory
 * allocation and error handling go through the respective language
 * runtime.
 */
#include <stdio.h>
#include <stdlib.h>

#include "numbbo.h"

void numbbo_error(const char *message) {
    fprintf(stderr, "FATAL ERROR: %s\n", message);
    exit(EXIT_FAILURE);
}

void numbbo_warning(const char *message) {
    fprintf(stderr, "WARNING: %s\n", message);
}

void *numbbo_allocate_memory(size_t size) {
    void *data = malloc(size);
    if (data == NULL)
        numbbo_error("numbbo_allocate_memory() failed.");
    return data;
}

void numbbo_free_memory(void *data) {
    free(data);
}

Fix grammar mistake in comment.

Fix grammar mistake in comment.


/* Modify the temperature conversion program to print the table in reverse
 * order, that is, from 300 degrees to 0. */

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

int main(int argc, char **argv)
{
  printf("F\tC\n=============\n");
  float i;
  for (i = 300; i >= 0; i -= 20) {
    printf("%3.0f\t%5.1f\n", i, (5.0 / 9.0) * (i - 32.0));
  }
  return EXIT_SUCCESS;
}

Add solution to Exercise 1-5.

Add solution to Exercise 1-5.


/*
 * 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 105
#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 106
#endif

Update Skia milestone to 106

Update Skia milestone to 106

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


/*
 * 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 70
#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 71
#endif

Update Skia milestone to 71

Update Skia milestone to 71

TBR:reed@google.com
NOTRY=true

Bug: skia:
Change-Id: Ic3a9b2511fed9a731867200e4f298f8f54eaf85b
Reviewed-on: https://skia-review.googlesource.com/150580
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>


/*
 * 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 62
#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 63
#endif

Update Skia milestone to 63

Update Skia milestone to 63

TBR: reed

Change-Id: I0ae2640539d640227ede9b818793f220f2328832
Reviewed-on: https://skia-review.googlesource.com/41361
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>


// RUN: clang-cc -analyze -checker-cfref -analyzer-store=region --verify %s

// Test if the 'storage' region gets properly initialized after it is cast to
// 'struct sockaddr *'.

#include <sys/types.h>
#include <sys/socket.h>

void f(int sock) {
  struct sockaddr_storage storage;
  struct sockaddr* sockaddr = (struct sockaddr*)&storage;
  socklen_t addrlen = sizeof(storage);
  getsockname(sock, sockaddr, &addrlen);
  switch (sockaddr->sa_family) { // no-warning
  default:
    ;
  }
}

struct s {
  struct s *value;
};

void f1(struct s **pval) {
  int *tbool = ((void*)0);
  struct s *t = *pval;
  pval = &(t->value);
  tbool = (int *)pval; // Should record the cast-to type here.
  char c = (unsigned char) *tbool; // Should use cast-to type to create symbol.
  if (*tbool == -1)
    (void)3;
}

void f2(const char *str) {
 unsigned char ch, cl, *p;

 p = (unsigned char *)str;
 ch = *p++; // use cast-to type 'unsigned char' to create element region.
 cl = *p++;
 if(!cl)
    cl = 'a';
}

// RUN: clang-cc -triple x86_64-apple-darwin9 -analyze -checker-cfref -analyzer-store=region --verify %s

// Test if the 'storage' region gets properly initialized after it is cast to
// 'struct sockaddr *'.

typedef unsigned char __uint8_t;
typedef unsigned int __uint32_t;
typedef __uint32_t __darwin_socklen_t;
typedef __uint8_t sa_family_t;
typedef __darwin_socklen_t socklen_t;
struct sockaddr { sa_family_t sa_family; };
struct sockaddr_storage {};

void f(int sock) {
  struct sockaddr_storage storage;
  struct sockaddr* sockaddr = (struct sockaddr*)&storage;
  socklen_t addrlen = sizeof(storage);
  getsockname(sock, sockaddr, &addrlen);
  switch (sockaddr->sa_family) { // no-warning
  default:
    ;
  }
}

struct s {
  struct s *value;
};

void f1(struct s **pval) {
  int *tbool = ((void*)0);
  struct s *t = *pval;
  pval = &(t->value);
  tbool = (int *)pval; // Should record the cast-to type here.
  char c = (unsigned char) *tbool; // Should use cast-to type to create symbol.
  if (*tbool == -1)
    (void)3;
}

void f2(const char *str) {
 unsigned char ch, cl, *p;

 p = (unsigned char *)str;
 ch = *p++; // use cast-to type 'unsigned char' to create element region.
 cl = *p++;
 if(!cl)
    cl = 'a';
}

Make this test case more portable by removing its dependency on system header files.

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


// RUN: %clang -### %s -c -o tmp.o -triple i686-pc-linux-gnu -integrated-as -Wa,--noexecstack 2>&1 | grep "mnoexecstack"

// RUN: %clang -### %s -c -o tmp.o -target i686-pc-linux-gnu -integrated-as -Wa,--noexecstack 2>&1 | FileCheck %s

// CHECK: "-cc1" {{.*}} "-mnoexecstack"

Use -target instead of triple and use FileCheck.

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


// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.4a+memtag %s 2>&1 | FileCheck %s
// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.5a+memtag %s 2>&1 | FileCheck %s
// CHECK: "-target-feature" "+mte"

// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.4a+nomemtag %s 2>&1 | FileCheck %s --check-prefix=NOMTE
// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.5a+nomemtag %s 2>&1 | FileCheck %s --check-prefix=NOMTE
// NOMTE: "-target-feature" "-mte"

// RUN: %clang -### -target aarch64-none-none-eabi                 %s 2>&1 | FileCheck %s --check-prefix=ABSENTMTE
// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.4a %s 2>&1 | FileCheck %s --check-prefix=ABSENTMTE
// RUN: %clang -### -target aarch64-none-none-eabi -march=armv8.5a %s 2>&1 | FileCheck %s --check-prefix=ABSENTMTE
// ABSENTMTE-NOT: "-target-feature" "+mte"
// ABSENTMTE-NOT: "-target-feature" "-mte"

[AArch64][v8.5A] Test clang option for the Memory Tagging Extension

The implementation of this is in TargetParser, so we only need to add a
test for it in clang.

Patch by Pablo Barrio!

Differential revision: https://reviews.llvm.org/D52493

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


typedef struct
{
    unsigned long long int width,height;
    long long int handle_x,handle_y;
    GLuint texture;
    SDL_Surface *surface;
    GLuint mask;
} Image;

void bb_fatal_error(char *msg);

typedef struct
{
    long long int width,height;
    long long int width_frames,height_frames;
    long long int handle_x,handle_y;
    GLuint *textures;
    SDL_Surface *surface;
    GLuint mask_color;
    unsigned long long int **masks;
    unsigned long long int mask_width;
    unsigned long long int mask_height;
} Image;

void bb_fatal_error(char *msg);

Change definition of Image struct so all width/height fields are signed integers. Add fields to Image struct that deal with collision masking.


/* $Id$ */
/*
 * %PSC_START_COPYRIGHT%
 * -----------------------------------------------------------------------------
 * Copyright (c) 2006-2010, Pittsburgh Supercomputing Center (PSC).
 *
 * Permission to use, copy, and modify this software and its documentation
 * without fee for personal use or non-commercial use within your organization
 * is hereby granted, provided that the above copyright notice is preserved in
 * all copies and that the copyright and this permission notice appear in
 * supporting documentation.  Permission to redistribute this software to other
 * organizations or individuals is not permitted without the written permission
 * of the Pittsburgh Supercomputing Center.  PSC makes no representations about
 * the suitability of this software for any purpose.  It is provided "as is"
 * without express or implied warranty.
 * -----------------------------------------------------------------------------
 * %PSC_END_COPYRIGHT%
 */

#ifndef _FUSE_LISTENER_H_
#define _FUSE_LISTENER_H_

#include <fuse_lowlevel.h>

#define FUSE_OPTIONS "allow_other,max_write=134217728,big_writes"

void	slash2fuse_listener_exit(void);
int	slash2fuse_listener_init(void);
int	slash2fuse_listener_start(void);
int	slash2fuse_newfs(const char *, struct fuse_chan *);

extern int exit_fuse_listener;

#endif /* _FUSE_LISTENER_H_ */

/* $Id$ */
/*
 * %PSC_START_COPYRIGHT%
 * -----------------------------------------------------------------------------
 * Copyright (c) 2006-2010, Pittsburgh Supercomputing Center (PSC).
 *
 * Permission to use, copy, and modify this software and its documentation
 * without fee for personal use or non-commercial use within your organization
 * is hereby granted, provided that the above copyright notice is preserved in
 * all copies and that the copyright and this permission notice appear in
 * supporting documentation.  Permission to redistribute this software to other
 * organizations or individuals is not permitted without the written permission
 * of the Pittsburgh Supercomputing Center.  PSC makes no representations about
 * the suitability of this software for any purpose.  It is provided "as is"
 * without express or implied warranty.
 * -----------------------------------------------------------------------------
 * %PSC_END_COPYRIGHT%
 */

#ifndef _FUSE_LISTENER_H_
#define _FUSE_LISTENER_H_

#include <fuse_lowlevel.h>

/* The following options are explained in FUSE README file */
#define FUSE_OPTIONS "use_ino,allow_other,max_write=134217728,big_writes"

void	slash2fuse_listener_exit(void);
int	slash2fuse_listener_init(void);
int	slash2fuse_listener_start(void);
int	slash2fuse_newfs(const char *, struct fuse_chan *);

extern int exit_fuse_listener;

#endif /* _FUSE_LISTENER_H_ */

Add use_ino to see if it helps our rename replay bug.

git-svn-id: ae92b08b608af1c8cefa3e10d2325ea527204e07@11960 3eda493b-6a19-0410-b2e0-ec8ea4dd8fda


//
//  libPusher.h
//  Pods
//
//  Created by Alexander Schuch on 08/04/13.
//
//

#import <Pusher/PTPusher.h>
#import <Pusher/PTPusherServerBasedAuthorization.h>
#import <Pusher/PTPusherChannel.h>
#import <Pusher/PTPusherEvent.h>
#import <Pusher/PTPusherAPI.h>
#import <Pusher/PTPusherEventDispatcher.h>

//
//  libPusher.h
//  Pods
//
//  Created by Alexander Schuch on 08/04/13.
//
//

#import "PTPusher.h"
#import "PTPusherChannelServerBasedAuthorization.h"
#import "PTPusherChannel.h"
#import "PTPusherEvent.h"
#import "PTPusherAPI.h"

Use quoted paths in global header.

Use quoted paths in global header.


#ifndef AT_NETWORK_H
#define AT_NETWORK_H

// Under Windows, define stuff that we need
#ifdef _MSC_VER
    #include <winsock.h>

    #define MAXHOSTNAMELEN   64

    #define EWOULDBLOCK   WSAEWOULDBLOCK
    #define EINPROGRESS   WSAEINPROGRESS
    #define MSG_WAITALL   0

    typedef SOCKET   Socket;
    typedef int      socklen_t;
    typedef char     SocketOptionFlag;
#else
    #include <unistd.h>
    #include <string.h>
    #include <netdb.h>
    #include <fcntl.h>
    #include <errno.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <sys/param.h>
    #include <sys/select.h>
    #include <netinet/in.h>
    #include <netinet/tcp.h>

    typedef int   Socket;
    typedef int   SocketOptionFlag;
#endif

void     initNetwork();
void     cleanupNetwork();

Socket   openSocket(int domain, int type, int protocol);
void     closeSocket(Socket socket);

void     setBlockingFlag(Socket socket, bool block);
bool     getBlockingFlag(Socket socket);

#endif

#ifndef AT_NETWORK_H
#define AT_NETWORK_H

// Under Windows, define stuff that we need
#ifdef _MSC_VER
    #include <winsock.h>

    #define MAXHOSTNAMELEN   64

    #define EWOULDBLOCK   WSAEWOULDBLOCK
    #define EINPROGRESS   WSAEINPROGRESS
    #define MSG_WAITALL   0

    typedef SOCKET   Socket;
    typedef int      socklen_t;
    typedef char     SocketOptionFlag;
    typedef int      SocketOptionValue;
#else
    #include <unistd.h>
    #include <string.h>
    #include <netdb.h>
    #include <fcntl.h>
    #include <errno.h>
    #include <sys/types.h>
    #include <sys/socket.h>
    #include <sys/param.h>
    #include <sys/select.h>
    #include <netinet/in.h>
    #include <netinet/tcp.h>

    typedef int   Socket;
    typedef int   SocketOptionFlag;
    typedef int   SocketOptionValue;
#endif

void     initNetwork();
void     cleanupNetwork();

Socket   openSocket(int domain, int type, int protocol);
void     closeSocket(Socket socket);

void     setBlockingFlag(Socket socket, bool block);
bool     getBlockingFlag(Socket socket);

#endif

Add new typedef for values sent to setsockopt().


/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * Maps and raises the specified window id (integer).
 */

#include <X11/Xlib.h>
#include <stdlib.h>

int main(int argc, char** argv) {
    if (argc != 2) return 2;
    Display* display = XOpenDisplay(NULL);
    if (!display) return 1;
    XMapRaised(display, atoi(argv[1]));
    XCloseDisplay(display);
    return 0;
}

/* Copyright (c) 2013 The Chromium OS Authors. All rights reserved.
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 *
 * Maps and raises the specified window id (integer).
 */

/* TODO: use XResizeWindow to do the +1 width ratpoison hack.
 * And at this point, we might as well use XMoveResizeWindow, rename this to
 * wmtool and unmap the previously-mapped window, and perhaps call the
 * equivalent of XRefresh, eliminating the need for ratpoison entirely (!!).
 */

#include <X11/Xlib.h>
#include <stdlib.h>

int main(int argc, char** argv) {
    if (argc != 2) return 2;
    Display* display = XOpenDisplay(NULL);
    if (!display) return 1;
    XMapRaised(display, atoi(argv[1]));
    XCloseDisplay(display);
    return 0;
}

Add TODO to replace ratpoison.

Add TODO to replace ratpoison.


// Testcase for PR1242
// RUN: %llvmgcc -c %s -o %t && lli --force-interpreter=1 %t
#include <stdlib.h>
#define NDIM 3
#define BODY 01
typedef double vector[NDIM];
typedef struct bnode* bodyptr;
// { i16, double, [3 x double], i32, i32, [3 x double], [3 x double], [3 x
// double], double, \2 *, \2 * }
struct bnode {
  short int type;
  double mass;
  vector pos;
  int proc;
  int new_proc;
  vector vel;
  vector acc;
  vector new_acc;
  double phi;
  bodyptr next;
  bodyptr proc_next;
} body;

#define Type(x) ((x)->type)
#define Mass(x) ((x)->mass)
#define Pos(x)  ((x)->pos)
#define Proc(x) ((x)->proc)
#define New_Proc(x) ((x)->new_proc)
#define Vel(x)  ((x)->vel)
#define Acc(x)  ((x)->acc)
#define New_Acc(x)  ((x)->new_acc)
#define Phi(x)  ((x)->phi)
#define Next(x) ((x)->next)
#define Proc_Next(x) ((x)->proc_next)

bodyptr ubody_alloc(int p)
{
  register bodyptr tmp;
  tmp = (bodyptr)malloc(sizeof(body));

  Type(tmp) = BODY;
  Proc(tmp) = p;
  Proc_Next(tmp) = NULL;
  New_Proc(tmp) = p;
  return tmp;
}

int main(int argc, char** argv) {
  bodyptr b = ubody_alloc(17);
  return 0;
}

Test to ensure that data layout is generated correctly for host platform.
This is for PR1242.

git-svn-id: 0ff597fd157e6f4fc38580e8d64ab130330d2411@34944 91177308-0d34-0410-b5e6-96231b3b80d8


// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
#define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
#pragma once

#include <string>
#include <vector>

#include "chrome/browser/chromeos/login/user_manager.h"
#include "testing/gmock/include/gmock/gmock.h"

namespace chromeos {

class MockUserManager : public UserManager {
 public:
  MockUserManager() {}
  virtual ~MockUserManager() {}

  MOCK_CONST_METHOD0(GetUsers, std::vector<User>());
  MOCK_METHOD0(OffTheRecordUserLoggedIn, void());
  MOCK_METHOD1(UserLoggedIn, void(const std::string&));
  MOCK_METHOD1(RemoveUser, void(const std::string&));
  MOCK_METHOD1(IsKnownUser, bool(const std::string&));
  MOCK_CONST_METHOD0(logged_in_user, const User&());
  MOCK_METHOD0(current_user_is_owner, bool());
  MOCK_METHOD1(set_current_user_is_owner, void(bool));
};

}  // namespace chromeos

#endif  // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_

// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
#define CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_
#pragma once

#include <string>
#include <vector>

#include "chrome/browser/chromeos/login/user_manager.h"
#include "testing/gmock/include/gmock/gmock.h"

namespace chromeos {

class MockUserManager : public UserManager {
 public:
  MockUserManager() {}
  virtual ~MockUserManager() {}

  MOCK_CONST_METHOD0(GetUsers, std::vector<User>());
  MOCK_METHOD0(OffTheRecordUserLoggedIn, void());
  MOCK_METHOD1(UserLoggedIn, void(const std::string&));
  MOCK_METHOD2(RemoveUser, void(const std::string&, RemoveUserDelegate*));
  MOCK_METHOD1(IsKnownUser, bool(const std::string&));
  MOCK_CONST_METHOD0(logged_in_user, const User&());
  MOCK_CONST_METHOD0(current_user_is_owner, bool());
  MOCK_METHOD1(set_current_user_is_owner, void(bool));
};

}  // namespace chromeos

#endif  // CHROME_BROWSER_CHROMEOS_LOGIN_MOCK_USER_MANAGER_H_

Fix clang warning in tests for Chrome OS

BUG=none
TEST=build with clang and gcc

Review URL: http://codereview.chromium.org/7002028

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@84970 0039d316-1c4b-4281-b951-d872f2087c98


// RUN: clang -fsyntax-only %s

%:include <stdio.h>

    %:ifndef BUFSIZE
     %:define BUFSIZE  512
    %:endif

    void copy(char d<::>, const char s<::>, int len)
    <%
        while (len-- >= 0)
        <%
            d<:len:> = s<:len:>;
        %>
    %>

// RUN: clang -fsyntax-only -verify < %s

%:include <stdio.h>

    %:ifndef BUFSIZE
     %:define BUFSIZE  512
    %:endif

    void copy(char d<::>, const char s<::>, int len)
    <%
        while (len-- >= 0)
        <%
            d<:len:> = s<:len:>;
        %>
    %>

Fix the run line for this test.

Fix the run line for this test.

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


#include <stdio.h>
#include <stdint.h>
#include <string.h>

#include "nrf51.h"
#include "nrf_delay.h"

#include "error.h"
#include "gpio.h"
#include "led.h"
#include "radio.h"

void error_handler(uint32_t err_code, uint32_t line_num, char * file_name)
{
    while (1)
    {
        for (uint8_t i = LED_START; i < LED_STOP; i++)
        {
            gpio_pin_toggle(i);
            nrf_delay_us(50000);
        }
    }
}
void radio_evt_handler(radio_evt_t * evt)
{

}

int main(void)
{
    uint8_t i = 0;

    radio_packet_t packet;
    packet.len = 4;
    packet.flags.ack = 0;

    radio_init(radio_evt_handler);

    gpio_pins_cfg_out(LED_START, LED_STOP);

    while (1)
    {
        packet.data[0] = i++;
        packet.data[1] = 0x12;
        radio_send(&packet);

        gpio_pin_toggle(LED0);
        nrf_delay_us(1000000);
    }
}

#include <stdio.h>
#include <stdint.h>
#include <string.h>

#include "nrf51.h"
#include "nrf_delay.h"

#include "error.h"
#include "gpio.h"
#include "led.h"
#include "radio.h"

void error_handler(uint32_t err_code, uint32_t line_num, char * file_name)
{
    while (1)
    {
        for (uint8_t i = LED_START; i < LED_STOP; i++)
        {
            gpio_pin_toggle(i);
            nrf_delay_us(50000);
        }
    }
}
void radio_evt_handler(radio_evt_t * evt)
{

}

int main(void)
{
    uint8_t i = 0;
    uint32_t err_code;

    radio_packet_t packet;
    packet.len = 4;
    packet.flags.ack = 0;

    radio_init(radio_evt_handler);

    gpio_pins_cfg_out(LED_START, LED_STOP);

    while (1)
    {
        packet.data[0] = i++;
        packet.data[1] = 0x12;
        err_code = radio_send(&packet);
        ASSUME_SUCCESS(err_code);

        packet.data[0] = i++;
        packet.data[1] = 0x12;
        err_code = radio_send(&packet);
        ASSUME_SUCCESS(err_code);

        gpio_pin_toggle(LED0);
        nrf_delay_us(1000000);
    }
}

Check error codes when sending.

Check error codes when sending.


#pragma once

#include <string>
#include <vector>

struct usdt_probe_entry
{
  std::string path;
  std::string provider;
  std::string name;
  int num_locations;
};

typedef std::vector<usdt_probe_entry> usdt_probe_list;

class USDTHelper
{
public:
  static usdt_probe_entry find(int pid,
                               const std::string &target,
                               const std::string &provider,
                               const std::string &name);
  static usdt_probe_list probes_for_provider(const std::string &provider);
  static usdt_probe_list probes_for_pid(int pid);
  static usdt_probe_list probes_for_path(const std::string &path);
  static void read_probes_for_pid(int pid);
  static void read_probes_for_path(const std::string &path);
};

#pragma once

#include <string>
#include <vector>

struct usdt_probe_entry
{
  std::string path;
  std::string provider;
  std::string name;
  int num_locations;
};

typedef std::vector<usdt_probe_entry> usdt_probe_list;

// Note this class is fully static because bcc_usdt_foreach takes a function
// pointer callback without a context variable. So we must keep global state.
class USDTHelper
{
public:
  static usdt_probe_entry find(int pid,
                               const std::string &target,
                               const std::string &provider,
                               const std::string &name);
  static usdt_probe_list probes_for_provider(const std::string &provider);
  static usdt_probe_list probes_for_pid(int pid);
  static usdt_probe_list probes_for_path(const std::string &path);
  static void read_probes_for_pid(int pid);
  static void read_probes_for_path(const std::string &path);
};

NFC: Add comment for why USDTHelper is static


#import <UIKit/UIKit.h>

#import "HUBComponentImageData.h"

NS_ASSUME_NONNULL_BEGIN

/**
 *  Protocol defining the public API for a builder that builds image data objects
 *
 *  This builder acts like a mutable model counterpart for `HUBComponentImageData`, with the key
 *  difference that they are not related by inheritance.
 *
 *  All properties are briefly documented as part of this protocol, but for more extensive
 *  documentation and use case examples, see the full documentation in the `HUBComponentImageData`
 *  protocol definition.
 *
 *  In order to successfully build an image data object (and not return nil), the builder must
 *  have either have a non-nil `URL` or `iconIdentifier` property.
 */
@protocol HUBComponentImageDataBuilder <NSObject>

/// The style that the image should be rendered in
@property (nonatomic) HUBComponentImageStyle style;

/// Any HTTP URL of a remote image that should be downloaded and then rendered
@property (nonatomic, copy, nullable) NSURL *URL;

/// Any local image that should be used, either as a placeholder or a permanent image
@property (nonatomic, copy, nullable) UIImage *localImage;

/// Any identifier of an icon that should be used with the image, either as a placeholder or permanent image
@property (nonatomic, copy, nullable) NSString *iconIdentifier;

@end

NS_ASSUME_NONNULL_END

#import <UIKit/UIKit.h>

#import "HUBComponentImageData.h"

NS_ASSUME_NONNULL_BEGIN

/**
 *  Protocol defining the public API for a builder that builds image data objects
 *
 *  This builder acts like a mutable model counterpart for `HUBComponentImageData`, with the key
 *  difference that they are not related by inheritance.
 *
 *  All properties are briefly documented as part of this protocol, but for more extensive
 *  documentation and use case examples, see the full documentation in the `HUBComponentImageData`
 *  protocol definition.
 *
 *  In order to successfully build an image data object (and not return nil), the builder must
 *  have either have a non-nil `URL` or `iconIdentifier` property.
 */
@protocol HUBComponentImageDataBuilder <NSObject>

/// The style that the image should be rendered in
@property (nonatomic) HUBComponentImageStyle style;

/// Any HTTP URL of a remote image that should be downloaded and then rendered
@property (nonatomic, copy, nullable) NSURL *URL;

/// Any local image that should be used, either as a placeholder or a permanent image
@property (nonatomic, strong, nullable) UIImage *localImage;

/// Any identifier of an icon that should be used with the image, either as a placeholder or permanent image
@property (nonatomic, copy, nullable) NSString *iconIdentifier;

@end

NS_ASSUME_NONNULL_END

Use strong storage for component local image


//===- PCHDeserializationListener.h - Decl/Type PCH Read Events -*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
//  This file defines the PCHDeserializationListener class, which is notified
//  by the PCHReader whenever a type or declaration is deserialized.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_FRONTEND_PCH_DESERIALIZATION_LISTENER_H
#define LLVM_CLANG_FRONTEND_PCH_DESERIALIZATION_LISTENER_H

#include "clang/Frontend/PCHBitCodes.h"

namespace clang {

class Decl;
class QualType;

class PCHDeserializationListener {
protected:
  ~PCHDeserializationListener() {}

public:
  /// \brief A type was deserialized from the PCH. The ID here has the qualifier
  ///        bits already removed, and T is guaranteed to be locally unqualified
  virtual void TypeRead(pch::TypeID ID, QualType T) = 0;
  /// \brief A decl was deserialized from the PCH.
  virtual void DeclRead(pch::DeclID ID, const Decl *D) = 0;
};

}

#endif

//===- PCHDeserializationListener.h - Decl/Type PCH Read Events -*- C++ -*-===//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
//  This file defines the PCHDeserializationListener class, which is notified
//  by the PCHReader whenever a type or declaration is deserialized.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_FRONTEND_PCH_DESERIALIZATION_LISTENER_H
#define LLVM_CLANG_FRONTEND_PCH_DESERIALIZATION_LISTENER_H

#include "clang/Frontend/PCHBitCodes.h"

namespace clang {

class Decl;
class QualType;

class PCHDeserializationListener {
protected:
  virtual ~PCHDeserializationListener() {}

public:
  /// \brief A type was deserialized from the PCH. The ID here has the qualifier
  ///        bits already removed, and T is guaranteed to be locally unqualified
  virtual void TypeRead(pch::TypeID ID, QualType T) = 0;
  /// \brief A decl was deserialized from the PCH.
  virtual void DeclRead(pch::DeclID ID, const Decl *D) = 0;
};

}

#endif

Make this destructor virtual to placate GCC's warnings.

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


/* Monitor-IDE integration test

   This example code is in the Public Domain (or CC0 licensed, at your option.)

   Unless required by applicable law or agreed to in writing, this
   software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   CONDITIONS OF ANY KIND, either express or implied.
*/
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"

void app_main(void)
{
    int *p = (int *)4;
    vTaskDelay(1000 / portTICK_PERIOD_MS);
    *p = 0;
}

/* Monitor-IDE integration test

   This example code is in the Public Domain (or CC0 licensed, at your option.)

   Unless required by applicable law or agreed to in writing, this
   software is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
   CONDITIONS OF ANY KIND, either express or implied.
*/
#include "freertos/FreeRTOS.h"
#include "freertos/task.h"
#include "esp_system.h"

void app_main(void)
{
    int *p = (int *)4;
    vTaskDelay(2000 / portTICK_PERIOD_MS);
    *p = 0;
}

Tools: Increase the delay before producing exception in the Monitor IDE test app


/*
 * Copyright 2008 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.
 */

#ifndef SERVICE_RUNTIME_NACL_SYSCALL_H__
#define SERVICE_RUNTIME_NACL_SYSCALL_H__

#if !NACL_MACOSX || defined(NACL_STANDALONE)
extern int NaClSyscallSeg();
#else
// This declaration is used only on Mac OSX for Chrome build
extern int NaClSyscallSeg() __attribute__((weak_import));
#endif
#endif

/*
 * Copyright 2008 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.
 */

#ifndef SERVICE_RUNTIME_NACL_SYSCALL_H__
#define SERVICE_RUNTIME_NACL_SYSCALL_H__

extern int NaClSyscallSeg();

#endif

Remove unused special case for Mac OS X

Tidy: Remove unused special case for Mac OS X

The special case was dead code anyway because it tested the wrong preprocessor symbol (NACL_MACOSX instead of NACL_OSX).

Review URL: http://codereview.chromium.org/1051001

git-svn-id: 721b910a23eff8a86f00c8fd261a7587cddf18f8@1792 fcba33aa-ac0c-11dd-b9e7-8d5594d729c2


#include "qtwebkitversion.h"
#include "SocketCommand.h"

class Version : public SocketCommand {
  Q_OBJECT

  public:
    Version(WebPageManager *, QStringList &arguments, QObject *parent = 0);
    virtual void start();
};

Include qtwebkitversion.h to work in newer qtwebkit

This likely got pulled in automatically in a previous qtwebkit version, but now needs to be explicitly included.


//
//  AVIMRecalledMessage.h
//  AVOS
//
//  Created by Tang Tianyong on 26/06/2017.
//  Copyright © 2017 LeanCloud Inc. All rights reserved.
//

#import "AVIMTypedMessage.h"

NS_ASSUME_NONNULL_BEGIN

@interface AVIMRecalledMessage : AVIMTypedMessage <AVIMTypedMessageSubclassing>

@end

NS_ASSUME_NONNULL_END

//
//  AVIMRecalledMessage.h
//  AVOS
//
//  Created by Tang Tianyong on 26/06/2017.
//  Copyright © 2017 LeanCloud Inc. All rights reserved.
//

#import "AVIMTypedMessage.h"

NS_ASSUME_NONNULL_BEGIN

/**
 This class is a type of messages that have been recalled by its sender.
 */
@interface AVIMRecalledMessage : AVIMTypedMessage <AVIMTypedMessageSubclassing>

@end

NS_ASSUME_NONNULL_END

Add comment for recalled message

Add comment for recalled message


// SKIP PARAM: --sets ana.activated[+] octApron
#include <assert.h>

int f(int x) {
  return x + 1;
}

int g(int x) {
  int y;
  y = f(x);
  assert(y == x + 1);
  return x;
}

int main(void) {
  int z, w;
  w = g(z);
  assert(z == w);
  return 0;
}

Add test for octApron combine where arg vars conflict


//--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// author:  Axel Naumann <axel@cern.ch>
//------------------------------------------------------------------------------

#ifndef CLING_COMPILATIONEXCEPTION_H
#define CLING_COMPILATIONEXCEPTION_H

#include <stdexcept>
#include <string>
#include "cling/Interpreter/RuntimeException.h"

namespace cling {
  class Interpreter;
  class MetaProcessor;

  //\brief Exception pull us out of JIT (llvm + clang) errors.
  class CompilationException:
    public virtual runtime::InterpreterException,
    public virtual std::runtime_error {
  public:
    CompilationException(const std::string& reason):
      std::runtime_error(reason) {}
    ~CompilationException() throw(); // vtable pinned to UserInterface.cpp
    virtual const char* what() const throw() {
      return std::runtime_error::what(); }
  };
}

#endif // CLING_COMPILATIONEXCEPTION_H

//--------------------------------------------------------------------*- C++ -*-
// CLING - the C++ LLVM-based InterpreterG :)
// author:  Axel Naumann <axel@cern.ch>
//------------------------------------------------------------------------------

#ifndef CLING_COMPILATIONEXCEPTION_H
#define CLING_COMPILATIONEXCEPTION_H

#include <stdexcept>
#include <string>
#include "cling/Interpreter/RuntimeException.h"

namespace cling {
  class Interpreter;
  class MetaProcessor;

  ///\brief Exception that pulls cling out of runtime-compilation (llvm + clang)
  ///       errors.
  ///
  /// If user code provokes an llvm::unreachable it will cause this exception
  /// to be thrown. Given that this is at the process's runtime and an
  /// interpreter error it inherits from InterpreterException and runtime_error.
  /// Note that this exception is *not* thrown during the execution of the
  /// user's code but during its compilation (at runtime).
  class CompilationException:
    public virtual runtime::InterpreterException,
    public virtual std::runtime_error {
  public:
    CompilationException(const std::string& reason):
      std::runtime_error(reason) {}
    ~CompilationException() throw(); // vtable pinned to UserInterface.cpp
    virtual const char* what() const throw() {
      return std::runtime_error::what(); }
  };
}

#endif // CLING_COMPILATIONEXCEPTION_H

Add more rationale as to how this exception is different from others.


#include "mpi.h"
#include <stdio.h>
#include <math.h>

int main(int argc, char **argv) {
    // Variables used per process
    int myid, numprocs;
    int myresult = 0;

    // Global variables
    int DATA_SIZE = argc;
    int data[DATA_SIZE], result;

    // Chunk control variables
    int i, low, high, size;

    //-------------------------------------------
    // INIT
    MPI_Init(&argc, &argv);
    MPI_Comm_size(MPI_COMM_WORLD, &numprocs);
    MPI_Comm_rank(MPI_COMM_WORLD, &myid);

    //-------------------------------------------
    // PROCESS 0 GETS THE DATA
    if (myid == 0) {
        // Get data from args
        for (i = 0; i < argc; ++i) {
          data[i] = argv[i];
        }
    }

    // Distribute the Data
    MPI_Bcast(data, MAXSIZE, MPI_INT, 0, MPI_COMM_WORLD);

    //-------------------------------------------
    // EACH PROCESS COMPUTES ITS PART
    size = DATA_SIZE/numprocs;
    low = myid * size;
    high = low + size;
    for (i = low; i < high; ++i) {
        myresult += data[i];
    }
    //printf("I got %d from %d\n", myresult, myid);

    //-------------------------------------------
    // COMPUTE GLOBAL SUM
    MPI_Reduce(&myresult, &result, 1, MPI_INT, MPI_SUM, 0, MPI_COMM_WORLD);

    //-------------------------------------------
    // PROCESS 0 PRINTS THE RESULT
    if (myid == 0) {
        printf("%d\n", result);
    }

    //-------------------------------------------
    // FINISH
    MPI_Finalize();
}

Add mpiCC source for MPI test

Add mpiCC source for MPI test

git-svn-id: 6cb0c57df7a4a7d32342646683f5f1b5f4d88845@2381 9ab3861e-6c05-4e1b-b5ef-99af60850597


//
//  SVProgressHUDAppDelegate.h
//  SVProgressHUD
//
//  Created by Sam Vermette on 27.03.11.
//  Copyright 2011 Sam Vermette. All rights reserved.
//

#import <UIKit/UIKit.h>

@class ViewController;

@interface AppDelegate : NSObject <UIApplicationDelegate> {
    UIWindow *__weak window;
    ViewController *__weak viewController;
}

@property (weak, nonatomic) IBOutlet UIWindow *window;
@property (weak, nonatomic) IBOutlet ViewController *viewController;

@end

//
//  SVProgressHUDAppDelegate.h
//  SVProgressHUD
//
//  Created by Sam Vermette on 27.03.11.
//  Copyright 2011 Sam Vermette. All rights reserved.
//

#import <UIKit/UIKit.h>

@class ViewController;

@interface AppDelegate : NSObject <UIApplicationDelegate>

@property (strong, nonatomic) IBOutlet UIWindow *window;
@property (strong, nonatomic) IBOutlet ViewController *viewController;

@end

Fix ARC warning in demo project.

Fix ARC warning in demo project.


#pragma once
#ifndef YOU_DATASTORE_INTERNAL_OPERATIONS_SERIALIZATION_OPERATION_H_
#define YOU_DATASTORE_INTERNAL_OPERATIONS_SERIALIZATION_OPERATION_H_

#include "../operation.h"

namespace You {
namespace DataStore {
namespace Internal {

class SerializationOperation : public IOperation {
public:
	/// Serialize task to an xml node
	static void serialize(const SerializedTask&, pugi::xml_node&);

	/// Deserialize task from an xml node
	static SerializedTask deserialize(const pugi::xml_node&);

private:
	/// The new task contents.
	SerializedTask task;
};

}  // namespace Internal
}  // namespace DataStore
}  // namespace You

#endif  // YOU_DATASTORE_INTERNAL_OPERATIONS_SERIALIZATION_OPERATION_H_

#pragma once
#ifndef YOU_DATASTORE_INTERNAL_OPERATIONS_SERIALIZATION_OPERATION_H_
#define YOU_DATASTORE_INTERNAL_OPERATIONS_SERIALIZATION_OPERATION_H_

#include "../operation.h"

namespace You {
namespace DataStore {
namespace Internal {

class SerializationOperation : public IOperation {
public:
	/// Serialize task to an xml node
	static void serialize(const SerializedTask&, pugi::xml_node&);

	/// Deserialize task from an xml node
	static SerializedTask deserialize(const pugi::xml_node&);
};

}  // namespace Internal
}  // namespace DataStore
}  // namespace You

#endif  // YOU_DATASTORE_INTERNAL_OPERATIONS_SERIALIZATION_OPERATION_H_

Remove unnecessary member variable in SerializationOperation


/* contrib/cube/cubedata.h */

#include "fmgr.h"

#define CUBE_MAX_DIM (100)

typedef struct NDBOX
{
	int32		vl_len_;		/* varlena header (do not touch directly!) */
	unsigned int dim;
	double		x[1];
} NDBOX;

#define DatumGetNDBOX(x)	((NDBOX*)DatumGetPointer(x))
#define PG_GETARG_NDBOX(x)	DatumGetNDBOX( PG_DETOAST_DATUM(PG_GETARG_DATUM(x)) )
#define PG_RETURN_NDBOX(x)	PG_RETURN_POINTER(x)

/* contrib/cube/cubedata.h */

#define CUBE_MAX_DIM (100)

typedef struct NDBOX
{
	int32		vl_len_;		/* varlena header (do not touch directly!) */
	unsigned int dim;
	double		x[1];
} NDBOX;

#define DatumGetNDBOX(x)	((NDBOX*)DatumGetPointer(x))
#define PG_GETARG_NDBOX(x)	DatumGetNDBOX( PG_DETOAST_DATUM(PG_GETARG_DATUM(x)) )
#define PG_RETURN_NDBOX(x)	PG_RETURN_POINTER(x)

Remove "fmgr.h" include in cube contrib --- caused crash on a Gentoo builfarm member.


/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

// Simple benchmarking facility.
#ifndef TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_
#define TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_

#include "tensorflow/core/platform/platform.h"

#if defined(PLATFORM_GOOGLE)
#include "tensorflow/core/platform/google/test_benchmark.h"
#else
#include "tensorflow/core/platform/default/test_benchmark.h"
#endif  // PLATFORM_GOOGLE

#endif  // TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_

/* Copyright 2015 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/

// Simple benchmarking facility.
#ifndef TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_
#define TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_

#include "tensorflow/core/platform/platform.h"

#if defined(PLATFORM_GOOGLE)
#include "tensorflow/core/platform/google/test_benchmark.h"  // IWYU pragma: export
#else
#include "tensorflow/core/platform/default/test_benchmark.h"  // IWYU pragma: export
#endif  // PLATFORM_GOOGLE

#endif  // TENSORFLOW_CORE_PLATFORM_TEST_BENCHMARK_H_

Add IWYU tags to headers TF is re-exporting.

PiperOrigin-RevId: 291557790
Change-Id: Ic0268063ea1048bf6f22ba6aee1b9854d6420f30


#ifndef __TINYARG_H__
#define __TINYARG_H__

struct  tiny_args_t;

bool tiny_args_parse(struct tiny_args_t* args, int argc, const char* argv[]);

void tiny_args_add_bool(struct tiny_args_t** args,
												char short_opt,
												const char* long_opt,
												bool* flag,
												const char* desc);

void tiny_args_add_str(struct tiny_args_t** args,
											 char short_opt,
											 const char* long_opt,
										 	 char* str,
											 size_t str_len,
											 const char* desc);

void tiny_args_usage(const char* process_name, struct tiny_args_t* args);

void tiny_args_destroy(struct tiny_args_t* args);

#endif /* __TINYARG_H__ */

#ifndef __TINYARG_H__
#define __TINYARG_H__

#ifdef __cplusplus
extern "C"
{
#endif

struct  tiny_args_t;

bool tiny_args_parse(struct tiny_args_t* args, int argc, const char* argv[]);

void tiny_args_add_bool(struct tiny_args_t** args,
                        char short_opt,
                        const char* long_opt,
                        bool* flag,
                        const char* desc);

void tiny_args_add_str(struct tiny_args_t** args,
                       char short_opt,
                       const char* long_opt,
                       char* str,
                       size_t str_len,
                       const char* desc);

void tiny_args_usage(const char* process_name, struct tiny_args_t* args);

void tiny_args_destroy(struct tiny_args_t* args);

#ifdef __cplusplus
}
#endif

#endif /* __TINYARG_H__ */

Add externs for use in C++ code

Add externs for use in C++ code


/**
 * File:   bool.h
 * Author: Cindy Norris
 */

#define TRUE 1
#define FALSE 0

typedef int bool;

/*
 * File:   bool.h
 * Author: Cindy Norris
 */

#define TRUE 1
#define FALSE 0

typedef int bool;

Change file header to C style

Change file header to C style


/*
 * This file includes all the .c files needed for a complete multiarray module.
 * This is used in the case where separate compilation is not enabled
 *
 * Note that the order of the includs matters
 */

#include "common.c"

#include "scalartypes.c"
#include "scalarapi.c"

#include "datetime.c"
#include "arraytypes.c"

#include "hashdescr.c"
#include "numpyos.c"

#include "descriptor.c"
#include "flagsobject.c"
#include "ctors.c"
#include "iterators.c"
#include "mapping.c"
#include "number.c"
#include "getset.c"
#include "sequence.c"
#include "methods.c"
#include "convert_datatype.c"
#include "convert.c"
#include "shape.c"
#include "item_selection.c"
#include "calculation.c"
#include "usertypes.c"
#include "refcount.c"
#include "conversion_utils.c"
#include "buffer.c"

#include "new_iterator.c"
#include "new_iterator_pywrap.c"
#include "lowlevel_strided_loops.c"
#include "dtype_transfer.c"

#ifndef Py_UNICODE_WIDE
#include "ucsnarrow.c"
#endif

#include "arrayobject.c"

#include "numpymemoryview.c"

#include "multiarraymodule.c"

/*
 * This file includes all the .c files needed for a complete multiarray module.
 * This is used in the case where separate compilation is not enabled
 *
 * Note that the order of the includs matters
 */

#include "common.c"

#include "scalartypes.c"
#include "scalarapi.c"

#include "datetime.c"
#include "arraytypes.c"

#include "hashdescr.c"
#include "numpyos.c"

#include "descriptor.c"
#include "flagsobject.c"
#include "ctors.c"
#include "iterators.c"
#include "mapping.c"
#include "number.c"
#include "getset.c"
#include "sequence.c"
#include "methods.c"
#include "convert_datatype.c"
#include "convert.c"
#include "shape.c"
#include "item_selection.c"
#include "calculation.c"
#include "usertypes.c"
#include "refcount.c"
#include "conversion_utils.c"
#include "buffer.c"

#include "new_iterator.c"
#include "new_iterator_pywrap.c"
#include "lowlevel_strided_loops.c"
#include "dtype_transfer.c"
#include "einsum.c"

#ifndef Py_UNICODE_WIDE
#include "ucsnarrow.c"
#endif

#include "arrayobject.c"

#include "numpymemoryview.c"

#include "multiarraymodule.c"

Add einsum to the one file build

BLD: Add einsum to the one file build


#include <stdio.h>

void test1(int) __attribute__ ((always_inline));
void test2(int) __attribute__ ((always_inline));

void test2(int b) {
    printf("test2(%d)\n", b); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"])
}

void test1(int a) {
    printf("test1(%d)\n",  a);
    test2(a+1);//% self.dbg.HandleCommand("step")
               //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["24"])
}

int main() {
    test2(42);
    test1(23);
}

#include <stdio.h>

inline void test1(int) __attribute__ ((always_inline));
inline void test2(int) __attribute__ ((always_inline));

void test2(int b) {
    printf("test2(%d)\n", b); //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["42"])
}

void test1(int a) {
    printf("test1(%d)\n",  a);
    test2(a+1);//% self.dbg.HandleCommand("step")
               //% self.expect("expression b", DATA_TYPES_DISPLAYED_CORRECTLY, substrs = ["24"])
}

int main() {
    test2(42);
    test1(23);
}

Make sure TestRedefinitionsInInlines.py actually inlines.

Reviewers: spyffe

Subscribers: lldb-commits

Differential Revision: http://reviews.llvm.org/D20540

git-svn-id: 4c4cc70b1ef44ba2b7963015e681894188cea27e@270493 91177308-0d34-0410-b5e6-96231b3b80d8


// Copyright 2018-2019 Espressif Systems (Shanghai) PTE LTD
//
// 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 _ESP_WIFI_INTERNAL_H
#define _ESP_WIFI_INTERNAL_H

#ifdef __cplusplus
extern "C" {
#endif

typedef enum {
    WIFI_RX_PBUF_IRAM,   /** save rx buffer to iram and upload to tcpip*/
    WIFI_RX_PBUF_DRAM,   /** save rx buffer to dram and upload to tcpip */
} wifi_rx_pbuf_mem_type_t;

/**
  * @brief     Set WIFI received TCP/IP data cache ram type
  *
  * @param     type if use dram
  */
void esp_wifi_set_rx_pbuf_mem_type(wifi_rx_pbuf_mem_type_t type);

/**
  * @brief     get WIFI received TCP/IP data cache ram type
  *
  * @return    true if use dram or false
  */
wifi_rx_pbuf_mem_type_t esp_wifi_get_rx_pbuf_mem_type(void);

#ifdef __cplusplus
}
#endif

#endif /* _ESP_WIFI_INTERNAL_H */

feat(esp8266): Add feature to set/get WIFI rx data ram type

Use iram to upload pbuf.


//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);
    assert(x < 1); // UNKNOWN!
    assert(x < 0); // FAIL

    assert(x <= 2);
    assert(x <= 1);
    assert(x <= 0); // UNKNOWN!
    assert(x <= -1); //FAIL

    assert(x > -1);
    assert(x > 0); //UNKNOWN!
    assert(x > 1); //FAIL

    assert(x >= -1);
    assert(x >= 0);
    assert(x >= 1); //UNKNOWN!
    assert(x >= 2); //FAIL
    return 0;
}

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

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

    if(top2){
        y = 1;
    } else{
        y = 0;
    }

    assert(x < 2);
    assert(x < 1); // UNKNOWN!
    assert(x < 0); // FAIL

    assert(x <= 2);
    assert(x <= 1);
    assert(x <= 0); // UNKNOWN!
    assert(x <= -1); //FAIL

    assert(x > -1);
    assert(x > 0); //UNKNOWN!
    assert(x > 1); //FAIL

    assert(x >= -1);
    assert(x >= 0);
    assert(x >= 1); //UNKNOWN!
    assert(x >= 2); //FAIL

    assert(x == y); // UNKNOWN
    assert(x == 1); // UNKNOWN
    assert(x == 2); // FAIL

    assert(x != y); // UNKNOWN
    assert(x != 1); // UNKNOWN
    assert(x != 2);

    int z = rand();
    y = 3;
    if(z==3){
        assert(y==z);
        assert(y!=z); //FAIL
    } else {
        assert(y==z); //FAIL
        assert(y!=z);
    }

    return 0;
}

Add more asserts for eq and ne in Enums

Add more asserts for eq and ne in Enums


/*===================================================================

 The Medical Imaging Interaction Toolkit (MITK)

 Copyright (c) German Cancer Research Center,
 Division of Medical and Biological Informatics.
 All rights reserved.

 This software is distributed WITHOUT ANY WARRANTY; without
 even the implied warranty of MERCHANTABILITY or FITNESS FOR
 A PARTICULAR PURPOSE.

 See LICENSE.txt or http://www.mitk.org for details.

 ===================================================================*/

#ifndef __QVTKFramebufferObjectRenderer_h
#define __QVTKFramebufferObjectRenderer_h

#include <QQuickFramebufferObject>

#include "QVTKQuickItem.h"

#include <MitkOpenViewCoreExports.h>

class vtkInternalOpenGLRenderWindow;

//! Part of Qml rendering prototype, see QmlMitkRenderWindowItem.
class MITKOPENVIEWCORE_EXPORT QVTKFramebufferObjectRenderer : public QQuickFramebufferObject::Renderer
{
public:
  bool m_neverRendered;
  bool m_readyToRender;
  vtkInternalOpenGLRenderWindow *m_vtkRenderWindow;

  QVTKQuickItem *m_vtkQuickItem;

public:
  QVTKFramebufferObjectRenderer(vtkInternalOpenGLRenderWindow *rw);
  ~QVTKFramebufferObjectRenderer();

  virtual void synchronize(QQuickFramebufferObject * item);
  virtual void render();

  QOpenGLFramebufferObject *createFramebufferObject(const QSize &size);

  friend class vtkInternalOpenGLRenderWindow;
};

#endif

/*===================================================================

 The Medical Imaging Interaction Toolkit (MITK)

 Copyright (c) German Cancer Research Center,
 Division of Medical and Biological Informatics.
 All rights reserved.

 This software is distributed WITHOUT ANY WARRANTY; without
 even the implied warranty of MERCHANTABILITY or FITNESS FOR
 A PARTICULAR PURPOSE.

 See LICENSE.txt or http://www.mitk.org for details.

 ===================================================================*/

#ifndef __QVTKFramebufferObjectRenderer_h
#define __QVTKFramebufferObjectRenderer_h

#include <QQuickFramebufferObject>

#include "QVTKQuickItem.h"

#include <MitkOpenViewCoreExports.h>

class vtkInternalOpenGLRenderWindow;

//! Part of Qml rendering prototype, see QmlMitkRenderWindowItem.
class MITKOPENVIEWCORE_EXPORT QVTKFramebufferObjectRenderer : public QQuickFramebufferObject::Renderer
{
public:
  vtkInternalOpenGLRenderWindow *m_vtkRenderWindow;
  bool m_neverRendered;
  bool m_readyToRender;

  QVTKQuickItem *m_vtkQuickItem;

public:
  QVTKFramebufferObjectRenderer(vtkInternalOpenGLRenderWindow *rw);
  ~QVTKFramebufferObjectRenderer();

  virtual void synchronize(QQuickFramebufferObject * item);
  virtual void render();

  QOpenGLFramebufferObject *createFramebufferObject(const QSize &size);

  friend class vtkInternalOpenGLRenderWindow;
};

#endif

Fix warnings in OpenViewCore module

Fix warnings in OpenViewCore module


#pragma once

#include "PG/app/StyleSheet.h"
#include "PG/core/Size.h"

#include <string>

namespace PG {

//--------------------------------------------------------
struct AppConfiguration
{
	std::string	windowTitle;
	Size		windowSize;

	int			tileSize = 32;

	std::string	resourcesFilename;
	StyleSheet	styleSheet;
};

}

#pragma once

#include "PG/app/StyleSheet.h"
#include "PG/core/Size.h"

#include <string>

namespace PG {

//--------------------------------------------------------
struct AppConfiguration
{
	std::string	windowTitle;
	Size		windowSize;

	int			tileSize = 32;

	StyleSheet	styleSheet;
};

}

Remove resourcesFilename as it's not required


/*
 * Copyright (c) 2012-2016 Israel Jacquez
 * See LICENSE for details.
 *
 * Israel Jacquez <mrkotfw@gmail.com>
 */

#ifndef _CPU_H_
#define _CPU_H_

#include <cpu/cache.h>
#include <cpu/divu.h>
#include <cpu/dmac.h>
#include <cpu/dual.h>
#include <cpu/endian.h>
#include <cpu/frt.h>
#include <cpu/instructions.h>
#include <cpu/intc.h>
#include <cpu/registers.h>
#include <cpu/sync.h>
#include <cpu/wdt.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

extern void cpu_init(void);
extern void _slave_polling_entry(void);
extern void _slave_ici_entry(void);
extern void _exception_illegal_instruction(void);
extern void _exception_illegal_slot(void);
extern void _exception_cpu_address_error(void);
extern void _exception_dma_address_error(void);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* !_CPU_H_ */

/*
 * Copyright (c) 2012-2016 Israel Jacquez
 * See LICENSE for details.
 *
 * Israel Jacquez <mrkotfw@gmail.com>
 */

#ifndef _CPU_H_
#define _CPU_H_

#include <cpu/cache.h>
#include <cpu/divu.h>
#include <cpu/dmac.h>
#include <cpu/dual.h>
#include <cpu/endian.h>
#include <cpu/frt.h>
#include <cpu/instructions.h>
#include <cpu/intc.h>
#include <cpu/registers.h>
#include <cpu/sync.h>
#include <cpu/wdt.h>

#ifdef __cplusplus
extern "C" {
#endif /* __cplusplus */

extern void cpu_init(void);

#ifdef __cplusplus
}
#endif /* __cplusplus */

#endif /* !_CPU_H_ */

Remove prototypes for static methods

Remove prototypes for static methods


#define _GNU_SOURCE
#include <sched.h>
#include <sys/syscall.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

static int child_func(void* arg) {
  return 0;
}

int main(int argc, char** argv) {
  // Stack for child.
  const int STACK_SIZE = 65536;

  char* stack = malloc(STACK_SIZE);
  if (!stack) {
    perror("malloc");
    exit(1);
  }

  unsigned long flags = 0;
  if (clone(child_func, stack + STACK_SIZE, flags | SIGCHLD, NULL) == -1) {
    perror("clone");
    exit(1);
  }

  int status;
  pid_t pid = waitpid(-1, &status, 0);
  if (pid == -1) {
    perror("waitpid");
    exit(1);
  }

  printf("    Child PID=%ld\n", (long)pid);

  return 0;
}

#define _GNU_SOURCE
#include <sched.h>
#include <sys/syscall.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

static int child_func(void* arg) {
  char* buf = (char*)arg;
  strcpy(buf, "hello");
  return 0;
}

int main(int argc, char** argv) {
  // Stack for child.
  const int STACK_SIZE = 65536;

  char* stack = malloc(STACK_SIZE);
  if (!stack) {
    perror("malloc");
    exit(1);
  }

  unsigned long flags = 0;
  if (argc > 1 && !strcmp(argv[1], "vm")) {
    flags |= CLONE_VM;
  }

  char buf[100] = {0};
  if (clone(child_func, stack + STACK_SIZE, flags | SIGCHLD, buf) == -1) {
    perror("clone");
    exit(1);
  }

  int status;
  pid_t pid = waitpid(-1, &status, 0);
  if (pid == -1) {
    perror("waitpid");
    exit(1);
  }

  printf("Child exited. buf = \"%s\"\n", buf);
  return 0;
}

Clone with/without VM sample working now


// We have to define the _GNU_SOURCE to get access to clone(2) and the CLONE_*
// flags from sched.h
#define _GNU_SOURCE
#include <sched.h>
#include <sys/syscall.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

static int child_func(void* arg) {
  char* buf = (char*)arg;
  strcpy(buf, "hello");
  return 0;
}

int main(int argc, char** argv) {
  // Allocate stack for child task.
  const int STACK_SIZE = 65536;
  char* stack = malloc(STACK_SIZE);
  if (!stack) {
    perror("malloc");
    exit(1);
  }

  // When called with the command-line argument "vm", set the CLONE_VM flag on.
  unsigned long flags = 0;
  if (argc > 1 && !strcmp(argv[1], "vm")) {
    flags |= CLONE_VM;
  }

  char buf[100] = {0};
  if (clone(child_func, stack + STACK_SIZE, flags | SIGCHLD, buf) == -1) {
    perror("clone");
    exit(1);
  }

  int status;
  if (wait(&status) == -1) {
    perror("wait");
    exit(1);
  }

  printf("Child exited with status %d. buf = \"%s\"\n", status, buf);
  return 0;
}

// We have to define the _GNU_SOURCE to get access to clone(2) and the CLONE_*
// flags from sched.h
#define _GNU_SOURCE
#include <sched.h>
#include <sys/syscall.h>
#include <sys/wait.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>

static int child_func(void* arg) {
  char* buf = (char*)arg;
  printf("Child sees buf = \"%s\"\n", buf);
  strcpy(buf, "hello from child");
  return 0;
}

int main(int argc, char** argv) {
  // Allocate stack for child task.
  const int STACK_SIZE = 65536;
  char* stack = malloc(STACK_SIZE);
  if (!stack) {
    perror("malloc");
    exit(1);
  }

  // When called with the command-line argument "vm", set the CLONE_VM flag on.
  unsigned long flags = 0;
  if (argc > 1 && !strcmp(argv[1], "vm")) {
    flags |= CLONE_VM;
  }

  char buf[100];
  strcpy(buf, "hello from parent");
  if (clone(child_func, stack + STACK_SIZE, flags | SIGCHLD, buf) == -1) {
    perror("clone");
    exit(1);
  }

  int status;
  if (wait(&status) == -1) {
    perror("wait");
    exit(1);
  }

  printf("Child exited with status %d. buf = \"%s\"\n", status, buf);
  return 0;
}

Change the sample to pass message from parent as well


/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_INTEGER_OPS_LUT_H_
#define TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_INTEGER_OPS_LUT_H_

#include "tensorflow/lite/kernels/internal/common.h"

namespace tflite {
namespace reference_integer_ops {

template <typename InputT, typename OutputT>
inline void LookupTable(const InputT* input_data, int num_elements,
                        const OutputT* lut, OutputT* output_data) {
  for (int i = 0; i < num_elements; i++) {
    output_data[i] = LUTLookup(input_data[i], lut);
  }
}

}  // namespace reference_integer_ops
}  // namespace tflite

#endif  // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_INTEGER_OPS_LUT_H_

/* Copyright 2022 The TensorFlow Authors. All Rights Reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_INTEGER_OPS_LUT_H_
#define TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_INTEGER_OPS_LUT_H_

#include "tensorflow/lite/kernels/internal/common.h"

namespace tflite {
namespace reference_integer_ops {

template <typename InputT, typename OutputT>
inline void LookupTable(const InputT* input_data, int num_elements,
                        const OutputT* lut, OutputT* output_data) {
  for (int i = 0; i < num_elements; ++i) {
    output_data[i] = LUTLookup(input_data[i], lut);
  }
}

}  // namespace reference_integer_ops
}  // namespace tflite

#endif  // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_INTEGER_OPS_LUT_H_

Use ++i instead of i++

Use ++i instead of i++


/*
 * 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 86
#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 87
#endif

Update Skia milestone to 87

Update Skia milestone to 87

Change-Id: Ic755236e56a0b8064c5539c0a483fffbd4d9f334
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/312156
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>


//===- lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.h ---------------===//
//
//                             The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief Declares the relocation processing pass for x86-64. This includes
///   GOT and PLT entries, TLS, COPY, and ifunc.
///
//===----------------------------------------------------------------------===//

#ifndef LLD_READER_WRITER_ELF_AARCH64_AARCH64_RELOCATION_PASS_H
#define LLD_READER_WRITER_ELF_AARCH64_AARCH64_RELOCATION_PASS_H

#include <memory>

namespace lld {
class Pass;
namespace elf {
class AArch64LinkingContext;

/// \brief Create AArch64 relocation pass for the given linking context.
std::unique_ptr<Pass>
createAArch64RelocationPass(const AArch64LinkingContext &);
}
}

#endif

//===- lib/ReaderWriter/ELF/AArch64/AArch64RelocationPass.h ---------------===//
//
//                             The LLVM Linker
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
///
/// \file
/// \brief Declares the relocation processing pass for AArch64. This includes
///   GOT and PLT entries, TLS, COPY, and ifunc.
///
//===----------------------------------------------------------------------===//

#ifndef LLD_READER_WRITER_ELF_AARCH64_AARCH64_RELOCATION_PASS_H
#define LLD_READER_WRITER_ELF_AARCH64_AARCH64_RELOCATION_PASS_H

#include <memory>

namespace lld {
class Pass;
namespace elf {
class AArch64LinkingContext;

/// \brief Create AArch64 relocation pass for the given linking context.
std::unique_ptr<Pass>
createAArch64RelocationPass(const AArch64LinkingContext &);
}
}

#endif

Fix comment in AArch64 ELF backend

Fix comment in AArch64 ELF backend

git-svn-id: f6089bf0e6284f307027cef4f64114ee9ebb0424@222814 91177308-0d34-0410-b5e6-96231b3b80d8


//
//  FABAsyncOperation.h
//  FABOperation
//
//  Copyright © 2016 Twitter. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
 *  Completion block that can be called in your subclass implementation. It is up to you when you want to call it.
 */
typedef void(^FABAsyncOperationCompletionBlock)(NSError *__nullable error);

/**
 *  FABAsyncOperation is a subclass of NSOperation that allows for asynchronous work to be performed, for things like networking, IPC or UI-driven logic. Create your own subclasses to encapsulate custom logic.
 *  @warning When subclassing to create your own operations, be sure to call -[markDone] at some point, or program execution will hang.
 *  @see -[markDone] in FABAsyncOperation_Private.h
 */
@interface FABAsyncOperation : NSOperation

/**
 *  Add a callback method for consumers of your subclasses to set when the asynchronous work is marked as complete with -[markDone].
 */
@property (copy, nonatomic, nullable) FABAsyncOperationCompletionBlock asyncCompletion;

@end

//
//  FABAsyncOperation.h
//  FABOperation
//
//  Copyright © 2016 Twitter. All rights reserved.
//

#import <Foundation/Foundation.h>

/**
 *  Completion block that can be called in your subclass implementation. It is up to you when you want to call it.
 */
typedef void(^FABAsyncOperationCompletionBlock)(NSError *__nullable error);

/**
 *  FABAsyncOperation is a subclass of NSOperation that allows for asynchronous work to be performed, for things like networking, IPC or UI-driven logic. Create your own subclasses to encapsulate custom logic.
 *  @warning When subclassing to create your own operations, be sure to call -[finishWithError:] at some point, or program execution will hang.
 *  @see -[finishWithError:] in FABAsyncOperation_Private.h
 */
@interface FABAsyncOperation : NSOperation

/**
 *  Add a callback method for consumers of your subclasses to set when the asynchronous work is marked as complete with -[finishWithError:].
 */
@property (copy, nonatomic, nullable) FABAsyncOperationCompletionBlock asyncCompletion;

@end

Update comments to refer to finishWithError

markDone was renamed to finishWithError


#ifndef __ACONFIG_H_
#define __ACONFIG_H_

/* This must be before alphabetically before all other files that reference these settings for the compiler to work
*  or you may get vtable errors.
*/

/* This section is for devices and their configuration. IF you have not setup you pins with the
*  standard configuration of the OpenROV kits, you should probably clone the cape or controlboard
*  and change the pin definitions there.  Things not wired to specific pins but on the I2C bus will
*  have the address defined in this file.
*/
//Kit:
#define HAS_STD_CAPE (0)
#define HAS_STD_PILOT (1)
#define HAS_OROV_CONTROLLERBOARD_25 (0)

#define HAS_STD_LIGHTS (1)
#define HAS_STD_CALIBRATIONLASERS (0)
#define HAS_STD_2X1_THRUSTERS (1)
#define HAS_STD_CAMERAMOUNT (1)

//After Market:
#define HAS_POLOLU_MINIMUV (0)
#define HAS_MS5803_14BA (0)
#define MS5803_14BA_I2C_ADDRESS 0x76
#define HAS_MPU9150 (0)
#define MPU9150_EEPROM_START 2

#endif

#ifndef __ACONFIG_H_
#define __ACONFIG_H_

/* This must be before alphabetically before all other files that reference these settings for the compiler to work
*  or you may get vtable errors.
*/

/* This section is for devices and their configuration. IF you have not setup you pins with the
*  standard configuration of the OpenROV kits, you should probably clone the cape or controlboard
*  and change the pin definitions there.  Things not wired to specific pins but on the I2C bus will
*  have the address defined in this file.
*/
//Kit:
#define HAS_STD_PILOT (1)
/* The definitions are done in th
	#define HAS_STD_CAPE (0)
	#define HAS_OROV_CONTROLLERBOARD_25 (0)
*/
#include "BoardConfig.h"

#define HAS_STD_LIGHTS (1)
#define HAS_STD_CALIBRATIONLASERS (1)
#define HAS_STD_2X1_THRUSTERS (1)
#define HAS_STD_CAMERAMOUNT (1)

//After Market:
#define HAS_POLOLU_MINIMUV (0)
#define HAS_MS5803_14BA (0)
#define MS5803_14BA_I2C_ADDRESS 0x76
#define HAS_MPU9150 (0)
#define MPU9150_EEPROM_START 2

#endif

Add automation for arduino board selection for compilation


// SKIP
#include <pthread.h>
#include <stdlib.h>

extern int optind ;

pthread_t hthread  ;

void *signal_waiter(void *arg )
{
}

int main(int argc , char **argv )
{
  pthread_create(& hthread, NULL, & signal_waiter, NULL);

  if (optind >= argc) {
    if (optind == argc) {
      // mine-lazy priv should also read Unknown int, not Unknown here
      exit(1);
    }
  }

  return (0);
}

Add manual test where mine-W is more precise than mine-lazy due to extern global init top


/*
 * Copyright 2016 Google Inc.
 *
 * Use of this source code is governed by a BSD-style license that can be
 * found in the LICENSE file.
 */
#ifndef SK_MILESTONE
#define SK_MILESTONE 89
#endif

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

Update Skia milestone to 90

Update Skia milestone to 90

Change-Id: Ib4ef9057cb623b2d8ea57c40fb6f67ac731471f0
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/353778
Reviewed-by: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>
Commit-Queue: Heather Miller <2e22000c5d22374561fe5fba576a31095b72dc2e@google.com>


//
//  AsyncLog.c
//  Ctest
//
//  Created by Yanjiu Huang on 3/24/14.
//  Copyright (c) 2014 Yanjiu Huang. All rights reserved.
//

#include <stdio.h>

#include "AsyncLog.h"

void async_log_error(const char* format,...){

}

void async_log_debug(const char* format,...){

}

void async_log_info(const char* format,...){

}

//
//  AsyncLog.c
//  Ctest
//
//  Created by Yanjiu Huang on 3/24/14.
//  Copyright (c) 2014 Yanjiu Huang. All rights reserved.
//

#include <stdio.h>
#include <stdarg.h>

#include "AsyncLog.h"

void async_log_error(const char* format, ...){
    va_list arg;

    va_start(arg, format);
    vfprintf(stderr, format, arg);
    va_end(arg);
}

void async_log_debug(const char* format, ...){
    va_list arg;

    va_start(arg, format);
    vfprintf(stdout, format, arg);
    va_end(arg);
}

void async_log_info(const char* format, ...){
    va_list arg;

    va_start(arg, format);
    vfprintf(stdout, format, arg);
    va_end(arg);
}

Add the Async Log implementation

Add the Async Log implementation


/*
  This file is part of the kblog library.

  Copyright (c) 2007 Christian Weilbach <christian_weilbach@web.de>

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Library General Public
  License as published by the Free Software Foundation; either
  version 2 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Library General Public License for more details.

  You should have received a copy of the GNU Library General Public License
  along with this library; see the file COPYING.LIB.  If not, write to
  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  Boston, MA 02110-1301, USA.
*/

#ifndef BLOGPOSTING_P_H
#define BLOGPOSTING_P_H

#include "blogposting.h"

#include <KDateTime>

#include <QStringList>

namespace KBlog{

class BlogPostingPrivate
{
  public:
    friend class Blog;
    bool mPublished;
    BlogPosting *q_ptr;
    QString mPostingId;
    QString mTitle;
    QString mContent;
    QStringList mCategories;
    QString mError;
    BlogPosting::Status mStatus;
    KDateTime mCreationDateTime;
    KDateTime mModificationDateTime;
    Q_DECLARE_PUBLIC(BlogPosting);
};

} // namespace
#endif

/*
  This file is part of the kblog library.

  Copyright (c) 2007 Christian Weilbach <christian_weilbach@web.de>

  This library is free software; you can redistribute it and/or
  modify it under the terms of the GNU Library General Public
  License as published by the Free Software Foundation; either
  version 2 of the License, or (at your option) any later version.

  This library is distributed in the hope that it will be useful,
  but WITHOUT ANY WARRANTY; without even the implied warranty of
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  Library General Public License for more details.

  You should have received a copy of the GNU Library General Public License
  along with this library; see the file COPYING.LIB.  If not, write to
  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
  Boston, MA 02110-1301, USA.
*/

#ifndef BLOGPOSTING_P_H
#define BLOGPOSTING_P_H

#include "blogposting.h"

#include <KDateTime>

#include <QStringList>

namespace KBlog{

class BlogPostingPrivate
{
  public:
    friend class Blog;
    bool mPublished;
    BlogPosting *q_ptr;
    QString mPostingId;
    QString mTitle;
    QString mContent;
    QStringList mCategories;
    QString mError;
    BlogPosting::Status mStatus;
    KDateTime mCreationDateTime;
    KDateTime mModificationDateTime;
    Q_DECLARE_PUBLIC(BlogPosting)
};

} // namespace
#endif

Fix extra semicolor causing build failure

svn path=/trunk/KDE/kdepimlibs/; revision=694789


/*
 * Copyright (c) 2013, CETIC.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 * 3. Neither the name of the copyright holder nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE
 * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
 * OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 */

#ifndef ENC28J60_ARCH_H
#define ENC28J60_ARCH_H

#include <inttypes.h>

/* ENC28J60 architecture-specific SPI functions that are called by the
   enc28j60 driver and must be implemented by the platform code */

void enc28j60_arch_spi_init(void);
void enc28j60_arch_spi_write(uint8_t data);
uint8_t enc28j60_arch_spi_read(void);
void enc28j60_arch_spi_select(void);
void enc28j60_arch_spi_deselect(void);

#endif

Add missing EC28J60 arch definition file


#ifndef __PLATFORM_H__
#define __PLATFORM_H__

#define BuildPlatform_NAME  "x86_64-unknown-linux"
#define HostPlatform_NAME   "x86_64-unknown-linux"
#define TargetPlatform_NAME "x86_64-unknown-linux"

#define x86_64_unknown_linux_BUILD 1
#define x86_64_unknown_linux_HOST 1
#define x86_64_unknown_linux_TARGET 1

#define x86_64_BUILD_ARCH 1
#define x86_64_HOST_ARCH 1
#define x86_64_TARGET_ARCH 1
#define BUILD_ARCH "x86_64"
#define HOST_ARCH "x86_64"
#define TARGET_ARCH "x86_64"
#define LLVM_TARGET "x86_64-unknown-linux"

#define linux_BUILD_OS 1
#define linux_HOST_OS 1
#define linux_TARGET_OS 1
#define BUILD_OS "linux"
#define HOST_OS "linux"
#define TARGET_OS "linux"

#define unknown_BUILD_VENDOR 1
#define unknown_HOST_VENDOR 1
#define unknown_TARGET_VENDOR  1
#define BUILD_VENDOR "unknown"
#define HOST_VENDOR "unknown"
#define TARGET_VENDOR "unknown"

#endif /* __PLATFORM_H__ */

Add more files into gen-files

Add more files into gen-files


// RUN: %ocheck 3 %s

struct nest {
	union {
		struct {
			union {
				int i;
			};
		};
	};
};

int main()
{
	struct nest n = {
		.i = 2
	};
	n.i++;
	return n.i;
}

Add anonymous nested struct test

Add anonymous nested struct test


// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_BASE_IME_CHARACTER_COMPOSER_H_
#define UI_BASE_IME_CHARACTER_COMPOSER_H_
#pragma once

#include <vector>

#include "base/basictypes.h"
#include "base/string_util.h"

namespace ui {

// A class to recognize compose and dead key sequence.
// Outputs composed character.
//
// TODO(hashimoto): support unicode character composition starting with
// Ctrl-Shift-U. http://crosbug.com/15925
class CharacterComposer {
 public:
  CharacterComposer();
  ~CharacterComposer();

  void Reset();

  // Filters keypress.
  // Returns true if the keypress is recognized as a part of composition
  // sequence.
  bool FilterKeyPress(unsigned int keycode);

  // Returns a string consisting of composed character.
  // Empty string is returned when there is no composition result.
  const string16& composed_character() const {
    return composed_character_;
  }

 private:
  // Remembers keypresses previously filtered.
  std::vector<unsigned int> compose_buffer_;

  // A string representing the composed character.
  string16 composed_character_;

  DISALLOW_COPY_AND_ASSIGN(CharacterComposer);
};

}  // namespace ui

#endif  // UI_BASE_IME_CHARACTER_COMPOSER_H_

// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef UI_BASE_IME_CHARACTER_COMPOSER_H_
#define UI_BASE_IME_CHARACTER_COMPOSER_H_
#pragma once

#include <vector>

#include "base/basictypes.h"
#include "base/string_util.h"
#include "ui/base/ui_export.h"

namespace ui {

// A class to recognize compose and dead key sequence.
// Outputs composed character.
//
// TODO(hashimoto): support unicode character composition starting with
// Ctrl-Shift-U. http://crosbug.com/15925
class UI_EXPORT CharacterComposer {
 public:
  CharacterComposer();
  ~CharacterComposer();

  void Reset();

  // Filters keypress.
  // Returns true if the keypress is recognized as a part of composition
  // sequence.
  bool FilterKeyPress(unsigned int keycode);

  // Returns a string consisting of composed character.
  // Empty string is returned when there is no composition result.
  const string16& composed_character() const {
    return composed_character_;
  }

 private:
  // Remembers keypresses previously filtered.
  std::vector<unsigned int> compose_buffer_;

  // A string representing the composed character.
  string16 composed_character_;

  DISALLOW_COPY_AND_ASSIGN(CharacterComposer);
};

}  // namespace ui

#endif  // UI_BASE_IME_CHARACTER_COMPOSER_H_

Fix link error when component=shared_library is set

BUG=103789
TEST=Manual

Review URL: http://codereview.chromium.org/8515013

git-svn-id: de016e52bd170d2d4f2344f9bf92d50478b649e0@109554 0039d316-1c4b-4281-b951-d872f2087c98


/*
 * Copyright (c) 2019 Oticon A/S
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * This header exists solely to allow drivers meant for the native_posix board
 * to be used directly in the nrf52_bsim board.
 * Note that such reuse should be done with great care.
 *
 * The command line arguments parsing logic from native_posix was born as a copy
 * of the one from the BabbleSim's libUtil library
 * They are therefore mostly equal except for types and functions names.
 *
 * This header converts these so the native_posix call to dynamically register
 * command line arguments is passed to the nrf52_bsim one
 */

#include "../native_posix/cmdline_common.h"

static inline void native_add_command_line_opts(struct args_struct_t *args)
{
	void bs_add_extra_dynargs(struct args_struct_t *args);
	bs_add_extra_dynargs(args);
}

/*
 * Copyright (c) 2019 Oticon A/S
 *
 * SPDX-License-Identifier: Apache-2.0
 */

/**
 * This header exists solely to allow drivers meant for the native_posix board
 * to be used directly in the nrf52_bsim board.
 * Note that such reuse should be done with great care.
 *
 * The command line arguments parsing logic from native_posix was born as a copy
 * of the one from the BabbleSim's libUtil library
 * They are therefore mostly equal except for types and functions names.
 *
 * This header converts these so the native_posix call to dynamically register
 * command line arguments is passed to the nrf52_bsim one
 */

#ifndef BOARDS_POSIX_NRF52_BSIM_CMDLINE_H
#define BOARDS_POSIX_NRF52_BSIM_CMDLINE_H

#include "../native_posix/cmdline_common.h"

#ifdef __cplusplus
extern "C" {
#endif

static inline void native_add_command_line_opts(struct args_struct_t *args)
{
	void bs_add_extra_dynargs(struct args_struct_t *args);
	bs_add_extra_dynargs(args);
}

#ifdef __cplusplus
}
#endif

#endif /* BOARDS_POSIX_NRF52_BSIM_CMDLINE_H */

nrf52_bsim: Add missing header guard and extern C block

Add a missing header guard and an extern "C" block
in one of the nrf52_bsim headers

Signed-off-by: Alberto Escolar Piedras <52be3174920ed06cbdfbcf9622a1a6c68e942617@oticon.com>


//
//  Atomic.h
//  Atomic
//
//  Created by Adlai Holler on 12/5/15.
//  Copyright © 2015 Adlai Holler. All rights reserved.
//

#import <UIKit/UIKit.h>

//! Project version number for Atomic.
FOUNDATION_EXPORT double AtomicVersionNumber;

//! Project version string for Atomic.
FOUNDATION_EXPORT const unsigned char AtomicVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <Atomic/PublicHeader.h>

//
//  Atomic.h
//  Atomic
//
//  Created by Adlai Holler on 12/5/15.
//  Copyright © 2015 Adlai Holler. All rights reserved.
//

#import <Foundation/Foundation.h>

//! Project version number for Atomic.
FOUNDATION_EXPORT double AtomicVersionNumber;

//! Project version string for Atomic.
FOUNDATION_EXPORT const unsigned char AtomicVersionString[];

// In this header, you should import all the public headers of your framework using statements like #import <Atomic/PublicHeader.h>

Remove silly import of UIKit

Remove silly import of UIKit