tests/periph_flashpage_unittests: use unsgined int for address cast

For 16bit platforms casting to int will overflow when ROM size nears
2**16

--- tests/periph_flashpage_unittest/main.c
+++ tests/periph_flashpage_unittest/main.c
@@ -46,11 +46,12 @@
     void *addr;

     addr = flashpage_addr(0);
-    TEST_ASSERT_EQUAL_INT((int)CPU_FLASH_BASE, (int)addr);
+    TEST_ASSERT_EQUAL_INT((unsigned int)CPU_FLASH_BASE, (unsigned int)addr);
     addr = flashpage_addr(FLASHPAGE_NUMOF - 1);
-    TEST_ASSERT_EQUAL_INT((long)CPU_FLASH_BASE + (((unsigned)FLASHPAGE_NUMOF - 1) * FLASHPAGE_SIZE), (int)addr);
+    TEST_ASSERT_EQUAL_INT((long)CPU_FLASH_BASE + (((unsigned)FLASHPAGE_NUMOF - 1) * FLASHPAGE_SIZE),
+                          (unsigned int)addr);
     addr = flashpage_addr(12);
-    TEST_ASSERT_EQUAL_INT((int)CPU_FLASH_BASE + (12 * FLASHPAGE_SIZE), (int)addr);
+    TEST_ASSERT_EQUAL_INT((unsigned int)CPU_FLASH_BASE + (12 * FLASHPAGE_SIZE), (unsigned int)addr);
 }

 static void test_flashbase_page(void)
@@ -65,7 +66,9 @@
     TEST_ASSERT_EQUAL_INT(1, page);
     page = flashpage_page((void *)(CPU_FLASH_BASE + FLASHPAGE_SIZE + 1));
     TEST_ASSERT_EQUAL_INT(1, page);
-    page = flashpage_page((void *)(CPU_FLASH_BASE + ((unsigned)FLASHPAGE_SIZE * (FLASHPAGE_NUMOF - 1))));
+    page =
+        flashpage_page((void *)(CPU_FLASH_BASE +
+                                ((unsigned)FLASHPAGE_SIZE * (FLASHPAGE_NUMOF - 1))));
     TEST_ASSERT_EQUAL_INT(FLASHPAGE_NUMOF - 1, page);
 }


new files

new files

--- include/CImage.h
+++ include/CImage.h
@@ -239,7 +239,7 @@
   // Create
  protected:
   CImage();
-  CImage(const CISize2DT<int> &size);
+  CImage(const CISize2D &size);
   CImage(int width, int height);
   CImage(const CImage &image, int x, int y, int width, int height);


added GLX_RGBA_TYPE, fixed GLX_LARGEST_PBUFFER typo

--- include/GL/glx.h
+++ include/GL/glx.h
@@ -1,4 +1,4 @@
-/* $Id: glx.h,v 1.29 2001/07/27 14:26:27 brianp Exp $ */
+/* $Id: glx.h,v 1.30 2001/09/01 20:17:16 brianp Exp $ */

 /*
  * Mesa 3-D graphics library
@@ -125,7 +125,7 @@
 #define GLX_MAX_PBUFFER_HEIGHT		0x8017
 #define GLX_MAX_PBUFFER_PIXELS		0x8018
 #define GLX_PRESERVED_CONTENTS		0x801B
-#define GLX_LARGEST_BUFFER		0x801C
+#define GLX_LARGEST_PBUFFER		0x801C
 #define GLX_WIDTH			0x801D
 #define GLX_HEIGHT			0x801E
 #define GLX_EVENT_MASK			0x801F
@@ -155,6 +155,7 @@
 #define GLX_GRAY_SCALE			0x8006
 #define GLX_STATIC_GRAY			0x8007
 #define GLX_TRANSPARENT_INDEX		0x8009
+#define GLX_RGBA_TYPE			0x8014
 #define GLX_COLOR_INDEX_TYPE		0x8015
 #define GLX_COLOR_INDEX_BIT		0x00000002
 #define GLX_RGBA_BIT			0x00000001


[project @ 2002-07-17 09:22:20 by simonmar] Need to #include <math.h> now that Stg.h doesn't.


remove Noodle::peek (unused)

remove Noodle::peek (unused)

--- include/Noodle.h
+++ include/Noodle.h
@@ -11,7 +11,6 @@

 	bool empty(void) { return m_queue.empty(); }
 	void push(int sample) { m_queue.push(sample); }
-	int peek(void) { return m_queue.front(); }
 	int pop(void);

 private:


add Poller

add Poller

--- include/Poller.h
+++ include/Poller.h
@@ -6,7 +6,13 @@
 	class Poller
 	{
 	public:
-
+		// Poller类至少要包含一个Poll函数，该函数的目的是阻塞的等待关注的事件有效，并返回有效的事件
+		void Poll();
+
+		// 还应该包括添加、删除事件的功能
+		bool AddEvent();
+		bool ModEvent(); // 修改事件，不确定是否必要
+		bool DelEvent();
 	};
 }


Added colored labels size

Added colored labels size

--- tensorflow_lite_support/c/task/processor/segmentation_result.h
+++ tensorflow_lite_support/c/task/processor/segmentation_result.h
@@ -39,7 +39,7 @@
   // the TFLite Model Metadata. See `display_names_locale` field in
   // ImageSegmenterOptions.
   char* display_name;
-
+
 } TfLiteColoredLabel;

 // Holds a resulting segmentation mask and associated metadata.
@@ -47,16 +47,15 @@
   // The width of the mask. This is an intrinsic parameter of the model being
   // used, and does not depend on the input image dimensions.
   unsigned int width;
-

   // The height of the mask. This is an intrinsic parameter of the model being
   // used, and does not depend on the input image dimensions.
   unsigned int height;
-
-  // IMPORTANT: A TfLiteSegmentation can either have `confidence_masks`
-  // or `category_mask` based on the output type selected in
+
+  // IMPORTANT: A TfLiteSegmentation can either have `confidence_masks`
+  // or `category_mask` based on the output type selected in
   // `TfLiteSegmentationOptions`i.e, they are mutually exclusive.
-  // Whichever field amongst the two is not applicable based on the selected
+  // Whichever field amongst the two is not applicable based on the selected
   // output type will be null.

   // IMPORTANT: segmentation masks are not direcly suited for display, in
@@ -70,13 +69,15 @@
   // classes. The value of each pixel in these masks represents the confidence
   // score for this particular class.
   float** confidence_masks;
-
+
   // Flattened 2D-array of size `width` x `height`,
   // in row major order. The value of each pixel in this mask represents the
   // class to which the pixel belongs.
-  uint8_t* category_mask;
-
-  // The list of colored labels for all the supported categories (classes).
+  uint8_t* category_mask;
+
+  uint8_t colored_labels_size;
+
+  // The list of colored labels for all the supported categories (classes).
   // Depending on which is present, this list is in 1:1 correspondence with:
   // * `category_mask` pixel values, i.e. a pixel with value `i` is
   //   associated with `colored_labels[i]`,
@@ -86,7 +87,6 @@

 } TfLiteSegmentation;

-
 // Holds Image Segmentation Results.
 // Contains one set of results per detected object.
 typedef struct TfLiteSegmentationResult {
@@ -94,14 +94,16 @@
   int size;

   // Array of seegmentations returned after inference by model.
-  // Note that at the time, this array is expected to have a single `TfLiteSegmentation`;
-  // the field is made an array for later extension to e.g. instance
-  // segmentation models, which may return one segmentation per object.
+  // Note that at the time, this array is expected to have a single
+  // `TfLiteSegmentation`; the field is made an array for later extension to
+  // e.g. instance segmentation models, which may return one segmentation per
+  // object.
   TfLiteSegmentation* segmentations;
 } TfLiteSegmentationResult;

 // Frees up the TfLiteSegmentationResult Structure.
-void TfLiteSegmentationResultDelete(TfLiteSegmentationResult* segmentation_result);
+void TfLiteSegmentationResultDelete(
+    TfLiteSegmentationResult* segmentation_result);

 #ifdef __cplusplus
 }  // extern "C"


Added monitoring info message definition.

Signed-off-by: Matti Halme <ff510cf1875ebf457758d08f8151e5d13e5f3625@gmail.com>

--- include/bmemsg.h
+++ include/bmemsg.h
@@ -80,6 +80,7 @@
  * Message ID's
  */
 #define BME_BATTERY_INFO_REQ    0x06
+#define BME_MONITOR_INFO_REQ    0x0a
 #define BME_INFO_IND            0x21

 /**
@@ -115,6 +116,30 @@
 };

 /**
+ * Monitor info request
+ */
+struct emsg_monitor_info_req {
+  uint16_t type; /**< BME_MONITOR_INFO_REQ */
+  uint16_t subtype;
+  uint32_t flags;
+} __attribute__((packed));
+
+/**
+ * Monitor info reply
+ */
+struct emsg_monitor_info_reply {
+  uint32_t zero;
+  uint32_t flags;
+  uint16_t unk8;
+  uint8_t  batt_max_num_bars;
+  uint8_t  batt_bars_data;
+  uint16_t capa_remaining;    /* mAh */
+  uint16_t unk14;
+  uint16_t unk16;
+  uint16_t unk18;
+} __attribute__((packed));
+
+/**
  * EM info indication
  */
 struct emsg_info_ind {


Don't output slice label if can't sort

Don't output slice label if can't sort

--- lib/proc/proc_select.c
+++ lib/proc/proc_select.c
@@ -1926,8 +1926,6 @@
       continue;
     }

-    data->output.formatter->slice_label(ctx, data, slice);
-
     n_hits = grn_table_size(ctx, slice->table);

     offset = slice->offset;
@@ -1948,6 +1946,7 @@
         if (sorted) {
           grn_table_sort(ctx, slice->table, offset, limit,
                          sorted, sort_keys, n_sort_keys);
+          data->output.formatter->slice_label(ctx, data, slice);
           if (!grn_proc_select_output_columns(ctx,
                                               sorted,
                                               n_hits,
@@ -1963,6 +1962,7 @@
         grn_table_sort_key_close(ctx, sort_keys, n_sort_keys);
       }
     } else {
+      data->output.formatter->slice_label(ctx, data, slice);
       if (!grn_proc_select_output_columns(ctx,
                                           slice->table,
                                           n_hits,


make constants slightly more consistent

make constants slightly more consistent

This makes INSN_CONFIG_DIO_{INPUT,OUTPUT,OPENDRAIN} simply be copies of the
already-existing constants COMEDI_INPUT, COMEDI_OUTPUT, and
COMEDI_OPENDRAIN.

This change also ensures that if a user happens to use, for example,
COMEDI_INPUT in place of where INSN_CONFIG_DIO_INPUT, the result will
always be the same and also acceptable and correct usage.

Synchronizes comedi.h to the kernel staging tree version.

--- include/comedi.h
+++ include/comedi.h
@@ -257,6 +257,22 @@
 };

 /* configuration instructions */
+
+/**
+ * enum comedi_io_direction - COMEDI I/O directions
+ * @COMEDI_INPUT:	Input.
+ * @COMEDI_OUTPUT:	Output.
+ * @COMEDI_OPENDRAIN:	Open-drain (or open-collector) output.
+ *
+ * These are used by the %INSN_CONFIG_DIO_QUERY configuration instruction to
+ * report a direction.  They may also be used in other places where a direction
+ * needs to be specified.
+ */
+enum comedi_io_direction {
+	COMEDI_INPUT = 0,
+	COMEDI_OUTPUT = 1,
+	COMEDI_OPENDRAIN = 2
+};

 /**
  * enum configuration_ids - COMEDI configuration instruction codes
@@ -315,9 +331,9 @@
  * @INSN_CONFIG_PWM_GET_H_BRIDGE: Get PWM H bridge duty cycle and polarity.
  */
 enum configuration_ids {
-	INSN_CONFIG_DIO_INPUT = 0,
-	INSN_CONFIG_DIO_OUTPUT = 1,
-	INSN_CONFIG_DIO_OPENDRAIN = 2,
+	INSN_CONFIG_DIO_INPUT = COMEDI_INPUT,
+	INSN_CONFIG_DIO_OUTPUT = COMEDI_OUTPUT,
+	INSN_CONFIG_DIO_OPENDRAIN = COMEDI_OPENDRAIN,
 	INSN_CONFIG_ANALOG_TRIG = 16,
 /*	INSN_CONFIG_WAVEFORM = 17, */
 /*	INSN_CONFIG_TRIG = 18, */
@@ -413,22 +429,6 @@
 	COMEDI_DIGITAL_TRIG_DISABLE = 0,
 	COMEDI_DIGITAL_TRIG_ENABLE_EDGES = 1,
 	COMEDI_DIGITAL_TRIG_ENABLE_LEVELS = 2
-};
-
-/**
- * enum comedi_io_direction - COMEDI I/O directions
- * @COMEDI_INPUT:	Input.
- * @COMEDI_OUTPUT:	Output.
- * @COMEDI_OPENDRAIN:	Open-drain (or open-collector) output.
- *
- * These are used by the %INSN_CONFIG_DIO_QUERY configuration instruction to
- * report a direction.  They may also be used in other places where a direction
- * needs to be specified.
- */
-enum comedi_io_direction {
-	COMEDI_INPUT = 0,
-	COMEDI_OUTPUT = 1,
-	COMEDI_OPENDRAIN = 2
 };

 /**


Fix win32 bustage created by r17457.

Fix win32 bustage created by r17457.

Thanks to Cristian Adam for the report.

git-svn-id: 8dbf393e6e9ab8d4979d29f9a341a98016792aa6@17467 0101bb08-14d6-0310-b084-bc0e0c8e3800

--- lib/x86_vc/mmxstate.c
+++ lib/x86_vc/mmxstate.c
@@ -81,7 +81,7 @@
   refi=_state->frags[_fragi].refi;
   ystride=_state->ref_ystride[_pli];
   dst=_state->ref_frame_data[_state->ref_frame_idx[OC_FRAME_SELF]]+frag_buf_off;
-  if(refi==OC_MODE_INTRA)oc_frag_recon_intra_mmx(dst,ystride,_dct_coeffs+64);
+  if(refi==OC_FRAME_SELF)oc_frag_recon_intra_mmx(dst,ystride,_dct_coeffs+64);
   else{
     const unsigned char *ref;
     int                  mvoffsets[2];


Minor additions to API documentation

Minor additions to API documentation

--- include/csound.h
+++ include/csound.h
@@ -1055,12 +1055,14 @@
    PUBLIC void csoundGetParams(CSOUND *csound, CSOUND_PARAMS *p);

    /**
-    * Returns whether Csound is in debug mode.
+    * Returns whether Csound is set to print debug messages sent through the
+    * DebugMsg() internal API function. Anything different to 0 means true.
     */
    PUBLIC int csoundGetDebug(CSOUND *);

    /**
-    * Sets whether Csound is in debug mode.
+    * Sets whether Csound prints debug messages from the DebugMsg() internal
+    * API function. Anything different to 0 means true.
     */
    PUBLIC void csoundSetDebug(CSOUND *, int debug);


Add check for the property of scalar in an ellipsoidal eigenpinor

--- src/predg3f.c
+++ src/predg3f.c
@@ -178,7 +178,7 @@

 static void _cs2_debug_verify_ellipsoidal_eigenpinor(const struct cs2_pin3f_s *p)
 {
-    double len;
+    double len, prop;

     const double EPS_LEN = 10e-8;

@@ -188,6 +188,13 @@
                    "failed to obtain a valid ellipoidal eigen pinor: "
                    "eps=%.12f, len=%.12f, p=%.12f e12 + %.12f e23 + %.12f e31 + %.12f",
                    EPS_LEN, len, p->p12, p->p23, p->p31, p->p0);
+
+    prop = 2.0 * sqrt(_cs2_clamp_0(p->p0));
+
+    CS2_ASSERT_MSG(fabs(len - prop) < EPS_LEN,
+                   "failed to check property of scalar in ellipoidal eigen pinor: "
+                   "eps=%.12f, len=%.12f, prop=%.12f, p=%.12f e12 + %.12f e23 + %.12f e31 + %.12f",
+                   EPS_LEN, len, prop, p->p12, p->p23, p->p31, p->p0);
 }

 static void _cs2_calc_ellipsoidal_eigenvector(struct cs2_vec4f_s *w, const struct cs2_vec3f_s *p, const struct cs2_vec3f_s *q, const struct cs2_vec3f_s *u, const struct cs2_vec3f_s *v, double a, double b)


mv fds to ipc

mv fds to ipc

--- src/process.c
+++ src/process.c
@@ -7,6 +7,7 @@
 #include <dirent.h>
 #include <stdlib.h>

+#include "ipc.h"
 #include "cpu.h"
 #include "disk.h"
 #include "memory.h"
@@ -160,36 +161,7 @@
     return value;
 }

-void current_fds(proc_t *proc)
-{
-    char *path;
-
-    struct dirent *fd_file;
-    DIR *fd_dir;
-
-    path = malloc(sizeof(char) * MAXPROCPATH);
-    snprintf(path, MAXPROCPATH, "/proc/%s/fd/", proc->pidstr);
-
-    proc->open_fds = 0;
-
-    fd_dir = opendir(path);
-    if (fd_dir == NULL)
-        goto free_path;
-
-    while ((fd_file = readdir(fd_dir))) {
-        if (!isdigit(fd_file->d_name[0]))
-            continue;
-        else
-            proc->open_fds++;
-    }
-
-    closedir(fd_dir);
-
-    free_path:
-        free(path);
-
-    return;
-}
+

 proc_t *create_proc(void)
 {


PS/2 interface: sense multifinger taps on FingerHigh (#21427)

Previously multifinger taps were sensed on the Z value > 0: this isn't
very correct.  Accorging to the specification, Z values below 30
correspond only to a very light taps or just floating fingers.  I had
run into the situation when I was clicking on the physical left button
and that click was transformed to the right button click via
ClickFinger2, but I wasn't tapping the touchpad at all.  Investigations
showed very small values of Z -- my other fingers were just floating
above touchpad.

This change also makes click (and finger) detection more consistent,
because it uses FingerHigh to detect taps everywhere.

X.Org Bug 21427 <http://bugs.freedesktop.org/show_bug.cgi?id=21427>

Signed-off-by: Eygene Ryabinkin <6ed1094f5ee8dcb87d917057819372ebd839b68b@codelabs.ru>
Signed-off-by: Peter Hutterer <b9c50af7afa7642f6f854434cda9ffe54ece8b85@who-t.net>
Acked-by: Henrik Rydberg <b7088a9c70345a9ab94cacab3cc3888d0a7dc884@euromail.se>

--- src/ps2comm.c
+++ src/ps2comm.c
@@ -606,6 +606,8 @@
     int newabs = SYN_MODEL_NEWABS(*synhw);
     unsigned char *buf = comm->protoBuf;
     struct SynapticsHwState *hw = &(comm->hwState);
+    SynapticsPrivate *priv = (SynapticsPrivate *)local->private;
+    SynapticsParameters *para = &priv->synpara;
     int w, i;

     if (!ps2_synaptics_get_packet(local, synhw, proto_ops, comm))
@@ -704,7 +706,7 @@

     hw->y = YMAX_NOMINAL + YMIN_NOMINAL - hw->y;

-    if (hw->z > 0) {
+    if (hw->z >= para->finger_high) {
 	int w_ok = 0;
 	/*
 	 * Use capability bits to decide if the w value is valid.


device: Provide a dummy macro for device_pm_control_nop on disabled PM

This will prove to be useful on enabling PM setting for the network
devices.

Signed-off-by: Tomasz Bursztyka <ba81a3a719836727e6857ae83462b9f52ec41006@linux.intel.com>

--- include/device.h
+++ include/device.h
@@ -598,7 +598,8 @@
 static inline int device_pm_put(struct device *dev) { return -ENOTSUP; }
 static inline int device_pm_put_sync(struct device *dev) { return -ENOTSUP; }
 #endif
-
+#else
+#define device_pm_control_nop(...) NULL
 #endif

 /**


Add userReceivedInviteToChannel to header file

--- conversation/IRC/Messages.h
+++ conversation/IRC/Messages.h
@@ -83,4 +83,6 @@

 + (void)clientReceivedAwayNotification:(IRCMessage *)message;

++ (void)userReceivedInviteToChannel:(IRCMessage *)message;
+
 @end


- fix compilation of UCLIBC_HAS_PTY && !ASSUME_DEVPTS && !LINUX_SPECIFIC

--- libc/stdlib/grantpt.c
+++ libc/stdlib/grantpt.c
@@ -38,7 +38,8 @@
 /* Prototype for private function that gets the name of the slave
    pseudo terminal in a safe way.  */
 static int pts_name (int fd, char **pts, size_t buf_len);
-
+extern __typeof(statfs) __libc_statfs;
+libc_hidden_proto(__libc_statfs)
 #endif

 /* Change the ownership and access permission of the slave pseudo
@@ -59,7 +60,7 @@
   if (pts_name (fd, &buf, sizeof (_buf)))
     return -1;

-  if (statfs (buf, &fsbuf) < 0)
+  if (__libc_statfs (buf, &fsbuf) < 0)
     return -1;

   /* If the slave pseudo terminal lives on a `devpts' filesystem, the


Stop playing old sound when playing new sound

Sound playing now stops any previous sound already playing on that sound
channel.

--- libchimara/schannel.c
+++ libchimara/schannel.c
@@ -371,8 +371,11 @@
 glk_schannel_play_ext(schanid_t chan, glui32 snd, glui32 repeats, glui32 notify)
 {
 	VALID_SCHANNEL(chan, return 0);
-#ifdef GSTREAMER_SOUND
+#ifdef GSTREAMER_SOUND
 	ChimaraGlkPrivate *glk_data = g_private_get(glk_data_key);
+
+	/* Stop the previous sound */
+	clean_up_after_playing_sound(chan);

 	if(!glk_data->resource_map) {
 		if(!glk_data->resource_load_callback) {


remove fluff

remove fluff

--- include/global.h
+++ include/global.h
@@ -89,9 +89,6 @@
 const int		MinY = 192;
 const int		NoMotionSize =	10;		// no motion zone size
 const int		MaxMotionSize = 37;		// motion zone size
-const float		RadarLowRangeFactor =	0.25f;// low radar range
-const float		RadarMedRangeFactor =	0.5f;	// medium radar range
-const float		RadarHiRangeFactor =	1.0f;	// high radar range

 // game styles
 enum GameStyle {


Don't hard-code a buffer size

Don't hard-code a buffer size

--- libexec/atrun/atrun.c
+++ libexec/atrun/atrun.c
@@ -209,7 +209,8 @@

     fcntl(fd_in, F_SETFD, fflags & ~FD_CLOEXEC);

-    snprintf(fmt, 49, "#!/bin/sh\n# atrun uid=%%ld gid=%%ld\n# mail %%%ds %%d",
+    snprintf(fmt, sizeof(fmt),
+	"#!/bin/sh\n# atrun uid=%%ld gid=%%ld\n# mail %%%ds %%d",
                           LOGNAMESIZE);
     if (fscanf(stream, fmt, &nuid, &ngid, mailbuf, &send_mail) != 4) {
 	syslog(LOG_ERR,"File %s is in wrong format - aborting", filename);


kernel: improve k_thread_user_mode_enter() docs

Note the stack and TLS wipe when this function runs.

Signed-off-by: Andrew Boie <aab045b28152628be6af0e556050d0381fd0a34d@intel.com>

--- include/kernel.h
+++ include/kernel.h
@@ -558,6 +558,19 @@
 /**
  * @brief Drop a thread's privileges permanently to user mode
  *
+ * This allows a supervisor thread to be re-used as a user thread.
+ * This function does not return, but control will transfer to the provided
+ * entry point as if this was a new user thread.
+ *
+ * The implementation ensures that the stack buffer contents are erased.
+ * Any thread-local storage will be reverted to a pristine state.
+ *
+ * Memory domain membership, resource pool assignment, kernel object
+ * permissions, priority, and thread options are preserved.
+ *
+ * A common use of this function is to re-use the main thread as a user thread
+ * once all supervisor mode-only tasks have been completed.
+ *
  * @param entry Function to start executing from
  * @param p1 1st entry point parameter
  * @param p2 2nd entry point parameter


Cleaned and reorganized COPersistentRoot private API

--- Core/COPersistentRoot+Private.h
+++ Core/COPersistentRoot+Private.h
@@ -18,14 +18,12 @@

 @interface COPersistentRoot ()

-/** @taskunit Framework Private */

-@property (nonatomic, readwrite, assign) int64_t lastTransactionID;
+/** @taskunit Initialization */
+

 /**
  * <init />
- * This method is only exposed to be used internally by CoreObject.
- *
  * If info is nil, creates a new persistent root.
  *
  * cheapCopyRevisionID is normally nil, and only set to create a cheap copy.
@@ -38,9 +36,14 @@
           objectGraphContext: (nullable COObjectGraphContext *)anObjectGraphContext
                parentContext: (COEditingContext *)aCtxt NS_DESIGNATED_INITIALIZER;

+@property (nonatomic, readonly, strong) COPersistentRootInfo *persistentRootInfo;
+@property (nonatomic, readonly, getter=isPersistentRootUncommitted) BOOL persistentRootUncommitted;
+
+
+/** @taskunit Committing Changes */
+
+
 /**
- * This method is only exposed to be used internally by CoreObject.
- *
  * Commits the current changes to the store with the provided metadatas and
  * returns the resulting revision.
  *
@@ -49,16 +52,12 @@
  */
 - (BOOL)commitWithMetadata: (nullable NSDictionary<NSString *, id> *)metadata;
 /**
- * This method is only exposed to be used internally by CoreObject.
- *
  * Extracts the current changes, saves them to the store with the provided
  * metadatas and returns the resulting revision.
  */
 - (void)saveCommitWithMetadata: (nullable NSDictionary<NSString *, id> *)metadata
                    transaction: (COStoreTransaction *)txn;
 /**
- * This method is only exposed to be used internally by CoreObject.
- *
  * We must clear the branch status as late as possible to ensure the
  * deserialization code can decide whether references to another persistent root
  * are alive or dead at any time during the commit.
@@ -78,40 +77,47 @@
  * coherent view until the store transaction is constructed.
  */
 - (void)clearBranchesPendingDeletionAndUndeletion;
-@property (nonatomic, readonly, strong) COPersistentRootInfo *persistentRootInfo;
-
 - (void)didMakeNewCommit;

-- (COBranch *)makeBranchWithLabel: (NSString *)aLabel
-                       atRevision: (CORevision *)aRev
-                     parentBranch: (COBranch *)aParent;

-- (COBranch *)makeBranchWithUUID: (ETUUID *)aUUID
-                        metadata: (nullable NSDictionary<NSString *, id> *)metadata
-                      atRevision: (CORevision *)aRev
-                    parentBranch: (COBranch *)aParent;
+/** @taskunit Branches */

-@property (nonatomic, readonly, getter=isPersistentRootUncommitted) BOOL persistentRootUncommitted;
-
-- (void)storePersistentRootDidChange: (NSNotification *)notif isDistributed: (BOOL)isDistributed;
-
-- (void)sendChangeNotification;

 /**
  * This property is only exposed to be used internally by CoreObject.
  */
 @property (nonatomic, readonly) NSSet<COBranch *> *allBranches;

+- (COBranch *)makeBranchWithLabel: (NSString *)aLabel
+                       atRevision: (CORevision *)aRev
+                     parentBranch: (COBranch *)aParent;
+- (COBranch *)makeBranchWithUUID: (ETUUID *)aUUID
+                        metadata: (nullable NSDictionary<NSString *, id> *)metadata
+                      atRevision: (CORevision *)aRev
+                    parentBranch: (COBranch *)aParent;
 - (void)deleteBranch: (COBranch *)aBranch;
 - (void)undeleteBranch: (COBranch *)aBranch;
-/**
- * This method is only exposed to be used internally by CoreObject.
- */
+
+
+/** @taskunit Notifications */
+
+
+- (void)storePersistentRootDidChange: (NSNotification *)notif isDistributed: (BOOL)isDistributed;
+- (void)sendChangeNotification;
+
+
+/** @taskunit Transaction ID */
+
+
+@property (nonatomic, readwrite, assign) int64_t lastTransactionID;
+
+
+/** @taskunit Zombie Status */
+
+
 - (void)assertNotZombie;
-/**
- * This method is only exposed to be used internally by CoreObject.
- */
 - (void)makeZombie;
+
 @end

 NS_ASSUME_NONNULL_END


build/freqmod: extending line width for more compact header with comment apis

--- include/liquid.h
+++ include/liquid.h
@@ -6434,39 +6434,42 @@
 //  FREQMOD :   name-mangling macro
 //  T       :   primitive data type
 //  TC      :   primitive data type (complex)
-#define LIQUID_FREQMOD_DEFINE_API(FREQMOD,T,TC)                 \
-typedef struct FREQMOD(_s) * FREQMOD();                         \
-                                                                \
-/* create freqmod object (frequency modulator)              */  \
-/*  _kf     :   modulation factor                           */  \
-FREQMOD() FREQMOD(_create)(float _kf);                          \
-                                                                \
-/* destroy freqmod object                                   */  \
-void FREQMOD(_destroy)(FREQMOD() _q);                           \
-                                                                \
-/* print freqmod object internals                           */  \
-void FREQMOD(_print)(FREQMOD() _q);                             \
-                                                                \
-/* reset state                                              */  \
-void FREQMOD(_reset)(FREQMOD() _q);                             \
-                                                                \
-/* modulate single sample                                   */  \
-/*  _q      :   frequency modulator object                  */  \
-/*  _m      :   message signal m(t)                         */  \
-/*  _s      :   complex baseband signal s(t)                */  \
-void FREQMOD(_modulate)(FREQMOD() _q,                           \
-                        T         _m,                           \
-                        TC *      _s);                          \
-                                                                \
-/* modulate block of samples                                */  \
-/*  _q      :   frequency modulator object                  */  \
-/*  _m      :   message signal m(t), [size: _n x 1]         */  \
-/*  _n      :   number of input, output samples             */  \
-/*  _s      :   complex baseband signal s(t) [size: _n x 1] */  \
-void FREQMOD(_modulate_block)(FREQMOD()    _q,                  \
-                              T *          _m,                  \
-                              unsigned int _n,                  \
-                              TC *         _s);                 \
+#define LIQUID_FREQMOD_DEFINE_API(FREQMOD,T,TC)                             \
+                                                                            \
+/* Analog frequency modulation object                                   */  \
+typedef struct FREQMOD(_s) * FREQMOD();                                     \
+                                                                            \
+/* Create freqmod object with a particular modulation factor            */  \
+/*  _kf :   modulation factor                                           */  \
+FREQMOD() FREQMOD(_create)(float _kf);                                      \
+                                                                            \
+/* Destroy freqmod object, freeing all internal memory                  */  \
+void FREQMOD(_destroy)(FREQMOD() _q);                                       \
+                                                                            \
+/* Print freqmod object internals to stdout                             */  \
+void FREQMOD(_print)(FREQMOD() _q);                                         \
+                                                                            \
+/* Reset state                                                          */  \
+void FREQMOD(_reset)(FREQMOD() _q);                                         \
+                                                                            \
+/* Modulate single sample, producing single output sample at complex    */  \
+/* baseband.                                                            */  \
+/*  _q  : frequency modulator object                                    */  \
+/*  _m  : message signal \( m(t) \)                                     */  \
+/*  _s  : complex baseband signal \( s(t) \)                            */  \
+void FREQMOD(_modulate)(FREQMOD() _q,                                       \
+                        T         _m,                                       \
+                        TC *      _s);                                      \
+                                                                            \
+/* Modulate block of samples                                            */  \
+/*  _q  : frequency modulator object                                    */  \
+/*  _m  : message signal \( m(t) \), [size: _n x 1]                     */  \
+/*  _n  : number of input, output samples                               */  \
+/*  _s  : complex baseband signal \( s(t) \),  [size: _n x 1]           */  \
+void FREQMOD(_modulate_block)(FREQMOD()    _q,                              \
+                              T *          _m,                              \
+                              unsigned int _n,                              \
+                              TC *         _s);                             \

 // define freqmod APIs
 LIQUID_FREQMOD_DEFINE_API(LIQUID_FREQMOD_MANGLE_FLOAT,float,liquid_float_complex)


Remove all unneccessary comments and lines of codes.

--- copasi/UI/CQModelValue.ui.h
+++ copasi/UI/CQModelValue.ui.h
@@ -1,9 +1,9 @@
 // Begin CVS Header
 //   $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/UI/Attic/CQModelValue.ui.h,v $
-//   $Revision: 1.25 $
+//   $Revision: 1.26 $
 //   $Name:  $
-//   $Author: shoops $
-//   $Date: 2008/04/23 17:42:50 $
+//   $Author: pwilly $
+//   $Date: 2008/05/19 08:34:13 $
 // End CVS Header

 // Copyright (C) 2008 by Pedro Mendes, Virginia Tech Intellectual
@@ -41,14 +41,12 @@
  */
 void CQModelValue::slotBtnCommit()
 {
-  std::cout << "CQMV::slotBtnCommit()" << std::endl;
   save();
   load();
 }

 void CQModelValue::slotBtnRevert()
 {
-  std::cout << "CQMV::slotBtnRevert()" << std::endl;
   load();
 }

@@ -235,22 +233,16 @@
  */
 void CQModelValue::slotTypeChanged(int type)
 {
-  std::cout << "CWMV::slotTypeChanged" << std::endl;
   switch ((CModelEntity::Status) mItemToType[type])
     {
     case CModelEntity::FIXED:
       // remove expression layout from GUI screen
-      //      CQModelValueLayout->removeItem(mpHBoxLayoutExpression);
-      //      CQModelValueLayout->remove(mpExpressionEMW);
       CQModelValueLayout->remove(mpLblExpression);

       // hide label, widget, and all buttons
       mpLblExpression->hide();
-      //      mpEditExpression->hide();
       mpExpressionEMW->hide();
-      /*      mpBtnExpressionObject->hide();
-            mpBtnEditExpression->hide();
-      */
+
       // enable the option of use Initial Expression
       mpBoxUseInitialExpression->setEnabled(true);
       slotInitialTypeChanged(mpBoxUseInitialExpression->isChecked());
@@ -262,21 +254,16 @@
     case CModelEntity::ASSIGNMENT:
       // add expression layout
       CQModelValueLayout->addWidget(mpLblExpression, 2, 0);
-      //      CQModelValueLayout->addMultiCellLayout(mpHBoxLayoutExpression, 2, 2, 1, 2);
-      //      CQModelValueLayout->addWidget(mpExpressionEMW, 2, 1);

       // show label, widget, and correct buttons
       mpLblExpression->show();   // show the label
-      //      mpEditExpression->show();  // show the widget
       mpExpressionEMW->show();  // show the widget
-      //      showCorrectButtonsExpression(); // depending on emptiness the Expression Widget

       // disable the option of use Initial Expression
       mpBoxUseInitialExpression->setEnabled(false);
       slotInitialTypeChanged(false);

       // update the expression widget
-      //      mpEditExpression->updateExpressionWidget();
       mpExpressionEMW->updateWidget();

       break;
@@ -284,21 +271,16 @@
     case CModelEntity::ODE:
       // add expression layout
       CQModelValueLayout->addWidget(mpLblExpression, 2, 0);
-      //      CQModelValueLayout->addMultiCellLayout(mpHBoxLayoutExpression, 2, 2, 1, 2);
-      //      CQModelValueLayout->addWidget(mpExpressionEMW, 2, 1);

       // show label, widget, and correct buttons
       mpLblExpression->show();   // show the label
-      //      mpEditExpression->show();
       mpExpressionEMW->show();  // show the widget
-      //      showCorrectButtonsExpression(); // depending on emptiness the Expression Widget

       // enable the option of use Initial Expression
       mpBoxUseInitialExpression->setEnabled(true);
       slotInitialTypeChanged(mpBoxUseInitialExpression->isChecked());

       // update the expression widget
-      //      mpEditExpression->updateExpressionWidget();
       mpExpressionEMW->updateWidget();

       break;
@@ -313,18 +295,14 @@
  */
 void CQModelValue::slotExpressionValid(bool valid)
 {
-  std::cout << "CQMV::slotExpressionValid -valid: " << valid << std::endl;
   mExpressionValid = valid;
   mpBtnCommit->setEnabled(mExpressionValid && mInitialExpressionValid);
-  std::cout << "1 mExpressionValid && mInitialExpressionValid = " << (mExpressionValid && mInitialExpressionValid) << std::endl;
 }

 void CQModelValue::slotInitialExpressionValid(bool valid)
 {
-  std::cout << "CQMV::slotInitialExpressionValid - valid: " << valid << std::endl;
   mInitialExpressionValid = valid;
   mpBtnCommit->setEnabled(mExpressionValid && mInitialExpressionValid);
-  std::cout << "2 mExpressionValid && mInitialExpressionValid = " << (mExpressionValid && mInitialExpressionValid) << std::endl;
 }

 void CQModelValue::init()
@@ -341,13 +319,9 @@
   mItemToType.push_back(CModelEntity::ODE);

   mExpressionValid = false;
-  //  mpEditExpression->setExpressionType(CCopasiSimpleSelectionTree::TRANSIENT_EXPRESSION);
-  //  ((CQExpressionWidget *)mpEditExpression->widget(0))->setExpressionType(CCopasiSimpleSelectionTree::TRANSIENT_EXPRESSION);
   mpExpressionEMW->mpExpressionWidget->setExpressionType(CCopasiSimpleSelectionTree::TRANSIENT_EXPRESSION);

   mInitialExpressionValid = false;
-  //  mpEditInitialExpression->setExpressionType(CCopasiSimpleSelectionTree::INITIAL_EXPRESSION);
-  //  ((CQExpressionWidget *)mpEditInitialExpression->widget(0))->setExpressionType(CCopasiSimpleSelectionTree::TRANSIENT_EXPRESSION);
   mpInitialExpressionEMW->mpExpressionWidget->setExpressionType(CCopasiSimpleSelectionTree::TRANSIENT_EXPRESSION);
 }

@@ -363,34 +337,17 @@

 bool CQModelValue::leave()
 {
-  std::cout << "CQMV::leave" << std::endl;
-
   if (mpBtnCommit->isEnabled())
     {
       if ((CModelEntity::Status) mItemToType[mpComboBoxType->currentItem()] != CModelEntity::FIXED)
         {
           // -- Expression --
-          //      slotTypeChanged(mpComboBoxType->currentItem());
-          //          showCorrectButtonsExpression();
-          /*      // hide the button of object selector
-                mpBtnExpressionObject->hide();
-                // show the button of expression editor
-                mpBtnEditExpression->show();
-          */      // update the expression widget
-          //          mpEditExpression->updateExpressionWidget();
           mpExpressionEMW->updateWidget();
         }

       if (mpBoxUseInitialExpression->isChecked())
         {
           // -- Initial Expression --
-          //          showCorrectButtonsInitialExpression();
-          /*      // hide the button of object selector
-                mpBtnInitialExpressionObject->hide();
-                // show the button of expression editor
-                mpBtnEditInitialExpression->show();
-          */      // update the expression widget
-          //          mpEditInitialExpression->updateExpressionWidget();
           mpInitialExpressionEMW->updateWidget();
         }

@@ -402,7 +359,6 @@

 bool CQModelValue::enter(const std::string & key)
 {
-  std::cout << "CQMV::enter(_)" << std::endl;
   mKey = key;
   mpModelValue = dynamic_cast< CModelValue * >(GlobalKeys.get(key));

@@ -421,7 +377,6 @@
  */
 void CQModelValue::load()
 {
-  std::cout << "CQMV::load" << std::endl;
   if (mpModelValue == NULL) return;

   // Name
@@ -440,90 +395,16 @@
   mpEditRate->setText(QString::number(mpModelValue->getRate()));

   // Expression
-  //  mpEditExpression->setExpression(mpModelValue->getExpression());
-  //  ((CQExpressionWidget *)mpEditExpression->widget(0))->setExpression(mpModelValue->getExpression());
   mpExpressionEMW->mpExpressionWidget->setExpression(mpModelValue->getExpression());
-  //  std::cout << "EXP: " << ((CQExpressionWidget *)mpEditExpression->widget(0))->getExpression() << std::endl;
-  std::cout << "EXP: " << mpExpressionEMW->mpExpressionWidget->getExpression() << std::endl;
   slotTypeChanged(mpComboBoxType->currentItem());
-  /*
-    // Update Button correlated to Expression Widget
-    if (((CQExpressionWidget *)mpEditFcnExpression->widget(0))->text().isEmpty())
-      {
-        std::cout << "empty" << std::endl;
-
-        if (((CModelEntity::Status) mItemToType[mpComboBoxType->currentItem()]) == CModelEntity::FIXED)
-          {
-            std::cout << "simulation type: fixed - " << mpComboBoxType->currentItem() << std::endl;
-            // activate the button of object selector
-            mpBtnExpressionObject->hide();
-            // hide the button of expression editor
-            mpBtnEditExpression->hide();
-          }
-        else
-          {// other types
-            std::cout << "simulation type: " << mpComboBoxType->currentItem() << std::endl;
-            // show the button of object selector
-            mpBtnExpressionObject->show();
-            // hide the button of expression editor
-            mpBtnEditExpression->hide();
-          }
-      }
-    else
-      {// not empty
-        std::cout << "not empty" << std::endl;
-        // hide the button of object selector
-        mpBtnExpressionObject->hide();
-        // show the button of expression editor
-        mpBtnEditExpression->show();
-      }
-  */
+
   // Update Expression Widget
-  //  mpEditExpression->updateExpressionWidget();
   mpExpressionEMW->updateWidget();

   // Initial Expression
-  //  mpEditInitialExpression->setExpression(mpModelValue->getInitialExpression());
-  //  ((CQExpressionWidget *)mpEditInitialExpression->widget(0))->setExpression(mpModelValue->getInitialExpression());
   mpInitialExpressionEMW->mpExpressionWidget->setExpression(mpModelValue->getInitialExpression());
-  //  std::cout << "INIT EXP: " << mpModelValue->getInitialExpression() << " vs "
-  //            << ((CQExpressionWidget *)mpEditInitialExpression->widget(0))->getExpression() << std::endl;
-  //  std::cout << "INIT EXP: " << ((CQExpressionWidget *)mpEditInitialExpression->widget(0))->getExpression() << std::endl;
-  std::cout << "INIT EXP: " << mpInitialExpressionEMW->mpExpressionWidget->getExpression() << std::endl;
-  /*
-    // Update Button correlated to Initial Expression Widget
-    if (((CQExpressionWidget *)mpEditFcnInitialExpression->widget(0))->text().isEmpty())
-      {
-        std::cout << "initial empty" << std::endl;
-
-        if (mpBoxUseInitialExpression->isChecked())
-          {
-            std::cout << "mpBoxUseInitialExpression->isChecked(): " << mpBoxUseInitialExpression->isChecked() << std::endl;
-            // show the button of object selector
-            mpBtnInitialExpressionObject->show();
-            // hide the button of expression editor
-            mpBtnEditInitialExpression->hide();
-          }
-        else
-          {// not checked
-            std::cout << "mpBoxUseInitialExpression->isChecked(): " << mpBoxUseInitialExpression->isChecked() << std::endl;
-            // hide the button of object selector
-            mpBtnInitialExpressionObject->hide();
-            // hide the button of expression editor
-            mpBtnEditInitialExpression->hide();
-          }
-      }
-    else // not empty
-      {
-        std::cout << "not empty" << std::endl;
-        // hide the button of object selector
-        mpBtnInitialExpressionObject->hide();
-        // show the button of expression editor
-        mpBtnEditInitialExpression->show();
-      }
-  */
+
   // Update Initial Expression Widget
-  //  mpEditInitialExpression->updateExpressionWidget();
   mpInitialExpressionEMW->updateWidget();

   // Use Initial Expression
@@ -547,8 +428,6 @@
  */
 void CQModelValue::save()
 {
-  std::cout << "CQMV::save" << std::endl;
-
   if (mpModelValue == NULL) return;

   // set name of quantitiy
@@ -590,14 +469,6 @@
     }

   // set expression
-  /*
-    if (mpModelValue->getExpression() != mpEditExpression->getExpression())
-      {
-        mpModelValue->setExpression(mpEditExpression->getExpression());
-        mChanged = true;
-      }
-  */
-  //  if (mpModelValue->getExpression() != ((CQExpressionWidget *)mpEditExpression->widget(0))->getExpression())
   if (mpModelValue->getExpression() != mpExpressionEMW->mpExpressionWidget->getExpression())
     {
       //      mpModelValue->setExpression(((CQExpressionWidget *)mpEditExpression->widget(0))->getExpression());
@@ -608,18 +479,9 @@
   // set initial expression
   if ((CModelEntity::Status) mItemToType[mpComboBoxType->currentItem()] != CModelEntity::ASSIGNMENT)
     {
-      /*  if (mpBoxUseInitialExpression->isChecked() &&
-            mpModelValue->getInitialExpression() != mpEditInitialExpression->getExpression())
-          {
-            mpModelValue->setInitialExpression(mpEditInitialExpression->getExpression());
-            mChanged = true;
-          }
-      */
       if (mpBoxUseInitialExpression->isChecked() &&
-          //          mpModelValue->getInitialExpression() != ((CQExpressionWidget *)mpEditInitialExpression->widget(0))->getExpression())
           mpModelValue->getInitialExpression() != mpInitialExpressionEMW->mpExpressionWidget->getExpression())
         {
-          //          mpModelValue->setInitialExpression(((CQExpressionWidget *)mpEditInitialExpression->widget(0))->getExpression());
           mpModelValue->setInitialExpression(mpInitialExpressionEMW->mpExpressionWidget->getExpression());
           mChanged = true;
         }
@@ -643,8 +505,7 @@
 void CQModelValue::slotNameLostFocus()
 {
   if (mpEditName->text() != FROM_UTF8(mpModelValue->getObjectName()))
-  {}
-}
+    {}}

 /*!
     If the initial expression is chosen to be used by checking the mpBoxUseInitialExpression check box being represented by
@@ -653,47 +514,29 @@
  */
 void CQModelValue::slotInitialTypeChanged(bool useInitialAssignment)
 {
-  std::cout << "CWMV::slotInitialTypeChanged" << std::endl;
-
   if (useInitialAssignment)  // use Initial Expression (ie. the mpBoxUseInitialExpression is checked)
     {
       // add the layout of initial expression to the CQModelValueLayout
       CQModelValueLayout->addWidget(mpLblInitialExpression, 4, 0);
-      //      CQModelValueLayout->addMultiCellLayout(mpHBoxLayoutInitialExpression, 4, 4, 1, 2);
-      //      CQModelValueLayout->addWidget(mpInitialExpressionEMW, 4, 1);

       // show label, widget, and the correct buttons
       mpLblInitialExpression->show();  // show the label
-      //  mpEditInitialExpression->show();
-      //      mpEditInitialExpression->show(); // show the widget
       mpInitialExpressionEMW->show(); // show the widget
-      /*   mpBtnEditInitialExpression->hide();
-            mpBtnInitialExpressionObject->show();
-      */
-
-      //      showCorrectButtonsInitialExpression();

       // enable the option of use Initial Value
       mpEditInitialValue->setEnabled(false);

       // update the Initial Expression Widget
-      //      mpEditInitialExpression->updateExpressionWidget();
       mpInitialExpressionEMW->updateWidget();
     }
   else  // mpBoxUseInitialExpression is not checked
     {
       // remove the layout of initial expression from GUI screen
-      //      CQModelValueLayout->removeItem(mpHBoxLayoutInitialExpression);
       CQModelValueLayout->remove(mpLblInitialExpression);
-      //      CQModelValueLayout->remove(mpInitialExpressionEMW);

       // hide label, widget, and all buttons
       mpLblInitialExpression->hide();
-      // mpEditInitialExpression->hide();
-      //      mpEditInitialExpression->hide();
       mpInitialExpressionEMW->hide();
-      //      mpBtnEditInitialExpression->hide();
-      //      mpBtnInitialExpressionObject->hide();

       // enable the option of use Initial Value
       mpEditInitialValue->setEnabled((CModelEntity::Status) mItemToType[mpComboBoxType->currentItem()] != CModelEntity::ASSIGNMENT);


modem: declaring specific types in global header

--- include/liquid.h
+++ include/liquid.h
@@ -2833,19 +2833,39 @@

 // Modulation schemes available
 #define LIQUID_MODEM_NUM_SCHEMES      (19)  // generic schemes (e.g. 'qam')
-#define LIQUID_MODEM_NUM_FULL_SCHEMES (51)  // specific schemes (e.g. 'qam256')
+#define LIQUID_MODEM_NUM_FULL_SCHEMES (52)  // specific schemes (e.g. 'qam256')
 typedef enum {
     LIQUID_MODEM_UNKNOWN=0, // Unknown modulation scheme

-    // generic modem types
-    LIQUID_MODEM_PSK,       // Phase-shift keying (PSK)
-    LIQUID_MODEM_DPSK,      // differential PSK
-    LIQUID_MODEM_ASK,       // amplitude-shift keying
-    LIQUID_MODEM_QAM,       // quadrature amplitude-shift keying (QAM)
-    LIQUID_MODEM_APSK,      // amplitude phase-shift keying (APSK)
-
-    // arbitrary modem types
-    LIQUID_MODEM_ARB,       // arbitrary QAM
+    // Phase-shift keying (PSK)
+    LIQUID_MODEM_PSK2,      LIQUID_MODEM_PSK4,
+    LIQUID_MODEM_PSK8,      LIQUID_MODEM_PSK16,
+    LIQUID_MODEM_PSK32,     LIQUID_MODEM_PSK64,
+    LIQUID_MODEM_PSK128,    LIQUID_MODEM_PSK256,
+
+    // Differential phase-shift keying (DPSK)
+    LIQUID_MODEM_DPSK2,     LIQUID_MODEM_DPSK4,
+    LIQUID_MODEM_DPSK8,     LIQUID_MODEM_DPSK16,
+    LIQUID_MODEM_DPSK32,    LIQUID_MODEM_DPSK64,
+    LIQUID_MODEM_DPSK128,   LIQUID_MODEM_DPSK256,
+
+    // amplitude-shift keying
+    LIQUID_MODEM_ASK2,      LIQUID_MODEM_ASK4,
+    LIQUID_MODEM_ASK8,      LIQUID_MODEM_ASK16,
+    LIQUID_MODEM_ASK32,     LIQUID_MODEM_ASK64,
+    LIQUID_MODEM_ASK128,    LIQUID_MODEM_ASK256,
+
+    // rectangular quadrature amplitude-shift keying (QAM)
+    LIQUID_MODEM_QAM4,
+    LIQUID_MODEM_QAM8,      LIQUID_MODEM_QAM16,
+    LIQUID_MODEM_QAM32,     LIQUID_MODEM_QAM64,
+    LIQUID_MODEM_QAM128,    LIQUID_MODEM_QAM256,
+
+    // amplitude phase-shift keying (APSK)
+    LIQUID_MODEM_APSK4,
+    LIQUID_MODEM_APSK8,     LIQUID_MODEM_APSK16,
+    LIQUID_MODEM_APSK32,    LIQUID_MODEM_APSK64,
+    LIQUID_MODEM_APSK128,   LIQUID_MODEM_APSK256,

     // specific modem types
     LIQUID_MODEM_BPSK,      // Specific: binary PSK
@@ -2859,7 +2879,10 @@
     LIQUID_MODEM_ARB64OPT,  // optimal 64-QAM
     LIQUID_MODEM_ARB128OPT, // optimal 128-QAM
     LIQUID_MODEM_ARB256OPT, // optimal 256-QAM
-    LIQUID_MODEM_ARB64VT    // Virginia Tech logo
+    LIQUID_MODEM_ARB64VT,   // Virginia Tech logo
+
+    // arbitrary modem type
+    LIQUID_MODEM_ARB        // arbitrary QAM
 } modulation_scheme;

 // Modulation scheme string for printing purposes


Added message for XML packages reporting the existence of an unknown task type.

--- copasi/utilities/messages.h
+++ copasi/utilities/messages.h
@@ -1,9 +1,9 @@
 /* Begin CVS Header
    $Source: /Volumes/Home/Users/shoops/cvs/copasi_dev/copasi/utilities/messages.h,v $
-   $Revision: 1.16 $
+   $Revision: 1.17 $
    $Name:  $
    $Author: shoops $
-   $Date: 2005/01/05 18:02:28 $
+   $Date: 2005/02/24 19:36:30 $
    End CVS Header */

 MESSAGES Messages[] =
@@ -67,8 +67,9 @@
     // XML Package
     {MCXML + 1, "XML (1): Required attribute '%s' not found (line: '%d')."},
     {MCXML + 2, "XML (2): XML error (line: '%d', column: '%d'): '%s'."},
-    {MCXML + 3, "XML (3): Unknown Element '%s' encountered at line '%d'."},
-    {MCXML + 4, "XML (4): Unknown Parameter '%s' encountered at line '%d'."},
+    {MCXML + 3, "XML (3): Unknown element '%s' encountered at line '%d'."},
+    {MCXML + 4, "XML (4): Unknown parameter '%s' encountered at line '%d'."},
+    {MCXML + 5, "XML (5): Unknown task type '%s' encountered at line '%d'."},

     // CCopasiMessage
     {MCCopasiMessage + 1, "Message (1): No more messages."},


minor formatting

minor formatting

--- include/object.h
+++ include/object.h
@@ -77,7 +77,6 @@
 		};
 #pragma endregion

-
 #pragma region instance variables
 	private:
 		/*the std::type::info for the runtime host class this std::type represents*/
@@ -88,7 +87,6 @@
 		std::vector<info> _protocols;
 #pragma endregion

-
 #pragma region properties
 	public:
 		/*returns the std::type::info for the host class*/
@@ -97,12 +95,10 @@
 		inline const type &get_base_type() const { return *_base; }
 #pragma endregion

-
 #pragma region constructors
 	private:
 		type(const info &type_info, const std::shared_ptr<type> &base) : _info(type_info), _base(base) {}
 #pragma endregion
-

 #pragma region public methods
 	public:
@@ -129,7 +125,6 @@
 		}
 #pragma endregion

-
 #pragma region operator overloads
 	public:
 		inline bool operator==(const type &other) { return _info == other._info; }
@@ -137,7 +132,6 @@
 		inline bool operator==(const type &other) const { return _info == other._info; }
 		inline bool operator!=(const type &other) const { return _info != other._info; }
 #pragma endregion
-

 #pragma region friends
 		friend object;
@@ -163,6 +157,7 @@
 	/*short hand helper for extending std::object as the base*/
 #define ROOT_BASE public std::object

+
 	/*the root base class of all typed classes*/
 	class object {
 #pragma region instance variables
@@ -171,13 +166,11 @@
 		std::shared_ptr<type> _type;
 #pragma endregion

-
 #pragma region constructors
 	public:
 		object() { __reg_type<object>(); }
 		virtual ~object() {}
 #pragma endregion
-

 #pragma region protected methods
 	protected:
@@ -198,8 +191,7 @@
 			}
 		}
 #pragma endregion
-
-
+
 #pragma region public methods
 	public:
 		/*returns true if this class is an instance of the provided object*/
@@ -216,7 +208,6 @@
 #pragma endregion
 	};

-
 #define PROTOCOL(p_name) class p_name {protected:p_name(){}public
 #define PROTOEND };


finish commenting BBTooltip changes

finish commenting BBTooltip changes

--- BBFrameworks/BBTooltip/BBTooltipViewController.h
+++ BBFrameworks/BBTooltip/BBTooltipViewController.h
@@ -60,14 +60,42 @@

 @end

+/**
+ Typedef for tooltip present completion block. This will be invoked once the tooltip view controller has finished its present animation.
+ */
 typedef void(^BBTooltipPresentCompletionBlock)(void);
+/**
+ Typedef for tooltip dismiss completion block. This will be invoked once the tooltip view controller has finished its dismiss animation.
+ */
 typedef void(^BBTooltipDismissCompletionBlock)(void);

+/**
+ Tooltip attribute for displaying using a custom tooltip view controller class.
+ */
 extern NSString *const BBTooltipAttributeViewControllerClass;
+/**
+ Tooltip attribute for displaying using a custom attachment view bounds. The bounds should be relative to the attachment view bounds.
+ */
 extern NSString *const BBTooltipAttributeAttachmentViewBounds;
+/**
+ Tooltip attribute for displaying using a custom arrow style.
+ */
 extern NSString *const BBTooltipAttributeArrowStyle;
+/**
+ Tooltip attribute for displaying using a accessory view. The accessory view should conform to BBTooltipAccessoryView.
+ */
 extern NSString *const BBTooltipAttributeAccessoryView;
+/**
+ Tooltip attribute for providing a present completion block.
+
+ @see BBTooltipPresentCompletionBlock
+ */
 extern NSString *const BBTooltipAttributePresentCompletionBlock;
+/**
+ Tooltip attribute for providing a dismiss completion block.
+
+ @see BBTooltipDismissCompletionBlock
+ */
 extern NSString *const BBTooltipAttributeDismissCompletionBlock;

 /**
@@ -75,7 +103,21 @@
  */
 @interface UIViewController (BBTooltipViewControllerExtensions)

+/**
+ Present a tooltip view controller with the provided text, attached to attachmentView, configured with attributes.
+
+ @param text The text of the tooltip
+ @param attachmentView The attachment view of the tooltip
+ @param attributes Additional attributes used to configure the tooltip
+ */
 - (void)BB_presentTooltipViewControllerWithText:(NSString *)text attachmentView:(UIView *)attachmentView attributes:(NSDictionary *)attributes;
+/**
+ Present a tooltip view controller with the provided attributedText, attached to attachmentView, configured with attributes.
+
+ @param attributedText The attributed text of the tooltip
+ @param attachmentView The attachment view of the tooltip
+ @param attributes Additional attributes used to configure the tooltip
+ */
 - (void)BB_presentTooltipViewControllerWithAttributedText:(NSAttributedString *)attributedText attachmentView:(UIView *)attachmentView attributes:(NSDictionary *)attributes;

 @end


core: rdp_free should free the ->net it owns

(also changes the "free" order to be the opposite of "new" order)

--- libfreerdp-core/rdp.c
+++ libfreerdp-core/rdp.c
@@ -1776,12 +1776,13 @@
 	if (rdp != NULL)
 	{
 		freerdp_uniconv_free(rdp->uniconv);
+		ext_free(rdp->ext);
 		cache_free(rdp->cache);
 		pcache_free(rdp->pcache);
 		orders_free(rdp->orders);
+		network_free(rdp->net);
+		sec_free(rdp->sec);
 		xfree(rdp->buffer);
-		sec_free(rdp->sec);
-		ext_free(rdp->ext);
 		xfree(rdp->redirect_server);
 		xfree(rdp->redirect_routingtoken);
 		xfree(rdp->redirect_username);


[FIX] Checking exact alignment columns for overlaps in Stellar.

git-svn-id: a7f2a8f7432d210e972fb03898013d213e2b549b@13270 e6417c60-b987-48fd-844e-b20f0fcc1017

--- core/apps/stellar/stellar.h
+++ core/apps/stellar/stellar.h
@@ -270,6 +270,36 @@
 	return true;
 }

+template<typename TRow, typename TPosition>
+TPosition
+projectedPosition(TRow & rowA, TRow & rowB, TPosition pos)
+{
+    return toSourcePosition(rowA, toViewPosition(rowB, pos));
+}
+
+///////////////////////////////////////////////////////////////////////////////
+// Checks all alignment columns of two overlapping matches.
+// It is assumed that matchA.begin1 < matchB.begin1.
+template<typename TMatch, typename TSize>
+bool
+_checkAlignColOverlap(TMatch & matchA, TMatch & matchB, TSize minLength)
+{
+    TSize equalCols = 0;
+    TSize diffCols = 0;
+
+    for  (typename TMatch::TPos pos = matchB.begin1; pos < _min(matchA.end1, matchB.end1); ++pos)
+    {
+        if (projectedPosition(matchA.row1, matchA.row2, pos) == projectedPosition(matchB.row1, matchB.row2, pos))
+            ++equalCols;
+        else
+            ++diffCols;
+    }
+
+    // TODO: This criterium has to be revisited
+    if (diffCols >= minLength || equalCols/(equalCols+diffCols) < 0.95) return false;
+    return true;
+}
+
 ///////////////////////////////////////////////////////////////////////////////
 // Marks matches that overlap in both sequences with a longer match as invalid.
 template<typename TSequence, typename TId, typename TSize>
@@ -316,7 +346,8 @@
             // check if matches overlap in row1 - if not, then continue
             if (!checkOverlap(*it, o, minLength)) continue;

-            // (TODO: check exact align col overlap)
+            // check exact alignment columns for overlap
+            if (!_checkAlignColOverlap(o, *it, minLength)) continue;

             // set shorter match invalid
             if (length(*it) > length(o))


portab.h fixed for Mac

portab.h fixed for Mac

For some reason nullptr caused problem in some source files, not others, on the Mac with g++.
It seems more general anyway to test for existence than for __clang__.

--- include/portab.h
+++ include/portab.h
@@ -52,12 +52,16 @@
 #endif

-// In C++11 UNUSED(x) is explicitly provided
+// http://stackoverflow.com/a/4030983/211160
+// Use to indicate a variable is being intentionally not referred to (which
+// usually generates a compiler warning)
+#ifndef UNUSED
+#define UNUSED(x) ((void)(true ? 0 : ((x), void(), 0)))
+#endif
+
+
 #if __cplusplus <= 199711L
-  #if defined (_MSC_VER)
-    #define UNUSED(x) (void) (x);
-  #else
-    #define UNUSED(x) (void) (sizeof((x), 0))
+  #ifndef nullptr
+     #define nullptr NULL
   #endif
-  #define nullptr NULL
 #endif


libfreerdp-core: document MS-RPCH connection establishment

--- libfreerdp-core/rpc.c
+++ libfreerdp-core/rpc.c
@@ -227,9 +227,13 @@

 	s = rpc_ntlm_http_data(rpc, "RPC_OUT_DATA", &http_out_ntlm->outputBuffer, NULL, 0);

+	/* Send OUT Channel Request */
+
 	DEBUG_RPC("\n%s", s->data);
 	tls_write_all(tls_out, s->data, s->size);

+	/* Receive OUT Channel Response */
+
 	http_response = http_response_recv(tls_out);

 	crypto_base64_decode((uint8*) http_response->AuthParam, strlen(http_response->AuthParam),
@@ -241,6 +245,8 @@
 	ntlm_authenticate(http_out_ntlm);

 	s = rpc_ntlm_http_data(rpc, "RPC_OUT_DATA", &http_out_ntlm->outputBuffer, NULL, 76);
+
+	/* Send OUT Channel Request */

 	DEBUG_RPC("\n%s", s->data);
 	tls_write_all(tls_out, s->data, s->size);
@@ -267,9 +273,13 @@

 	http_stream = rpc_ntlm_http_data(rpc, "RPC_IN_DATA", &http_in_ntlm->outputBuffer, NULL, 0);

+	/* Send IN Channel Request */
+
 	DEBUG_RPC("\n%s", http_stream->data);
 	tls_write_all(tls_in, http_stream->data, http_stream->size);

+	/* Receive IN Channel Response */
+
 	http_response = http_response_recv(tls_in);

 	crypto_base64_decode((uint8*) http_response->AuthParam, strlen(http_response->AuthParam),
@@ -281,6 +291,8 @@
 	ntlm_authenticate(http_in_ntlm);

 	http_stream = rpc_ntlm_http_data(rpc, "RPC_IN_DATA", &http_in_ntlm->outputBuffer, NULL, 0x40000000);
+
+	/* Send IN Channel Request */

 	DEBUG_RPC("\n%s", http_stream->data);
 	tls_write_all(tls_in, http_stream->data, http_stream->size);
@@ -1006,12 +1018,37 @@
 	return read;
 }

+/**
+ *                                      Connection Establishment\n
+ *
+ *     Client                  Outbound Proxy           Inbound Proxy                 Server\n
+ *        |                         |                         |                         |\n
+ *        |-----------------IN Channel Request--------------->|                         |\n
+ *        |---OUT Channel Request-->|                         |<-Legacy Server Response-|\n
+ *        |                         |<--------------Legacy Server Response--------------|\n
+ *        |                         |                         |                         |\n
+ *        |---------CONN_A1-------->|                         |                         |\n
+ *        |----------------------CONN_B1--------------------->|                         |\n
+ *        |                         |----------------------CONN_A2--------------------->|\n
+ *        |                         |                         |                         |\n
+ *        |<--OUT Channel Response--|                         |---------CONN_B2-------->|\n
+ *        |<--------CONN_A3---------|                         |                         |\n
+ *        |                         |<---------------------CONN_C1----------------------|\n
+ *        |                         |                         |<--------CONN_B3---------|\n
+ *        |<--------CONN_C2---------|                         |                         |\n
+ *        |                         |                         |                         |\n
+ *
+ */
+
 boolean rpc_connect(rdpRpc* rpc)
 {
 	int status;
 	uint8* pdu;
 	int pdu_length;

+	pdu_length = 0xFFFF;
+	pdu = xmalloc(pdu_length);
+
 	if (!rpc_out_connect_http(rpc))
 	{
 		printf("rpc_out_connect_http error!\n");
@@ -1024,11 +1061,6 @@
 		return false;
 	}

-	pdu_length = 0xFFFF;
-	pdu = xmalloc(pdu_length);
-
-	status = rpc_out_read(rpc, pdu, pdu_length);
-
 	if (!rpc_in_connect_http(rpc))
 	{
 		printf("rpc_in_connect_http error!\n");
@@ -1041,6 +1073,13 @@
 		return false;
 	}

+	/* Receive OUT Channel Response */
+	status = rpc_out_read(rpc, pdu, pdu_length);
+
+	/* Receive CONN_A3 RTS PDU */
+	status = rpc_out_read(rpc, pdu, pdu_length);
+
+	/* Receive CONN_C2 RTS PDU */
 	status = rpc_out_read(rpc, pdu, pdu_length);

 	/* [MS-RPCH] 3.2.1.5.3.1 Connection Establishment


Fix stupid typo error.

Fix stupid typo error.

--- include/socket.h
+++ include/socket.h
@@ -119,7 +119,7 @@
         {
             swString_clear(write_buffer);
             swString_append_ptr(write_buffer, (const char *) *__buf, __n);
-            *__buf = write_buffer;
+            *__buf = write_buffer->str;
         }
     }


libhfuzz: Support old __sanitizer_cov_trace_cmp

--- libhfuzz/instrument.c
+++ libhfuzz/instrument.c
@@ -173,6 +173,22 @@
     }
 }

+ATTRIBUTE_X86_REQUIRE_SSE42 void __sanitizer_cov_trace_cmp(uint64_t SizeAndType, uint64_t Arg1,
+                                                           uint64_t Arg2)
+{
+    uint64_t CmpSize = (SizeAndType >> 32) / 8;
+    switch (CmpSize) {
+    case (sizeof(uint8_t)):
+        return __sanitizer_cov_trace_cmp1(Arg1, Arg2);
+    case (sizeof(uint16_t)):
+        return __sanitizer_cov_trace_cmp2(Arg1, Arg2);
+    case (sizeof(uint32_t)):
+        return __sanitizer_cov_trace_cmp4(Arg1, Arg2);
+    case (sizeof(uint64_t)):
+        return __sanitizer_cov_trace_cmp8(Arg1, Arg2);
+    }
+}
+
 /*
  * -fsanitize-coverage=trace-pc-guard
  */


Fix: implicit declaration of function 'swReactor_event_read'

--- include/swoole.h
+++ include/swoole.h
@@ -656,6 +656,7 @@

 SWINLINE int swReactor_error(swReactor *reactor);
 SWINLINE int swReactor_fdtype(int fdtype);
+SWINLINE int swReactor_event_read(int fdtype);
 SWINLINE int swReactor_event_write(int fdtype);
 SWINLINE int swReactor_event_error(int fdtype);
 int swReactor_receive(swReactor *reactor, swEvent *event);


libmediaart: Replace GetFileInfo for FileInfo and use getter/setters

--- libmediaart/extract.c
+++ libmediaart/extract.c
@@ -39,10 +39,9 @@
 };

 typedef struct {
-	void *storage;  /* was TrackerStorage *storage; */
 	gchar *art_path;
 	gchar *local_uri;
-} GetFileInfo;
+} FileInfo;

 typedef struct {
 	gchar *uri;
@@ -60,15 +59,13 @@

 static gboolean initialized = FALSE;
 static gboolean disable_requests;
-/* static TrackerStorage *media_art_storage; */
+
 static GHashTable *media_art_cache;
 static GDBusConnection *connection;

-static void
-media_art_queue_cb (GObject      *source_object,
-                   GAsyncResult *res,
-                   gpointer      user_data);
-
+static void media_art_queue_cb (GObject      *source_object,
+                                GAsyncResult *res,
+                                gpointer      user_data);

 static GDir *
 get_parent_g_dir (const gchar  *uri,
@@ -759,6 +756,29 @@
 	return retval;
 }

+static FileInfo *
+file_info_new (const gchar *local_uri,
+               const gchar *art_path)
+{
+	FileInfo *fi;
+
+	fi = g_slice_new (FileInfo);
+
+	fi->local_uri = g_strdup (local_uri);
+	fi->art_path = g_strdup (art_path);
+
+	return fi;
+}
+
+static void
+file_info_free (FileInfo *fi)
+{
+	g_free (fi->local_uri);
+	g_free (fi->art_path);
+
+	g_slice_free (FileInfo, fi);
+}
+
 static void
 media_art_request_download (MediaArtType  type,
                             const gchar  *album,
@@ -767,7 +787,7 @@
                             const gchar  *art_path)
 {
 	if (connection) {
-		GetFileInfo *info;
+		FileInfo *info;

 		if (disable_requests) {
 			return;
@@ -777,10 +797,7 @@
 			return;
 		}

-		info = g_slice_new (GetFileInfo);
-
-		info->local_uri = g_strdup (local_uri);
-		info->art_path = g_strdup (art_path);
+		info = file_info_new (local_uri, art_path);

 		g_dbus_connection_call (connection,
 		                        ALBUMARTER_SERVICE,
@@ -891,10 +908,10 @@
                     gpointer      user_data)
 {
 	GError *error = NULL;
-	GetFileInfo *info;
+	FileInfo *fi;
 	GVariant *v;

-	info = user_data;
+	fi = user_data;

 	v = g_dbus_connection_call_finish ((GDBusConnection *) source_object, res, &error);

@@ -911,20 +928,17 @@
 		g_variant_unref (v);
 	}

-	if (info->storage && info->art_path &&
-	    g_file_test (info->art_path, G_FILE_TEST_EXISTS)) {
-		media_art_copy_to_local (info->art_path,
-		                         info->local_uri);
-	}
-
-	g_free (info->art_path);
-	g_free (info->local_uri);
-
-	if (info->storage) {
-		g_object_unref (info->storage);
-	}
-
-	g_slice_free (GetFileInfo, info);
+	/* FIXME: was TrackerStorage ...*/
+#warning "FIXME: check for non-existant TrackerStorage"
+
+	if (NULL &&
+	    fi->art_path &&
+	    g_file_test (fi->art_path, G_FILE_TEST_EXISTS)) {
+		media_art_copy_to_local (fi->art_path,
+		                         fi->local_uri);
+	}
+
+	file_info_free (fi);
 }

 gboolean


text: fix background vertices and indices leak

--- libnodegl/node_text.c
+++ libnodegl/node_text.c
@@ -696,6 +696,8 @@
         ngli_pgcraft_freep(&desc->fg.crafter);
     }
     ngli_darray_reset(&s->pipeline_descs);
+    ngli_buffer_freep(&s->bg_vertices);
+    ngli_buffer_freep(&s->bg_indices);
     ngli_buffer_freep(&s->vertices);
     ngli_buffer_freep(&s->uvcoords);
     ngli_buffer_freep(&s->indices);


Fix writing annotations to manifests

Fix writing annotations to manifests

Issue:	#925

--- libpkg/pkg_manifest.c
+++ libpkg/pkg_manifest.c
@@ -896,6 +896,7 @@
 	const char *script_types = NULL;
 	lic_t licenselogic;
 	int64_t pkgsize;
+	ucl_object_iter_t it = NULL;
 	ucl_object_t *annotations, *categories, *licenses;
 	ucl_object_t *map, *seq, *submap;
 	ucl_object_t *top = ucl_object_typed_new(UCL_OBJECT);
@@ -913,6 +914,7 @@
 		PKG_FLATSIZE,
 		-1
 	};
+	size_t key_len;

 	pkg_get(pkg, PKG_COMMENT, &comment, PKG_LICENSE_LOGIC, &licenselogic,
 	    PKG_DESC, &desc, PKG_MESSAGE, &message, PKG_PKGSIZE, &pkgsize,
@@ -1062,16 +1064,22 @@
 	if (map)
 		ucl_object_insert_key(top, map, "options", 7, false);

-	/* XXXB: Fix this code please */
-#if 0
 	if (annotations != NULL) {
-		/* Remove internal only annotations */
-		ucl_object_delete_keyl(annotations, "repository", 10);
-		ucl_object_delete_keyl(annotations, "relocated", 9);
-		ucl_object_insert_key(top,
-		    ucl_object_ref(annotations), "annotations", 11, false);
-	}
-#endif
+		it = NULL;
+		map = ucl_object_typed_new(UCL_OBJECT);
+		/* Add annotations except for internal ones. */
+		while ((o = ucl_iterate_object(annotations, &it, true))) {
+			if ((key = ucl_object_keyl(o, &key_len)) == NULL)
+				continue;
+			/* Internal annotations. */
+			if (strcmp(key, "repository") == 0 ||
+			    strcmp(key, "relocated") == 0)
+				continue;
+			ucl_object_insert_key(map, ucl_object_ref(o), key,
+			    key_len, true);
+		}
+		ucl_object_insert_key(top, map, "annotations", 11, false);
+	}

 	if ((flags & PKG_MANIFEST_EMIT_COMPACT) == 0) {
 		if ((flags & PKG_MANIFEST_EMIT_NOFILES) == 0) {


Fix stupid bug

Fix stupid bug

--- libpkg/pkg_manifest.c
+++ libpkg/pkg_manifest.c
@@ -930,7 +930,7 @@
 	ucl_object_t *top = ucl_object_typed_new(UCL_OBJECT);

 	pkg_arch_to_legacy(pkg->abi, legacyarch, BUFSIZ);
-	pkg->arch = strdup(pkg->arch);
+	pkg->arch = strdup(legacyarch);
 	pkg_debug(4, "Emitting basic metadata");
 	ucl_object_insert_key(top, ucl_object_fromstring_common(pkg->name, 0,
 	    UCL_STRING_TRIM), "name", 4, false);


take out the useless const in the function type

--- src/Random.h
+++ src/Random.h
@@ -17,8 +17,8 @@

  public:
     Random(int seed_in, double min = 0.0, double max = 1.0);
-    const double rand_uniform() {return(rand_uniform_dist(*ran_generator));}
-    const int get_seed() const {return(seed);}
+    double rand_uniform() {return(rand_uniform_dist(*ran_generator));}
+    int get_seed() const {return(seed);}
 };

 }


Fixed include path

Fixed include path

--- hmc5883l.h
+++ hmc5883l.h
@@ -34,8 +34,8 @@
 #include <stdint.h>
 #include <string.h>
 #include <math.h>
-#include "../../lib/wiringPi/wiringPi/wiringPi.h"
-#include "../../lib/wiringPi/wiringPi/wiringPiI2C.h"
+#include <wiringPi.h>
+#include <wiringPiI2C.h>

 /* I2C address */
 #define HMC5883L_I2C_ADDRESS            0x1E


Remove unused posix_signal.h (which is the only place that uses ssize_t)

git-svn-id: 77c6ae948ca0f9b1480c5330e5e23bcf0afa938f@14444 fdbf22ae-c210-0410-be80-ca943da6b8f8

--- fer/common/posix_signal.h
+++ fer/common/posix_signal.h
@@ -1,125 +0,0 @@
-/* Our own header, to be included *after* all standard system headers */
-
-#ifndef	__ourhdr_posix_signal_h
-#define	__ourhdr_posix_signal_h
-
-#include <Python.h> /* make sure Python.h is always first */
-#include	<sys/types.h>	/* required for some of our prototypes */
-#include	<stdio.h>		/* for convenience */
-#include	<stdlib.h>		/* for convenience */
-#include	<string.h>		/* for convenience */
-#include	<unistd.h>		/* for convenience */
-
-/* added typedef for ssize_t because sunOS doesn't include it in
-   sys/types.h file *kob* 6/96 */
-/*  added ifdef check for aix because it didn't like this typedef */
-#ifdef MAC_SSIZE
-#define _SSIZE_T
-typedef long ssize_t;
-#endif
-
-#ifndef aix
-#ifndef _SSIZE_T
-#define _SSIZE_T
-/* Required for ISO/IEC 9945-1:1990 */
-typedef long ssize_t;
-#endif
-#endif
-
-#define	MAXLINE	4096			/* max line length */
-
-#define	FILE_MODE	(S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH)
-					/* default file access permissions for new files */
-#define	DIR_MODE	(FILE_MODE | S_IXUSR | S_IXGRP | S_IXOTH)
-					/* default permissions for new directories */
-
-typedef	void	Sigfunc(int);	/* for signal handlers */
-
-					/* 4.3BSD Reno <signal.h> doesn't define SIG_ERR */
-#if	defined(SIG_IGN) && !defined(SIG_ERR)
-#define	SIG_ERR	((Sigfunc *)-1)
-#endif
-
-#define	min(a,b)	((a) < (b) ? (a) : (b))
-#define	max(a,b)	((a) > (b) ? (a) : (b))
-
-					/* prototypes for our own functions */
-char	*path_alloc(int *);			/* {Prog pathalloc} */
-int		 open_max(void);			/* {Prog openmax} */
-void	 clr_fl(int, int);			/* {Prog setfl} */
-void	 set_fl(int, int);			/* {Prog setfl} */
-void	 pr_exit(int);				/* {Prog prexit} */
-void	 pr_mask(const char *);		/* {Prog prmask} */
-Sigfunc	*signal_intr(int, Sigfunc *);/* {Prog signal_intr_function} */
-
-int		 tty_cbreak(int);			/* {Prog raw} */
-int		 tty_raw(int);				/* {Prog raw} */
-int		 tty_reset(int);			/* {Prog raw} */
-void	 tty_atexit(void);			/* {Prog raw} */
-#ifdef	ECHO	/* only if <termios.h> has been included */
-struct termios	*tty_termios(void);	/* {Prog raw} */
-#endif
-
-void	 sleep_us(unsigned int);	/* {Ex sleepus} */
-ssize_t	 readn(int, void *, size_t);/* {Prog readn} */
-ssize_t	 writen(int, const void *, size_t);/* {Prog writen} */
-int		 daemon_init(void);			/* {Prog daemoninit} */
-
-int		 s_pipe(int *);				/* {Progs svr4_spipe bsd_spipe} */
-int		 recv_fd(int, ssize_t (*func)(int, const void *, size_t));
-									/* {Progs recvfd_svr4 recvfd_43bsd} */
-int		 send_fd(int, int);			/* {Progs sendfd_svr4 sendfd_43bsd} */
-int		 send_err(int, int, const char *);/* {Prog senderr} */
-int		 serv_listen(const char *);	/* {Progs servlisten_svr4 servlisten_44bsd} */
-int		 serv_accept(int, uid_t *);	/* {Progs servaccept_svr4 servaccept_44bsd} */
-int		 cli_conn(const char *);	/* {Progs cliconn_svr4 cliconn_44bsd} */
-int		 buf_args(char *, int (*func)(int, char **));
-									/* {Prog bufargs} */
-
-int		 ptym_open(char *);			/* {Progs ptyopen_svr4 ptyopen_44bsd} */
-int		 ptys_open(int, char *);	/* {Progs ptyopen_svr4 ptyopen_44bsd} */
-#ifdef	TIOCGWINSZ
-pid_t	 pty_fork(int *, char *, const struct termios *,
-				  const struct winsize *);	/* {Prog ptyfork} */
-#endif
-
-int		lock_reg(int, int, int, off_t, int, off_t);
-									/* {Prog lockreg} */
-#define	read_lock(fd, offset, whence, len) \
-			lock_reg(fd, F_SETLK, F_RDLCK, offset, whence, len)
-#define	readw_lock(fd, offset, whence, len) \
-			lock_reg(fd, F_SETLKW, F_RDLCK, offset, whence, len)
-#define	write_lock(fd, offset, whence, len) \
-			lock_reg(fd, F_SETLK, F_WRLCK, offset, whence, len)
-#define	writew_lock(fd, offset, whence, len) \
-			lock_reg(fd, F_SETLKW, F_WRLCK, offset, whence, len)
-#define	un_lock(fd, offset, whence, len) \
-			lock_reg(fd, F_SETLK, F_UNLCK, offset, whence, len)
-
-pid_t	lock_test(int, int, off_t, int, off_t);
-									/* {Prog locktest} */
-
-#define	is_readlock(fd, offset, whence, len) \
-			lock_test(fd, F_RDLCK, offset, whence, len)
-#define	is_writelock(fd, offset, whence, len) \
-			lock_test(fd, F_WRLCK, offset, whence, len)
-
-void	err_dump(const char *, ...);	/* {App misc_source} */
-void	err_msg(const char *, ...);
-void	err_quit(const char *, ...);
-void	err_ret(const char *, ...);
-void	err_sys(const char *, ...);
-
-void	log_msg(const char *, ...);		/* {App misc_source} */
-void	log_open(const char *, int, int);
-void	log_quit(const char *, ...);
-void	log_ret(const char *, ...);
-void	log_sys(const char *, ...);
-
-void	TELL_WAIT(void);		/* parent/child from {Sec race_conditions} */
-void	TELL_PARENT(pid_t);
-void	TELL_CHILD(pid_t);
-void	WAIT_PARENT(void);
-void	WAIT_CHILD(void);
-
-#endif	/* __ourhdr_posix_signal_h */


Increase class version

Increase class version

--- PWG/JETFW/AliJetContainer.h
+++ PWG/JETFW/AliJetContainer.h
@@ -227,7 +227,7 @@
   AliJetContainer(const AliJetContainer& obj); // copy constructor
   AliJetContainer& operator=(const AliJetContainer& other); // assignment

-  ClassDef(AliJetContainer,15);
+  ClassDef(AliJetContainer, 16);
 };

 #endif


Simplifications from S.Aiola

Simplifications from S.Aiola

--- PWG4/PWG4CaloCalibLinkDef.h
+++ PWG4/PWG4CaloCalibLinkDef.h
@@ -15,7 +15,5 @@
 #pragma link C++ class AliStaVertex+;
 #pragma link C++ class AliStaTrigger+;
 #pragma link C++ class AliStaPart+;
-#pragma link C++ class AliAnalysisTaskEMCALFastOR2Trigger+;
-#pragma link C++ class AliEMCALFastORPatch+;

 #endif


render: nanovg linear gradients works

render: nanovg linear gradients works

--- render/render_nanovg.c
+++ render/render_nanovg.c
@@ -30,9 +30,12 @@
     //float p1[2] = { shape->bounds[0], shape->bounds[1] };
     //float p2[2] = { shape->bounds[2], shape->bounds[3] };
     Transform3x2 tr;
-    //printf("%.3f\n", mx);
     inverse(data, data);
+    //rotate(tr, mx);
+    //mul(data, tr, data);
     scale(tr, 20.0/32768.0, 20.0/32768.0); // swf gradients -16384..16384 square in twips
+    mul(data, tr, data);
+    translate(tr, 128, 128);
     mul(data, tr, data);
     //xform(p1, data, p1);
     //xform(p2, data, p2);
@@ -46,8 +49,8 @@
     p.xform[1] = data[1][0];
     p.xform[2] = data[0][1];
     p.xform[3] = data[1][1];
-    p.xform[4] = data[0][2] + shape->bounds[0]/* + mx*/;
-    p.xform[5] = data[1][2] + shape->bounds[1];
+    p.xform[4] = data[0][2] + shape->bounds[0] + w*0.5;
+    p.xform[5] = data[1][2] + shape->bounds[1] + h*0.5;
     p.image = img;
     p.innerColor = p.outerColor = nvgRGBAf(1,1,1,1);
     p.extent[0] = 256;


Describe generic conventions for the bignum core module

This commit codifies some conventions that result from the original design
goals and others that have emerged after starting the implementation.

* Value ranges
* Bignum parameter naming and ordering
* Sizes
* Aliasing and overlap
* Error handling

Signed-off-by: Gilles Peskine <f805f64266d288fc5467baa7be6cd0ff366f477b@arm.com>

--- library/bignum_core.h
+++ library/bignum_core.h
@@ -11,6 +11,51 @@
  * as the principal representation of a number modulo 2^#biL or a smaller
  * bound.
  *
+ * The functions in this module obey the following conventions unless
+ * explicitly indicated otherwise:
+ *
+ * - **Overflow**: some functions indicate overflow from the range
+ *   [0, 2^#biL-1] by returning carry parameters, while others operate
+ *   modulo and so cannot overflow. This should be clear from the function
+ *   documentation.
+ * - **Bignum parameters**: Bignums are passed as pointers to an array of
+ *   limbs. A limb has the type #mbedtls_mpi_uint. Unless otherwise specified:
+ *     - Bignum parameters called \p A, \p B, ... are inputs, and are
+ *       not modified by the function.
+ *     - For operations modulo some number, the modulus is called \p N
+ *       and is input-only.
+ *     - Bignum parameters called \p X, \p Y are outputs or input-output.
+ *       The initial content of output-only parameters is ignored.
+ *     - Some functions use different names that reflect traditional
+ *       naming of operands of certain operations (e.g.
+ *       divisor/dividend/quotient/remainder).
+ *     - \p T is a temporary storage area. The initial content of such
+ *       parameter is ignored and the final content is unspecified.
+ * - **Bignum sizes**: bignum sizes are always expressed in limbs.
+ *   Most functions work on bignums of a given size and take a single
+ *   \p limbs parameter that applies to all parameters that are limb arrays.
+ *   All bignum sizes must be at least 1 and must be significantly less than
+ *   #SIZE_MAX. The behavior if a size is 0 is undefined. The behavior if the
+ *   total size of all parameters overflows #SIZE_MAX is undefined.
+ * - **Parameter ordering**: for bignum parameters, outputs come before inputs.
+ *   Temporaries come last.
+ * - **Aliasing**: in general, output bignums may be aliased to one or more
+ *   inputs. As an exception, parameters that are documented as a modulus value
+ *   may not be aliased to an output. Temporaries may not be aliased to
+ *   any other parameter.
+ * - **Overlap**: apart from aliasing of limb array pointers (where two
+ *   arguments are equal pointers), overlap is not supported and may result
+ *   in undefined behavior.
+ * - **Error handling**: This is a low-level module. Functions generally do not
+ *   try to protect against invalid arguments such as nonsensical sizes or
+ *   null pointers. Note that some functions that operate on bignums of
+ *   different sizes have constraints about their size, and violating those
+ *   constraints may lead to buffer overflows.
+ * - **Modular representatives**: functions that operate modulo \p N expect
+ *   all modular inputs to be in the range [0, \p N - 1] and guarantee outputs
+ *   in the range [0, \p N - 1]. If an input is out of range, outputs are
+ *   fully unspecified, though bignum values out of range should not cause
+ *   buffer overflows (beware that this is not extensively tested).
  */

 /*
@@ -39,9 +84,9 @@
 #include "mbedtls/bignum.h"
 #endif

-#define ciL    ( sizeof(mbedtls_mpi_uint) )   /* chars in limb  */
-#define biL    ( ciL << 3 )                   /* bits  in limb  */
-#define biH    ( ciL << 2 )                   /* half limb size */
+#define ciL    ( sizeof(mbedtls_mpi_uint) )   /** chars in limb  */
+#define biL    ( ciL << 3 )                   /** bits  in limb  */
+#define biH    ( ciL << 2 )                   /** half limb size */

 /*
  * Convert between bits/chars and number of limbs


ssl-verify: improve logging report in case of errors

Use the log.h system, and report a bit more information in the debug level

--- common/ssl_verify.c
+++ common/ssl_verify.c
@@ -22,6 +22,7 @@

 #include "mem.h"
 #include "ssl_verify.h"
+#include "log.h"

 #ifndef WIN32
 #include <sys/socket.h>
@@ -31,10 +32,6 @@
 #include <ctype.h>
 #include <string.h>

-#ifndef SPICE_DEBUG
-# define SPICE_DEBUG(format, ...)
-#endif
-
 #ifdef WIN32
 static int inet_aton(const char* ip, struct in_addr* in_addr)
 {
@@ -59,36 +56,36 @@
         return 0;

     if (!cert) {
-        SPICE_DEBUG("warning: no cert!");
+        spice_debug("warning: no cert!");
         return 0;
     }

     cert_pubkey = X509_get_pubkey(cert);
     if (!cert_pubkey) {
-        SPICE_DEBUG("warning: reading public key from certificate failed");
+        spice_debug("warning: reading public key from certificate failed");
         goto finish;
     }

     bio = BIO_new_mem_buf((void*)key, key_size);
     if (!bio) {
-        SPICE_DEBUG("creating BIO failed");
+        spice_debug("creating BIO failed");
         goto finish;
     }

     orig_pubkey = d2i_PUBKEY_bio(bio, NULL);
     if (!orig_pubkey) {
-        SPICE_DEBUG("reading pubkey from bio failed");
+        spice_debug("reading pubkey from bio failed");
         goto finish;
     }

     ret = EVP_PKEY_cmp(orig_pubkey, cert_pubkey);

     if (ret == 1) {
-        SPICE_DEBUG("public keys match");
+        spice_debug("public keys match");
     } else if (ret == 0) {
-        SPICE_DEBUG("public keys mismatch");
+        spice_debug("public keys mismatch");
     } else {
-        SPICE_DEBUG("public keys types mismatch");
+        spice_debug("public keys types mismatch");
     }

 finish:
@@ -170,7 +167,7 @@
     X509_NAME* subject;

     if (!cert) {
-        SPICE_DEBUG("warning: no cert!");
+        spice_debug("warning: no cert!");
         return 0;
     }

@@ -205,7 +202,7 @@
                 if (_gnutls_hostname_compare((char *)ASN1_STRING_data(name->d.dNSName),
                                              ASN1_STRING_length(name->d.dNSName),
                                              hostname)) {
-                    SPICE_DEBUG("alt name match=%s", ASN1_STRING_data(name->d.dNSName));
+                    spice_debug("alt name match=%s", ASN1_STRING_data(name->d.dNSName));
                     GENERAL_NAMES_free(subject_alt_names);
                     return 1;
                 }
@@ -214,7 +211,7 @@
                 found_dns_name = 1;
                 if ((addr_len == alt_ip_len)&&
                     !memcmp(ASN1_STRING_data(name->d.iPAddress), &addr, addr_len)) {
-                    SPICE_DEBUG("alt name IP match=%s",
+                    spice_debug("alt name IP match=%s",
                                 inet_ntoa(*((struct in_addr*)ASN1_STRING_data(name->d.dNSName))));
                     GENERAL_NAMES_free(subject_alt_names);
                     return 1;
@@ -225,7 +222,7 @@
     }

     if (found_dns_name) {
-        SPICE_DEBUG("warning: SubjectAltName mismatch");
+        spice_debug("warning: SubjectAltName mismatch");
         return 0;
     }

@@ -249,7 +246,7 @@
             if (_gnutls_hostname_compare((char*)ASN1_STRING_data(cn_asn1),
                                          ASN1_STRING_length(cn_asn1),
                                          hostname)) {
-                SPICE_DEBUG("common name match=%s", (char*)ASN1_STRING_data(cn_asn1));
+                spice_debug("common name match=%s", (char*)ASN1_STRING_data(cn_asn1));
                 cn_match = 1;
                 break;
             }
@@ -257,7 +254,7 @@
     }

     if (!cn_match) {
-        SPICE_DEBUG("warning: common name mismatch");
+        spice_debug("warning: common name mismatch");
     }

     return cn_match;
@@ -278,7 +275,7 @@
     in_subject = X509_NAME_new();

     if (!in_subject || !key || !val) {
-        SPICE_DEBUG("failed to allocate");
+        spice_debug("failed to allocate");
         return NULL;
     }

@@ -291,7 +288,7 @@
         if (*p == '\\') {
             ++p;
             if (*p != '\\' && *p != ',') {
-                SPICE_DEBUG("Invalid character after \\");
+                spice_debug("Invalid character after \\");
                 goto fail;
             }
             escape = 1;
@@ -325,7 +322,7 @@
                                                 MBSTRING_UTF8,
                                                 (const unsigned char*)val,
                                                 -1, -1, 0)) {
-                    SPICE_DEBUG("warning: failed to add entry %s=%s to X509_NAME",
+                    spice_debug("warning: failed to add entry %s=%s to X509_NAME",
                                 key, val);
                     goto fail;
                 }
@@ -359,27 +356,27 @@
     int in_entries;

     if (!cert) {
-        SPICE_DEBUG("warning: no cert!");
+        spice_debug("warning: no cert!");
         return 0;
     }

     cert_subject = X509_get_subject_name(cert);
     if (!cert_subject) {
-        SPICE_DEBUG("warning: reading certificate subject failed");
+        spice_debug("warning: reading certificate subject failed");
         return 0;
     }

     if (!verify->in_subject) {
         verify->in_subject = subject_to_x509_name(verify->subject, &in_entries);
         if (!verify->in_subject) {
-            SPICE_DEBUG("warning: no in_subject!");
+            spice_debug("warning: no in_subject!");
             return 0;
         }
     }

     /* Note: this check is redundant with the pre-condition in X509_NAME_cmp */
     if (X509_NAME_entry_count(cert_subject) != in_entries) {
-        SPICE_DEBUG("subject mismatch: #entries cert=%d, input=%d",
+        spice_debug("subject mismatch: #entries cert=%d, input=%d",
             X509_NAME_entry_count(cert_subject), in_entries);
         return 0;
     }
@@ -387,9 +384,18 @@
     ret = X509_NAME_cmp(cert_subject, verify->in_subject);

     if (ret == 0) {
-        SPICE_DEBUG("subjects match");
+        spice_debug("subjects match");
     } else {
-        SPICE_DEBUG("subjects mismatch");
+        spice_debug("subjects mismatch");
+
+        char *p;
+        p = X509_NAME_oneline(cert_subject, NULL, 0);
+        spice_debug("cert_subject: %s", p);
+        free(p);
+
+        p = X509_NAME_oneline(verify->in_subject, NULL, 0);
+        spice_debug("in_subject:   %s", p);
+        free(p);
     }

     return !ret;
@@ -397,18 +403,23 @@

 static int openssl_verify(int preverify_ok, X509_STORE_CTX *ctx)
 {
-    int depth;
+    int depth, err;
     SpiceOpenSSLVerify *v;
     SSL *ssl;
     X509* cert;
+    char buf[256];

     ssl = (SSL*)X509_STORE_CTX_get_ex_data(ctx, SSL_get_ex_data_X509_STORE_CTX_idx());
     v = (SpiceOpenSSLVerify*)SSL_get_app_data(ssl);

+    cert = X509_STORE_CTX_get_current_cert(ctx);
+    X509_NAME_oneline(X509_get_subject_name(cert), buf, 256);
     depth = X509_STORE_CTX_get_error_depth(ctx);
+    err = X509_STORE_CTX_get_error(ctx);
     if (depth > 0) {
         if (!preverify_ok) {
-            SPICE_DEBUG("openssl verify failed at depth=%d", depth);
+            spice_warning("openssl verify:num=%d:%s:depth=%d:%s", err,
+                          X509_verify_cert_error_string(err), depth, buf);
             v->all_preverify_ok = 0;
             return 0;
         } else
@@ -416,9 +427,8 @@
     }

     /* depth == 0 */
-    cert = X509_STORE_CTX_get_current_cert(ctx);
     if (!cert) {
-        SPICE_DEBUG("failed to get server certificate");
+        spice_debug("failed to get server certificate");
         return 0;
     }


zephyr: usb: Init mutexes in pd_set_vbus_discharge()

Zephyr needs these to be inited before use. Add the code for this. It is
harmless for ECOS but increases code size, so put it behind an #ifdef

BUG=b:175434113
BRANCH=none
TEST=build zephyr for volteer

Signed-off-by: Simon Glass <c00b0378376498bd9cd974c388df8854c0131d27@chromium.org>
Change-Id: I874c02e143b9d6987ab52036652897f384540def
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2600226
Reviewed-by: Keith Short <f6d578f97033c25f1206cb57d52f358974c82954@chromium.org>

--- common/usb_common.c
+++ common/usb_common.c
@@ -738,8 +738,15 @@

 void pd_set_vbus_discharge(int port, int enable)
 {
-	static struct mutex discharge_lock[CONFIG_USB_PD_PORT_MAX_COUNT];
-
+	static mutex_t discharge_lock[CONFIG_USB_PD_PORT_MAX_COUNT];
+#ifdef CONFIG_ZEPHYR
+	static bool inited[CONFIG_USB_PD_PORT_MAX_COUNT];
+
+	if (!inited[port]) {
+		(void)k_mutex_init(&discharge_lock[port]);
+		inited[port] = true;
+	}
+#endif
 	if (port >= board_get_usb_pd_port_count())
 		return;


common/usb_update.c: Format with clang-format

BUG=b:236386294
BRANCH=none
TEST=none

Change-Id: I24bcd0be35fc2b986c8d4138e4fddd1588b8464c
Signed-off-by: Jack Rosenthal <d3f605bef1867f59845d4ce6e4f83b8dc9e4e0ae@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3729780
Reviewed-by: Jeremy Bettis <4df7b5147fee087dca33c181f288ee7dbf56e022@chromium.org>

--- common/usb_update.c
+++ common/usb_update.c
@@ -20,8 +20,8 @@
 #include "usb-stream.h"
 #include "util.h"

-#define CPRINTS(format, args...) cprints(CC_USB, format, ## args)
-#define CPRINTF(format, args...) cprintf(CC_USB, format, ## args)
+#define CPRINTS(format, args...) cprints(CC_USB, format, ##args)
+#define CPRINTF(format, args...) cprintf(CC_USB, format, ##args)

 /*
  * This file is an adaptation layer between the USB interface and the firmware
@@ -47,37 +47,27 @@
 struct consumer const update_consumer;
 struct usb_stream_config const usb_update;

-static struct queue const update_to_usb = QUEUE_DIRECT(64, uint8_t,
-						     null_producer,
-						     usb_update.consumer);
-static struct queue const usb_to_update = QUEUE_DIRECT(64, uint8_t,
-						     usb_update.producer,
-						     update_consumer);
-
-USB_STREAM_CONFIG_FULL(usb_update,
-		       USB_IFACE_UPDATE,
-		       USB_CLASS_VENDOR_SPEC,
-		       USB_SUBCLASS_GOOGLE_UPDATE,
-		       USB_PROTOCOL_GOOGLE_UPDATE,
-		       USB_STR_UPDATE_NAME,
-		       USB_EP_UPDATE,
-		       USB_MAX_PACKET_SIZE,
-		       USB_MAX_PACKET_SIZE,
-		       usb_to_update,
-		       update_to_usb)
-
+static struct queue const update_to_usb =
+	QUEUE_DIRECT(64, uint8_t, null_producer, usb_update.consumer);
+static struct queue const usb_to_update =
+	QUEUE_DIRECT(64, uint8_t, usb_update.producer, update_consumer);
+
+USB_STREAM_CONFIG_FULL(usb_update, USB_IFACE_UPDATE, USB_CLASS_VENDOR_SPEC,
+		       USB_SUBCLASS_GOOGLE_UPDATE, USB_PROTOCOL_GOOGLE_UPDATE,
+		       USB_STR_UPDATE_NAME, USB_EP_UPDATE, USB_MAX_PACKET_SIZE,
+		       USB_MAX_PACKET_SIZE, usb_to_update, update_to_usb)

 /* The receiver can be in one of the states below. */
 enum rx_state {
-	rx_idle,	   /* Nothing happened yet. */
-	rx_inside_block,   /* Assembling a block to pass to the programmer. */
-	rx_outside_block,  /* Waiting for the next block to start or for the
-			      reset command. */
+	rx_idle, /* Nothing happened yet. */
+	rx_inside_block, /* Assembling a block to pass to the programmer. */
+	rx_outside_block, /* Waiting for the next block to start or for the
+			     reset command. */
 };

 enum rx_state rx_state_ = rx_idle;
-static uint8_t block_buffer[sizeof(struct update_command) +
-			    CONFIG_UPDATE_PDU_SIZE];
+static uint8_t
+	block_buffer[sizeof(struct update_command) + CONFIG_UPDATE_PDU_SIZE];
 static uint32_t block_size;
 static uint32_t block_index;

@@ -117,8 +107,8 @@
 	 * tmp2 = device_private
 	 *      = HMAC_SHA256(device_secret, "device-identity")
 	 */
-	hmac_SHA256(tmp2, tmp, CONFIG_ROLLBACK_SECRET_SIZE,
-		    KEY_CONTEXT, sizeof(KEY_CONTEXT) - 1);
+	hmac_SHA256(tmp2, tmp, CONFIG_ROLLBACK_SECRET_SIZE, KEY_CONTEXT,
+		    sizeof(KEY_CONTEXT) - 1);

 	/* tmp = device_public = x25519(device_private, x25519_base_point) */
 	X25519_public_from_private(tmp, tmp2);
@@ -128,10 +118,11 @@
 	X25519(tmp, tmp2, challenge->host_public);

 	/* tmp2 = authenticator = HMAC_SHA256(shared_secret, nonce) */
-	hmac_SHA256(tmp2, tmp, sizeof(tmp),
-		    challenge->nonce, sizeof(challenge->nonce));
+	hmac_SHA256(tmp2, tmp, sizeof(tmp), challenge->nonce,
+		    sizeof(challenge->nonce));
 	QUEUE_ADD_UNITS(&update_to_usb, tmp2,
-		member_size(struct pair_challenge_response, authenticator));
+			member_size(struct pair_challenge_response,
+				    authenticator));
 	return 1;
 }
 #endif
@@ -198,7 +189,8 @@

 	/* Looks like this is a vendor command, let's verify it. */
 	if (update_pdu_valid(&cmd_buffer->cmd,
-			  count - offsetof(struct update_frame_header, cmd))) {
+			     count - offsetof(struct update_frame_header,
+					      cmd))) {
 		enum update_extra_command subcommand;
 		uint8_t response;
 		size_t response_size = sizeof(response);
@@ -267,8 +259,8 @@
 			break;
 #ifdef CONFIG_ROLLBACK
 		case UPDATE_EXTRA_CMD_UNLOCK_ROLLBACK:
-			crec_flash_set_protect(EC_FLASH_PROTECT_ROLLBACK_AT_BOOT
-					       , 0);
+			crec_flash_set_protect(
+				EC_FLASH_PROTECT_ROLLBACK_AT_BOOT, 0);
 			response = EC_RES_SUCCESS;
 			break;
 #ifdef CONFIG_ROLLBACK_SECRET_SIZE
@@ -295,8 +287,8 @@
 			}

 			/* pair_challenge takes care of answering */
-			return pair_challenge((struct pair_challenge *)
-						(buffer + header_size));
+			return pair_challenge((
+				struct pair_challenge *)(buffer + header_size));
 		}
 #endif
 #endif /* CONFIG_ROLLBACK_SECRET_SIZE */
@@ -322,11 +314,10 @@

 #ifdef CONFIG_TOUCHPAD_HASH_FW
 			memcpy(tp.allowed_fw_hash, touchpad_fw_full_hash,
-				sizeof(tp.allowed_fw_hash));
+			       sizeof(tp.allowed_fw_hash));
 #endif
 #endif /* CONFIG_TOUCHPAD_VIRTUAL_OFF */
-			QUEUE_ADD_UNITS(&update_to_usb,
-					&tp, response_size);
+			QUEUE_ADD_UNITS(&update_to_usb, &tp, response_size);
 			return 1;
 		}
 		case UPDATE_EXTRA_CMD_TOUCHPAD_DEBUG: {
@@ -338,7 +329,8 @@
 			 * with the payload data, and put the response in data.
 			 */
 			response = touchpad_debug(buffer + header_size,
-					data_count, &data, &write_count);
+						  data_count, &data,
+						  &write_count);

 			/*
 			 * On error, or if there is no data to write back, just
@@ -374,11 +366,10 @@
 			}

 			response = uart_console_read_buffer(
-					data[0],
-					(char *)output,
-					MIN(sizeof(output),
-					    queue_space(&update_to_usb)),
-					&write_count);
+				data[0], (char *)output,
+				MIN(sizeof(output),
+				    queue_space(&update_to_usb)),
+				&write_count);
 			if (response != EC_RES_SUCCESS || write_count == 0)
 				break;

@@ -406,7 +397,7 @@
  * A flag indicating that at least one valid PDU containing flash update block
  * has been received in the current transfer session.
  */
-static uint8_t  data_was_transferred;
+static uint8_t data_was_transferred;

 /* Reply with an error to remote side, reset state. */
 static void send_error_reset(uint8_t resp_value)
@@ -459,10 +450,10 @@
 		 * digest = 0, and base = 0.
 		 */
 		if (!fetch_transfer_start(consumer, count, &u.upfr) ||
-			be32toh(u.upfr.block_size) !=
-					sizeof(struct update_frame_header) ||
-				u.upfr.cmd.block_digest != 0 ||
-				u.upfr.cmd.block_base != 0) {
+		    be32toh(u.upfr.block_size) !=
+			    sizeof(struct update_frame_header) ||
+		    u.upfr.cmd.block_digest != 0 ||
+		    u.upfr.cmd.block_base != 0) {
 			/*
 			 * Something is wrong, this payload is not a valid
 			 * update start PDU. Let'w indicate this by returning
@@ -474,14 +465,14 @@
 		}

 		CPRINTS("FW update: starting...");
-		fw_update_command_handler(&u.upfr.cmd, count -
-					   offsetof(struct update_frame_header,
-						    cmd),
-					   &resp_size);
+		fw_update_command_handler(
+			&u.upfr.cmd,
+			count - offsetof(struct update_frame_header, cmd),
+			&resp_size);

 		if (!u.startup_resp.return_value) {
-			rx_state_ = rx_outside_block;  /* We're in business. */
-			data_was_transferred = 0;   /* No data received yet. */
+			rx_state_ = rx_outside_block; /* We're in business. */
+			data_was_transferred = 0; /* No data received yet. */
 		}

 		/* Let the host know what updater had to say. */
@@ -509,8 +500,7 @@
 				}

 				resp_value = 0;
-				QUEUE_ADD_UNITS(&update_to_usb,
-						&resp_value, 1);
+				QUEUE_ADD_UNITS(&update_to_usb, &resp_value, 1);
 				rx_state_ = rx_idle;
 				return;
 			}
@@ -528,7 +518,7 @@

 		/* Let's allocate a large enough buffer. */
 		block_size = be32toh(upfr.block_size) -
-			offsetof(struct update_frame_header, cmd);
+			     offsetof(struct update_frame_header, cmd);

 		/*
 		 * Only update start PDU is allowed to have a size 0 payload.
@@ -545,7 +535,7 @@
 		 * to the updater.
 		 */
 		block_index = sizeof(upfr) -
-			offsetof(struct update_frame_header, cmd);
+			      offsetof(struct update_frame_header, cmd);
 		memcpy(block_buffer, &upfr.cmd, block_index);
 		block_size -= block_index;
 		rx_state_ = rx_inside_block;
@@ -567,7 +557,7 @@
 			send_error_reset(UPDATE_GEN_ERROR);
 			return;
 		}
-		return;	/* More to come. */
+		return; /* More to come. */
 	}

 	/*
@@ -588,7 +578,7 @@

 struct consumer const update_consumer = {
 	.queue = &usb_to_update,
-	.ops   = &((struct consumer_ops const) {
+	.ops = &((struct consumer_ops const){
 		.written = update_out_handler,
 	}),
 };


Automated commit to force versioning.

Automated commit to force versioning.

--- common/vtkVersion.h
+++ common/vtkVersion.h
@@ -59,7 +59,7 @@
 #define VTK_MINOR_VERSION 2
 #define VTK_BUILD_VERSION 0
 #define VTK_VERSION "3.2.0"
-#define VTK_SOURCE_VERSION "vtk version " VTK_VERSION ", vtk source $Revision: 1.724 $, $Date: 2000-12-20 01:01:32 $ (GMT)"
+#define VTK_SOURCE_VERSION "vtk version " VTK_VERSION ", vtk source $Revision: 1.725 $, $Date: 2000-12-21 01:02:42 $ (GMT)"

 class VTK_EXPORT vtkVersion : public vtkObject {