git-svn-id: https://www.imagemagick.org/subversion/ImageMagick/trunk@9835 aa41f4f7-0bf4-0310-aa73-e5a19afd5a74

--- coders/pnm.c
+++ coders/pnm.c
@@ -2148,6 +2148,9 @@
         (void) WriteBlobString(image,image->endian != LSBEndian ? "1.0\n" :
           "-1.0\n");
         image->depth=32;
+        if ((format == 'f') &&
+            (IsGrayImage(image,&image->exception) == MagickFalse))
+          (void) TransformImageColorspace(image,GRAYColorspace);
         quantum_type=format == 'f' ? GrayQuantum : RGBQuantum;
         quantum_info=AcquireQuantumInfo((const ImageInfo *) NULL,image);
         if (quantum_info == (QuantumInfo *) NULL)


* include/svn_error_codes.h: Remove reference to "server requests" in SVN_ERR_RA_REQUEST_FAILED message.

--- subversion/include/svn_error_codes.h
+++ subversion/include/svn_error_codes.h
@@ -297,7 +297,7 @@
                 "RA layer failed to create HTTP request")

     SVN_ERRDEF (SVN_ERR_RA_REQUEST_FAILED,
-                "RA layer's server request failed")
+                "RA layer request failed")

     SVN_ERRDEF (SVN_ERR_RA_MKACTIVITY_FAILED,
                 "RA layer failed to make an activity for commit")


Added casting to satisfy compiler insanity

--- src/condor_utils/stl_string_utils.h
+++ src/condor_utils/stl_string_utils.h
@@ -80,7 +80,7 @@
 bool lex_cast(const std::string& s, T& v) {
     std::stringstream ss(s);
     ss >> v;
-    return ss.tellg() == s.size();
+    return (unsigned long)(ss.tellg()) == (unsigned long)(s.size());
 }

 #endif // _stl_string_utils_h_


[Core] Add log of address and port (#12908)

Co-authored-by: Allen Yin <502b1a555ffdc61db18cb9f294f66342ad58821d@anyscale.io>

--- src/ray/rpc/metrics_agent_client.h
+++ src/ray/rpc/metrics_agent_client.h
@@ -37,6 +37,8 @@
   /// \param[in] client_call_manager The `ClientCallManager` used for managing requests.
   MetricsAgentClient(const std::string &address, const int port,
                      ClientCallManager &client_call_manager) {
+    RAY_LOG(DEBUG) << "Initiate the metrics client of address:" << address
+                   << " port:" << port;
     grpc_client_ = std::unique_ptr<GrpcClient<ReporterService>>(
         new GrpcClient<ReporterService>(address, port, client_call_manager));
   };


Added prototype for config_fill_ad(), which fills in mySubSystem_EXPRS into the given classad.  It is used internally by config(), but can also be called outside of config() to serve the same purpose.

--- src/condor_includes/condor_config.h
+++ src/condor_includes/condor_config.h
@@ -33,6 +33,7 @@
 	int param_in_pattern ( char *parameter, char *pattern);
 	void init_config ( void );
 	void clear_config ( void );
+	void config_fill_ad( ClassAd*, char* );
 	void set_debug_flags( char * );
 #else
 	void config();
@@ -46,6 +47,7 @@
 	int param_in_pattern ();
 	void init_config ();
 	void clear_config ();
+	void config_fill_ad ();
 	void set_debug_flags ();
 #endif


git-svn-id: https://www.imagemagick.org/subversion/ImageMagick/branches/ImageMagick-6@7290 aa41f4f7-0bf4-0310-aa73-e5a19afd5a74

--- coders/xcf.c
+++ coders/xcf.c
@@ -282,13 +282,16 @@
 %
 %  The format of the ReadBlobStringWithLongSize method is:
 %
-%      char *ReadBlobStringWithLongSize(Image *image,char *string)
+%      char *ReadBlobStringWithLongSize(Image *image,char *string,
+%        ExceptionInfo *exception)
 %
 %  A description of each parameter follows:
 %
 %    o image: the image.
 %
 %    o string: the address of a character buffer.
+%
+%    o exception: return any errors or warnings in this structure.
 %
 */

@@ -299,7 +302,8 @@
   return(y);
 }

-static char *ReadBlobStringWithLongSize(Image *image,char *string,size_t max)
+static char *ReadBlobStringWithLongSize(Image *image,char *string,size_t max,
+  ExceptionInfo *exception)
 {
   int
     c;
@@ -329,8 +333,8 @@
   string[i]='\0';
   offset=SeekBlob(image,(MagickOffsetType) (length-i),SEEK_CUR);
   if (offset < 0)
-    (void) ThrowMagickException(&image->exception,GetMagickModule(),
-      CorruptImageError,"ImproperImageHeader","`%s'",image->filename);
+    (void) ThrowMagickException(exception,GetMagickModule(),CorruptImageError,
+      "ImproperImageHeader","`%s'",image->filename);
   return(string);
 }

@@ -772,7 +776,7 @@
 }

 static MagickBooleanType ReadOneLayer(Image* image,XCFDocInfo* inDocInfo,
-  XCFLayerInfo *outLayer )
+  XCFLayerInfo *outLayer, ExceptionInfo *exception )
 {
   MagickOffsetType
     offset;
@@ -791,10 +795,10 @@
   outLayer->height = ReadBlobMSBLong(image);
   outLayer->type = ReadBlobMSBLong(image);
   (void) ReadBlobStringWithLongSize(image, outLayer->name,
-    sizeof(outLayer->name));
+    sizeof(outLayer->name),exception);
   /* allocate the image for this layer */
   outLayer->image=CloneImage(image,outLayer->width, outLayer->height,MagickTrue,
-     &image->exception);
+     exception);
   if (outLayer->image == (Image *) NULL)
     return MagickFalse;
   /* read the layer properties! */
@@ -847,7 +851,7 @@
      case PROP_PARASITES:
      {
        if (DiscardBlobBytes(image,prop_size) == MagickFalse)
-         ThrowFileException(&image->exception,CorruptImageError,
+         ThrowFileException(exception,CorruptImageError,
            "UnexpectedEndOfFile",image->filename);

         /*
@@ -909,8 +913,8 @@
   /* read in the hierarchy */
   offset=SeekBlob(image, (MagickOffsetType) hierarchy_offset, SEEK_SET);
   if (offset < 0)
-    (void) ThrowMagickException(&image->exception,GetMagickModule(),
-      CorruptImageError,"InvalidImageHeader","`%s'",image->filename);
+    (void) ThrowMagickException(exception,GetMagickModule(),CorruptImageError,
+      "InvalidImageHeader","`%s'",image->filename);
   if (load_hierarchy (image, inDocInfo, outLayer) == 0)
     return(MagickFalse);

@@ -974,7 +978,6 @@
 %    o image_info: the image info.
 %
 %    o exception: return any errors or warnings in this structure.
-%
 %
 */
 static Image *ReadXCFImage(const ImageInfo *image_info,ExceptionInfo *exception)
@@ -1052,7 +1055,6 @@
     else
       if (image_type == GIMP_INDEXED)
         ThrowReaderException(CoderError,"ColormapTypeNotSupported");
-  (void) SetImageBackgroundColor(image);
   image->matte=MagickTrue;
   /*
     Read properties.
@@ -1074,7 +1076,7 @@
         */
         size_t num_colours = ReadBlobMSBLong(image);
         if (DiscardBlobBytes(image,3*num_colours) == MagickFalse)
-          ThrowFileException(&image->exception,CorruptImageError,
+          ThrowFileException(exception,CorruptImageError,
             "UnexpectedEndOfFile",image->filename);
     /*
       if (info->file_version == 0)
@@ -1122,7 +1124,7 @@
       {
          /* just skip it - we don't care about guides */
         if (DiscardBlobBytes(image,prop_size) == MagickFalse)
-          ThrowFileException(&image->exception,CorruptImageError,
+          ThrowFileException(exception,CorruptImageError,
             "UnexpectedEndOfFile",image->filename);
       }
       break;
@@ -1145,8 +1147,8 @@

         /* BOGUS: we don't write these yet because we aren't
               reading them properly yet :(
-              image->x_resolution = xres;
-              image->y_resolution = yres;
+              image->resolution.x = xres;
+              image->resolution.y = yres;
         */
       }
       break;
@@ -1162,7 +1164,7 @@
       {
         /* BOGUS: we may need these for IPTC stuff */
         if (DiscardBlobBytes(image,prop_size) == MagickFalse)
-          ThrowFileException(&image->exception,CorruptImageError,
+          ThrowFileException(exception,CorruptImageError,
             "UnexpectedEndOfFile",image->filename);
         /*
       gssize_t         base = info->cp;
@@ -1191,8 +1193,8 @@
       {
       /* BOGUS: just skip it for now */
         if (DiscardBlobBytes(image,prop_size) == MagickFalse)
-          ThrowFileException(&image->exception,CorruptImageError,
-            "UnexpectedEndOfFile",image->filename);
+          ThrowFileException(exception,CorruptImageError,"UnexpectedEndOfFile",
+            image->filename);

         /*
       PathList *paths = xcf_load_bzpaths (gimage, info);
@@ -1207,9 +1209,9 @@
         /*BOGUS: ignored for now */
         /*float  factor = (float) */ (void) ReadBlobMSBLong(image);
         /* size_t digits =  */ (void) ReadBlobMSBLong(image);
-        for (i=0; i<5; i++)
-         (void) ReadBlobStringWithLongSize(image, unit_string,
-           sizeof(unit_string));
+        for (i=0; i < 5; i++)
+         (void) ReadBlobStringWithLongSize(image,unit_string,
+           sizeof(unit_string),exception);
       }
      break;

@@ -1241,12 +1243,16 @@
   else
     {
       int
+        number_layers = 0,
+        num_layers = 0,
         current_layer = 0,
-        foundAllLayers = MagickFalse,
-        number_layers = 0;
+        first_layer = 0,
+        last_layer = 0,
+        last = 0,
+        foundAllLayers = MagickFalse;

       MagickOffsetType
-        oldPos=TellBlob(image);
+        oldPos;

       XCFLayerInfo
         *layer_info;
@@ -1254,6 +1260,7 @@
       /*
         the read pointer
       */
+      oldPos=TellBlob(image);
       do
       {
         ssize_t offset = (int) ReadBlobMSBLong(image);
@@ -1271,6 +1278,20 @@
     offset=SeekBlob(image,oldPos,SEEK_SET); /* restore the position! */
     if (offset < 0)
       ThrowReaderException(CorruptImageError,"ImproperImageHeader");
+    first_layer=image_info->scene;
+    num_layers=number_layers;
+    /* number_scenes==0 means read all the images */
+    if ((image_info->number_scenes > 0) &&
+        (image_info->number_scenes < number_layers))
+      num_layers=image_info->scene;
+    last_layer=first_layer+num_layers-1;
+
+    /* XCF has layers backwards. */
+    last=last_layer;
+    last_layer=number_layers-first_layer - 1;
+    first_layer=number_layers-last-1;
+    number_layers=num_layers;
+
     /* allocate our array of layer info blocks */
     length=(size_t) number_layers;
     layer_info=(XCFLayerInfo *) AcquireQuantumMemory(length,
@@ -1298,24 +1319,29 @@
       *  next layer offset is stored.
       */
       saved_pos=TellBlob(image);
-      /* seek to the layer offset */
-      offset=SeekBlob(image,offset,SEEK_SET);
-      /* read in the layer */
-      layer_ok=ReadOneLayer(image,&doc_info,&layer_info[current_layer]);
-      if (layer_ok == MagickFalse)
+      if ((first_layer <= current_layer) && (current_layer <= last_layer))
         {
-          int j;
-
-          for (j=0; j < current_layer; j++)
-            layer_info[j].image=DestroyImage(layer_info[j].image);
-        ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
-      }
-      /* restore the saved position so we'll be ready to
-      *  read the next offset.
-      */
-      offset=SeekBlob(image, saved_pos, SEEK_SET);
-      current_layer++;
-    }
+          /* seek to the layer offset */
+          offset=SeekBlob(image,offset,SEEK_SET);
+          /* read in the layer */
+          layer_ok=ReadOneLayer(image,&doc_info,&layer_info[current_layer],
+            exception);
+          if (layer_ok == MagickFalse)
+            {
+              int j;
+
+              for (j=0; j < current_layer; j++)
+                layer_info[j].image=DestroyImage(layer_info[j].image);
+              layer_info=(XCFLayerInfo *) RelinquishMagickMemory(layer_info);
+              ThrowReaderException(ResourceLimitError,"MemoryAllocationFailed");
+            }
+          /* restore the saved position so we'll be ready to
+          *  read the next offset.
+          */
+          offset=SeekBlob(image, saved_pos, SEEK_SET);
+        }
+        current_layer++;
+      }
     if (number_layers == 1)
       {
         /*
@@ -1323,7 +1349,7 @@
         */
         (void) CompositeImage(image,OverCompositeOp,layer_info[0].image,
           layer_info[0].offset_x,layer_info[0].offset_y);
-        layer_info[0].image =DestroyImage( layer_info[0].image);
+        layer_info[0].image=DestroyImage( layer_info[0].image);
       }
     else
       {
@@ -1335,11 +1361,11 @@
           /* BOGUS: need to consider layer blending modes!! */

           if ( layer_info[j].visible ) { /* only visible ones, please! */
-            CompositeImage(image, OverCompositeOp, layer_info[j].image,
-                     layer_info[j].offset_x, layer_info[j].offset_y );
+            CompositeImage(image, layer_info[j].image, OverCompositeOp,
+               MagickTrue, layer_info[j].offset_x, layer_info[j].offset_y );
              layer_info[j].image =DestroyImage( layer_info[j].image );

-            /* Bob says that if we do this, we'll get REAL gray images! */
+            /*  If we do this, we'll get REAL gray images! */
             if ( image_type == GIMP_GRAY ) {
               QuantizeInfo  qi;
               GetQuantizeInfo(&qi);
@@ -1356,32 +1382,26 @@

         /* first we copy the last layer on top of the main image */
         (void) CompositeImage(image,CopyCompositeOp,
-          layer_info[number_layers-1].image,
-          layer_info[number_layers-1].offset_x,
+          layer_info[number_layers-1].image,layer_info[number_layers-1].offset_x,
           layer_info[number_layers-1].offset_y);
-          layer_info[number_layers-1].image=DestroyImage(
-            layer_info[number_layers-1].image);
+        layer_info[number_layers-1].image=DestroyImage(
+          layer_info[number_layers-1].image);

         /* now reverse the order of the layers as they are put
            into subimages
         */
-        j=number_layers-2;
-        image->next=layer_info[j].image;
-        layer_info[j].image->previous=image;
-        layer_info[j].image->page.x=layer_info[j].offset_x;
-        layer_info[j].image->page.y=layer_info[j].offset_y;
-        layer_info[j].image->page.width=layer_info[j].width;
-        layer_info[j].image->page.height=layer_info[j].height;
-        for (j=number_layers-3; j>=0; j--)
-        {
-          if (j > 0)
-            layer_info[j].image->next=layer_info[j-1].image;
-          if (j < (number_layers-1))
-            layer_info[j].image->previous=layer_info[j+1].image;
-          layer_info[j].image->page.x=layer_info[j].offset_x;
-          layer_info[j].image->page.y=layer_info[j].offset_y;
-          layer_info[j].image->page.width=layer_info[j].width;
-          layer_info[j].image->page.height=layer_info[j].height;
+      image->next=layer_info[number_layers-2].image;
+      layer_info[number_layers-2].image->previous=image;
+      for (j=number_layers-2; j>=0; j--)
+      {
+        if (j > 0)
+          layer_info[j].image->next=layer_info[j-1].image;
+        if (j < (number_layers-1))
+          layer_info[j].image->previous=layer_info[j+1].image;
+        layer_info[j].image->page.x = layer_info[j].offset_x;
+        layer_info[j].image->page.y = layer_info[j].offset_y;
+        layer_info[j].image->page.width = layer_info[j].width;
+        layer_info[j].image->page.height = layer_info[j].height;
         }
       }
 #endif


remove constructor

remove constructor

--- Arduino/libraries/Printer/Printer.h
+++ Arduino/libraries/Printer/Printer.h
@@ -10,7 +10,6 @@

 class Printer {
 public:
-            Printer();
     void    reset();
     void    setMotor(enum motor, int p1, int p2, int p3);
     void    setSwitch(int p);


Refactor some conflict resolver code. No functional change.

This separates the guts of move detection code from the code which finds a
deleted node. This is less efficient because we now contact the repository
more often. But I hope this inefficiency will be temporary. My end goal is
to untangle and streamline this code to improve maintainability.

* subversion/libsvn_client/conflicts.c
  (find_deleted_rev_baton): Remove moves_table and moved_paths.
  (find_deleted_rev): Stop hunting for moves in here.
  (find_moves_baton, find_moves, find_moves_in_revision_range): New function
   which are concerned with finding moves in repository history,
  (find_revision_for_suspected_deletion): For now, call the new move scanning
   functions directly in here. This avoids changing callers for now.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1775321 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_client/conflicts.c
+++ subversion/libsvn_client/conflicts.c
@@ -540,54 +540,7 @@
   svn_node_kind_t replacing_node_kind;
   apr_pool_t *result_pool;

-  /* A hash table mapping a revision number to an array of struct
-   * repos_move_info * elements, describing moves.
-   *
-   * Must be allocated in RESULT_POOL by the caller of svn_ra_get_log2().
-   *
-   * If the node was moved, the DELETED_REV is present in this table,
-   * perhaps along with additional revisions.
-   *
-   * Given a sequence of moves which happened in the repository, such as:
-   *   rA: mv x->z
-   *   rA: mv a->b
-   *   rB: mv b->c
-   *   rC: mv c->d
-   * we map each revision number to all the moves which happened in the
-   * revision, which looks as follows:
-   *   rA : [(x->z), (a->b)]
-   *   rB : [(b->c)]
-   *   rC : [(c->d)]
-   * This allows us to later find relevant moves based on a revision number.
-   *
-   * Additionally, we embed the number of the revision in which a move was
-   * found inside the repos_move_info structure:
-   *   rA : [(rA, x->z), (rA, a->b)]
-   *   rB : [(rB, b->c)]
-   *   rC : [(rC, c->d)]
-   * And also, all moves pertaining to the same node are chained into a
-   * doubly-linked list via 'next' and 'prev' pointers (see definition of
-   * struct repos_move_info). This can be visualized as follows:
-   *   rA : [(rA, x->z, prev=>NULL, next=>NULL),
-   *         (rA, a->b, prev=>NULL, next=>(rB, b->c))]
-   *   rB : [(rB, b->c), prev=>(rA, a->b), next=>(rC, c->d)]
-   *   rC : [(rC, c->d), prev=>(rB, c->d), next=>NULL]
-   * This way, we can look up all moves relevant to a node, forwards and
-   * backwards in history, once we have located one move in the chain.
-   *
-   * In the above example, the data tells us that within the revision
-   * range rA:C, a was moved to d. However, within the revision range
-   * rA;B, a was moved to b.
-   */
-  apr_hash_t *moves_table;
-
-  /* Variables below hold state for find_deleted_rev() and are not
-   * intended to be used by the caller of svn_ra_get_log2().
-   * Like all other variables, they must be initialized, however. */
-
-  /* Temporary map of moved paths to struct repos_move_info.
-   * Used to link multiple moves of the same node across revisions. */
-  apr_hash_t *moved_paths;
+  apr_hash_t *moves_table; /* Obtained from find_moves_in_revision(). */

   /* Extra RA session that can be used to make additional requests. */
   svn_ra_session_t *extra_ra_session;
@@ -807,8 +760,6 @@
   apr_pool_t *iterpool;
   svn_boolean_t deleted_node_found = FALSE;
   svn_node_kind_t replacing_node_kind = svn_node_none;
-  apr_array_header_t *deleted_paths;
-  apr_hash_t *copies;

   if (b->ctx->notify_func2)
     {
@@ -826,8 +777,6 @@
   if (! log_entry->changed_paths2)
     return SVN_NO_ERROR;

-  copies = apr_hash_make(scratch_pool);
-  deleted_paths = apr_array_make(scratch_pool, 0, sizeof(const char *));
   iterpool = svn_pool_create(scratch_pool);
   for (hi = apr_hash_first(scratch_pool, log_entry->changed_paths2);
        hi != NULL;
@@ -841,39 +790,6 @@
       /* ### Remove leading slash from paths in log entries. */
       if (changed_path[0] == '/')
           changed_path++;
-
-      /* For move detection, scan for copied nodes in this revision. */
-      if (log_item->action == 'A' && log_item->copyfrom_path)
-        {
-          struct copy_info *copy;
-          apr_array_header_t *copies_with_same_source_path;
-
-          if (log_item->copyfrom_path[0] == '/')
-            log_item->copyfrom_path++;
-
-          copy = apr_palloc(scratch_pool, sizeof(*copy));
-          copy->copyto_path = changed_path;
-          copy->copyfrom_path = log_item->copyfrom_path;
-          copy->copyfrom_rev = log_item->copyfrom_rev;
-          copies_with_same_source_path = apr_hash_get(copies,
-                                                      log_item->copyfrom_path,
-                                                      APR_HASH_KEY_STRING);
-          if (copies_with_same_source_path == NULL)
-            {
-              copies_with_same_source_path = apr_array_make(
-                                               scratch_pool, 1,
-                                               sizeof(struct copy_info *));
-              apr_hash_set(copies, copy->copyfrom_path, APR_HASH_KEY_STRING,
-                           copies_with_same_source_path);
-            }
-          APR_ARRAY_PUSH(copies_with_same_source_path,
-                         struct copy_info *) = copy;
-        }
-
-      /* For move detection, store all deleted_paths. */
-      if (log_item->action == 'D' || log_item->action == 'R')
-        APR_ARRAY_PUSH(deleted_paths, const char *) =
-          apr_pstrdup(scratch_pool, changed_path);

       /* Check if we already found the deleted node we're looking for. */
       if (!deleted_node_found &&
@@ -920,12 +836,6 @@
     }
   svn_pool_destroy(iterpool);

-  /* Check for moves in this revision */
-  SVN_ERR(find_moves_in_revision(b->extra_ra_session,
-                                 b->moves_table, b->moved_paths,
-                                 log_entry, copies, deleted_paths,
-                                 b->repos_root_url,
-                                 b->result_pool, scratch_pool));
   if (!deleted_node_found)
     {
       apr_array_header_t *moves;
@@ -936,15 +846,6 @@
         {
           struct repos_move_info *move;

-          SVN_ERR(find_nested_moves(moves, copies, deleted_paths,
-                                    b->moved_paths, log_entry->revision,
-                                    svn_hash_gets(log_entry->revprops,
-                                                  SVN_PROP_REVISION_AUTHOR),
-                                    b->repos_root_url,
-                                    b->repos_uuid,
-                                    b->extra_ra_session, b->ctx,
-                                    b->result_pool, scratch_pool));
-
           move = map_deleted_path_to_move(b->deleted_repos_relpath,
                                           moves, scratch_pool);
           if (move)
@@ -1422,6 +1323,233 @@
   return SVN_NO_ERROR;
 }

+struct find_moves_baton
+{
+  /* Variables below are arguments provided by the caller of
+   * svn_ra_get_log2(). */
+  const char *repos_root_url;
+  const char *repos_uuid;
+  svn_client_ctx_t *ctx;
+  const char *victim_abspath; /* for notifications */
+  apr_pool_t *result_pool;
+
+  /* A hash table mapping a revision number to an array of struct
+   * repos_move_info * elements, describing moves.
+   *
+   * Must be allocated in RESULT_POOL by the caller of svn_ra_get_log2().
+   *
+   * If the node was moved, the DELETED_REV is present in this table,
+   * perhaps along with additional revisions.
+   *
+   * Given a sequence of moves which happened in the repository, such as:
+   *   rA: mv x->z
+   *   rA: mv a->b
+   *   rB: mv b->c
+   *   rC: mv c->d
+   * we map each revision number to all the moves which happened in the
+   * revision, which looks as follows:
+   *   rA : [(x->z), (a->b)]
+   *   rB : [(b->c)]
+   *   rC : [(c->d)]
+   * This allows us to later find relevant moves based on a revision number.
+   *
+   * Additionally, we embed the number of the revision in which a move was
+   * found inside the repos_move_info structure:
+   *   rA : [(rA, x->z), (rA, a->b)]
+   *   rB : [(rB, b->c)]
+   *   rC : [(rC, c->d)]
+   * And also, all moves pertaining to the same node are chained into a
+   * doubly-linked list via 'next' and 'prev' pointers (see definition of
+   * struct repos_move_info). This can be visualized as follows:
+   *   rA : [(rA, x->z, prev=>NULL, next=>NULL),
+   *         (rA, a->b, prev=>NULL, next=>(rB, b->c))]
+   *   rB : [(rB, b->c), prev=>(rA, a->b), next=>(rC, c->d)]
+   *   rC : [(rC, c->d), prev=>(rB, c->d), next=>NULL]
+   * This way, we can look up all moves relevant to a node, forwards and
+   * backwards in history, once we have located one move in the chain.
+   *
+   * In the above example, the data tells us that within the revision
+   * range rA:C, a was moved to d. However, within the revision range
+   * rA;B, a was moved to b.
+   */
+  apr_hash_t *moves_table;
+
+  /* Variables below hold state for find_moves() and are not
+   * intended to be used by the caller of svn_ra_get_log2().
+   * Like all other variables, they must be initialized, however. */
+
+  /* Temporary map of moved paths to struct repos_move_info.
+   * Used to link multiple moves of the same node across revisions. */
+  apr_hash_t *moved_paths;
+
+  /* Extra RA session that can be used to make additional requests. */
+  svn_ra_session_t *extra_ra_session;
+};
+
+/* Implements svn_log_entry_receiver_t. */
+static svn_error_t *
+find_moves(void *baton, svn_log_entry_t *log_entry, apr_pool_t *scratch_pool)
+{
+  struct find_moves_baton *b = baton;
+  apr_hash_index_t *hi;
+  apr_pool_t *iterpool;
+  apr_array_header_t *deleted_paths;
+  apr_hash_t *copies;
+  apr_array_header_t *moves;
+
+  if (b->ctx->notify_func2)
+    {
+      svn_wc_notify_t *notify;
+
+      notify = svn_wc_create_notify(
+                 b->victim_abspath,
+                 svn_wc_notify_tree_conflict_details_progress,
+                 scratch_pool),
+      notify->revision = log_entry->revision;
+      b->ctx->notify_func2(b->ctx->notify_baton2, notify, scratch_pool);
+    }
+
+  /* No paths were changed in this revision.  Nothing to do. */
+  if (! log_entry->changed_paths2)
+    return SVN_NO_ERROR;
+
+  copies = apr_hash_make(scratch_pool);
+  deleted_paths = apr_array_make(scratch_pool, 0, sizeof(const char *));
+  iterpool = svn_pool_create(scratch_pool);
+  for (hi = apr_hash_first(scratch_pool, log_entry->changed_paths2);
+       hi != NULL;
+       hi = apr_hash_next(hi))
+    {
+      const char *changed_path = apr_hash_this_key(hi);
+      svn_log_changed_path2_t *log_item = apr_hash_this_val(hi);
+
+      svn_pool_clear(iterpool);
+
+      /* ### Remove leading slash from paths in log entries. */
+      if (changed_path[0] == '/')
+          changed_path++;
+
+      /* For move detection, scan for copied nodes in this revision. */
+      if (log_item->action == 'A' && log_item->copyfrom_path)
+        {
+          struct copy_info *copy;
+          apr_array_header_t *copies_with_same_source_path;
+
+          if (log_item->copyfrom_path[0] == '/')
+            log_item->copyfrom_path++;
+
+          copy = apr_palloc(scratch_pool, sizeof(*copy));
+          copy->copyto_path = changed_path;
+          copy->copyfrom_path = log_item->copyfrom_path;
+          copy->copyfrom_rev = log_item->copyfrom_rev;
+          copies_with_same_source_path = apr_hash_get(copies,
+                                                      log_item->copyfrom_path,
+                                                      APR_HASH_KEY_STRING);
+          if (copies_with_same_source_path == NULL)
+            {
+              copies_with_same_source_path = apr_array_make(
+                                               scratch_pool, 1,
+                                               sizeof(struct copy_info *));
+              apr_hash_set(copies, copy->copyfrom_path, APR_HASH_KEY_STRING,
+                           copies_with_same_source_path);
+            }
+          APR_ARRAY_PUSH(copies_with_same_source_path,
+                         struct copy_info *) = copy;
+        }
+
+      /* For move detection, store all deleted_paths. */
+      if (log_item->action == 'D' || log_item->action == 'R')
+        APR_ARRAY_PUSH(deleted_paths, const char *) =
+          apr_pstrdup(scratch_pool, changed_path);
+    }
+  svn_pool_destroy(iterpool);
+
+  /* Check for moves in this revision */
+  SVN_ERR(find_moves_in_revision(b->extra_ra_session,
+                                 b->moves_table, b->moved_paths,
+                                 log_entry, copies, deleted_paths,
+                                 b->repos_root_url,
+                                 b->result_pool, scratch_pool));
+
+  moves = apr_hash_get(b->moves_table, &log_entry->revision,
+                       sizeof(svn_revnum_t));
+  if (moves)
+    SVN_ERR(find_nested_moves(moves, copies, deleted_paths,
+                              b->moved_paths, log_entry->revision,
+                              svn_hash_gets(log_entry->revprops,
+                                            SVN_PROP_REVISION_AUTHOR),
+                              b->repos_root_url,
+                              b->repos_uuid,
+                              b->extra_ra_session, b->ctx,
+                              b->result_pool, scratch_pool));
+
+  return SVN_NO_ERROR;
+}
+
+/* Find all moves which occured in repository history starting at
+ * REPOS_RELPATH@START_REV until END_REV (where START_REV > END_REV).
+ * Return results in *MOVES_TABLE (see struct find_moves_baton for details). */
+static svn_error_t *
+find_moves_in_revision_range(struct apr_hash_t **moves_table,
+                             const char *repos_relpath,
+                             svn_client_conflict_t *conflict,
+                             svn_revnum_t start_rev,
+                             svn_revnum_t end_rev,
+                             svn_client_ctx_t *ctx,
+                             apr_pool_t *result_pool,
+                             apr_pool_t *scratch_pool)
+{
+  svn_ra_session_t *ra_session;
+  const char *url;
+  const char *corrected_url;
+  apr_array_header_t *paths;
+  apr_array_header_t *revprops;
+  const char *repos_root_url;
+  const char *repos_uuid;
+  struct find_moves_baton b;
+  svn_error_t *err;
+
+  SVN_ERR_ASSERT(start_rev > end_rev);
+
+  SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, &repos_uuid,
+                                             conflict, scratch_pool,
+                                             scratch_pool));
+  url = svn_path_url_add_component2(repos_root_url, repos_relpath,
+                                    scratch_pool);
+  SVN_ERR(svn_client__open_ra_session_internal(&ra_session, &corrected_url,
+                                               url, NULL, NULL, FALSE, FALSE,
+                                               ctx, scratch_pool,
+                                               scratch_pool));
+
+  paths = apr_array_make(scratch_pool, 1, sizeof(const char *));
+  APR_ARRAY_PUSH(paths, const char *) = "";
+
+  revprops = apr_array_make(scratch_pool, 1, sizeof(const char *));
+  APR_ARRAY_PUSH(revprops, const char *) = SVN_PROP_REVISION_AUTHOR;
+
+  b.repos_root_url = repos_root_url;
+  b.repos_uuid = repos_uuid;
+  b.ctx = ctx;
+  b.moves_table = apr_hash_make(result_pool);
+  b.moved_paths = apr_hash_make(scratch_pool);
+  b.result_pool = result_pool;
+  SVN_ERR(svn_ra__dup_session(&b.extra_ra_session, ra_session, NULL,
+                              scratch_pool, scratch_pool));
+
+  err = svn_ra_get_log2(ra_session, paths, start_rev, end_rev,
+                        0, /* no limit */
+                        TRUE, /* need the changed paths list */
+                        FALSE, /* need to traverse copies */
+                        FALSE, /* no need for merged revisions */
+                        revprops,
+                        find_moves, &b,
+                        scratch_pool);
+
+  *moves_table = b.moves_table;
+
+  return SVN_NO_ERROR;
+}
+
 /* Try to find a revision older than START_REV, and its author, which deleted
  * DELETED_BASENAME in the directory PARENT_REPOS_RELPATH. Assume the deleted
  * node is ancestrally related to RELATED_REPOS_RELPATH@RELATED_PEG_REV.
@@ -1459,8 +1587,13 @@
   struct find_deleted_rev_baton b;
   const char *victim_abspath;
   svn_error_t *err;
+  apr_hash_t *moves_table;

   SVN_ERR_ASSERT(start_rev > end_rev);
+
+  SVN_ERR(find_moves_in_revision_range(&moves_table, parent_repos_relpath,
+                                       conflict, start_rev, end_rev,
+                                       ctx, result_pool, scratch_pool));

   SVN_ERR(svn_client_conflict_get_repos_info(&repos_root_url, &repos_uuid,
                                              conflict, scratch_pool,
@@ -1489,8 +1622,7 @@
   b.repos_root_url = repos_root_url;
   b.repos_uuid = repos_uuid;
   b.ctx = ctx;
-  b.moves_table = apr_hash_make(result_pool);
-  b.moved_paths = apr_hash_make(scratch_pool);
+  b.moves_table = moves_table;
   b.result_pool = result_pool;
   SVN_ERR(svn_ra__dup_session(&b.extra_ra_session, ra_session, NULL,
                               scratch_pool, scratch_pool));
@@ -1534,9 +1666,9 @@
       *deleted_rev_author = b.deleted_rev_author;
       *replacing_node_kind = b.replacing_node_kind;

-      /* Look for a moves which affect the deleted node. */
-      all_moves_in_deleted_rev = apr_hash_get(b.moves_table, &b.deleted_rev,
-                                             sizeof(svn_revnum_t));
+      /* Look for moves which affect the deleted node. */
+      all_moves_in_deleted_rev = apr_hash_get(moves_table, &b.deleted_rev,
+                                              sizeof(svn_revnum_t));
       if (all_moves_in_deleted_rev)
         {
           int i;
@@ -1551,7 +1683,7 @@
               if (strcmp(b.deleted_repos_relpath,
                          this_move->moved_from_repos_relpath) == 0)
                 {
-                  /* Because b->moves_table lives in result_pool
+                  /* Because moves_table lives in result_pool
                    * there is no need to deep-copy here. */
                    APR_ARRAY_PUSH(*moves, struct repos_move_info *) = this_move;
                 }


ArmPkg/BdsLib: Do not create additional 'cpu' nodes if the 'cpus' node already exist

UEFI must not add additional 'cpu' nodes if the 'cpus' node was already present.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin <olivier.martin@arm.com>

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

--- ArmPkg/Library/BdsLib/BdsLinuxFdt.c
+++ ArmPkg/Library/BdsLib/BdsLinuxFdt.c
@@ -244,6 +244,7 @@
   BOOLEAN               PsciSmcSupported;
   UINTN                 Rx;
   UINTN                 OriginalFdtSize;
+  BOOLEAN               CpusNodeExist;

   //
   // Ensure the Power State Coordination Interface (PSCI) SMCs are there if supported
@@ -448,6 +449,9 @@
         fdt_setprop_string(fdt, node, "name", "cpus");
         fdt_setprop_cell(fdt, node, "#address-cells", 1);
         fdt_setprop_cell(fdt, node, "#size-cells", 0);
+        CpusNodeExist = FALSE;
+      } else {
+        CpusNodeExist = TRUE;
       }

       // Get pointer to ARM processor table
@@ -456,16 +460,20 @@

       for (Index = 0; Index < ArmProcessorTable->NumberOfEntries; Index++) {
         AsciiSPrint (Name, 10, "cpu@%d", Index);
-        cpu_node = fdt_subnode_offset(fdt, node, Name);
-        if (cpu_node < 0) {
+
+        // If the 'cpus' node did not exist then creates the 'cpu' nodes. In case 'cpus' node
+        // is provided in the original FDT then we do not add any 'cpu' node.
+        if (!CpusNodeExist) {
           cpu_node = fdt_add_subnode(fdt, node, Name);
           fdt_setprop_string(fdt, cpu_node, "device-type", "cpu");
           fdt_setprop(fdt, cpu_node, "reg", &Index, sizeof(Index));
+        } else {
+          cpu_node = fdt_subnode_offset(fdt, node, Name);
         }

         // If Power State Coordination Interface (PSCI) is not supported then it is expected the secondary
         // cores are spinning waiting for the Operating System to release them
-        if (PsciSmcSupported == FALSE) {
+        if ((PsciSmcSupported == FALSE) && (cpu_node >= 0)) {
           // We as the bootloader are responsible for either creating or updating
           // these entries. Do not trust the entries in the DT. We only know about
           // 'spin-table' type. Do not try to update other types if defined.


Consistent error message handling for stores and retrieves

git-svn-id: 4403cc1077de9de61ebbb06aa07b0a825c555f62@14301 dc4e9af1-7f46-4ead-bba6-71afc04862de

--- code/src/tcl/adlb/tcl-adlb.c
+++ code/src/tcl/adlb/tcl-adlb.c
@@ -288,19 +288,33 @@
 /** We only free this if we are the outermost MPI communicator */
 static bool must_comm_free = false;

-#define CHECK_ADLB_STORE(rc, id) {                                      \
-  TCL_CONDITION(rc != ADLB_REJECTED,                                    \
-                "adlb::store <%"PRId64"> failed: double assign!", id);  \
-  TCL_CONDITION(rc == ADLB_SUCCESS,                                     \
-                "adlb::store <%"PRId64"> failed!", id);                 \
-}
-
-#define CHECK_ADLB_STORE_SUB(rc, id, sub) {                                  \
+#define CHECK_ADLB_STORE(rc, id, sub) {                                      \
+  if (adlb_has_sub((sub))) {                                                 \
+    TCL_CONDITION(rc != ADLB_REJECTED,                                       \
+                  "<%"PRId64"> failed: double assign!", (id));               \
+    TCL_CONDITION(rc == ADLB_SUCCESS,                                        \
+                  "<%"PRId64"> failed!", (id));                              \
+  } else {                                                                   \
   TCL_CONDITION(rc != ADLB_REJECTED, "<%"PRId64">[\"%.*s\"], double assign!",\
-                  id, (int)sub.length, (const char*)sub.key);                \
-  TCL_CONDITION(rc == ADLB_SUCCESS, "<%"PRId64">[\"%.*s\"], double assign!",\
-                  id, (int)sub.length, (const char*)sub.key);                \
-}
+                  (id), (int)(sub).length, (const char*)(sub).key);          \
+  TCL_CONDITION(rc == ADLB_SUCCESS, "<%"PRId64">[\"%.*s\"] failed",          \
+                  (id), (int)(sub).length, (const char*)(sub).key);          \
+  }                                                                          \
+}
+
+#define CHECK_ADLB_RETRIEVE(rc, handle, result_len) { \
+  if (adlb_has_sub((handle).sub.val)) { \
+    TCL_CONDITION((rc) == ADLB_SUCCESS, "<%"PRId64">[%.*s] failed!", \
+        (handle).id, (int)(handle).sub.val.length, \
+        (const char*)(handle).sub.val.key); \
+    TCL_CONDITION((result_len) >= 0, "<%"PRId64">[%.*s] not found!", (handle).id, \
+            (int)(handle).sub.val.length, (const char*)(handle).sub.val.key); \
+  } else { \
+    TCL_CONDITION((rc) == ADLB_SUCCESS, "<%"PRId64"> failed!", (handle).id); \
+    TCL_CONDITION((result_len) >= 0, "<%"PRId64"> not found!", (handle).id); \
+  } \
+}
+
 static int
 ADLB_Retrieve_Impl(ClientData cdata, Tcl_Interp *interp,
                   int objc, Tcl_Obj *const objv[], bool decr);
@@ -2446,7 +2460,7 @@
   if (data.data != xfer_buf.data)
     ADLB_Free_binary_data(&data);

-  CHECK_ADLB_STORE(store_rc, handle.id);
+  CHECK_ADLB_STORE(store_rc, handle.id, handle.sub.val);

   rc = ADLB_PARSE_HANDLE_CLEANUP(&handle);
   TCL_CHECK(rc);
@@ -2495,10 +2509,10 @@
   int rc;
   int argpos = 1;

+  Tcl_Obj *handle_obj = objv[argpos++];
   tcl_adlb_handle handle;
-  rc = ADLB_PARSE_HANDLE(objv[argpos++], &handle, true);
-  TCL_CHECK_MSG(rc, "Invalid handle %s",
-                Tcl_GetString(objv[argpos-1]));
+  rc = ADLB_PARSE_HANDLE(handle_obj, &handle, true);
+  TCL_CHECK_MSG(rc, "Invalid handle %s", Tcl_GetString(handle_obj));

   int decr_amount = 0;
   if (decr) {
@@ -2522,10 +2536,7 @@
   refcounts.decr_self.read_refcount = decr_amount;
   int ret_rc = ADLB_Retrieve(handle.id, handle.sub.val, refcounts,
                      &type, xfer, &length);
-
-  TCL_CONDITION(ret_rc == ADLB_SUCCESS, "<%"PRId64"> failed!", handle.id);
-  TCL_CONDITION(length >= 0, "adlb::retrieve <%"PRId64"> not found!",
-                            handle.id);
+  CHECK_ADLB_RETRIEVE(ret_rc, handle, length);

   rc = ADLB_PARSE_HANDLE_CLEANUP(&handle);
   TCL_CHECK(rc);
@@ -2739,21 +2750,9 @@
   // Retrieve the data, actual type, and length from server
   adlb_data_type type;
   int length;
-  rc = ADLB_Retrieve(handle.id, handle.sub.val, refcounts, &type, xfer,
+  adlb_code ac = ADLB_Retrieve(handle.id, handle.sub.val, refcounts, &type, xfer,
                      &length);
-  if (adlb_has_sub(handle.sub.val))
-  {
-    TCL_CONDITION(rc == ADLB_SUCCESS, "<%"PRId64">[%.*s] failed!",
-        handle.id, (int)handle.sub.val.length,
-        (const char*)handle.sub.val.key);
-    TCL_CONDITION(length >= 0, "<%"PRId64">[%.*s] not found!", handle.id,
-            (int)handle.sub.val.length, (const char*)handle.sub.val.key);
-  }
-  else
-  {
-    TCL_CONDITION(rc == ADLB_SUCCESS, "<%"PRId64"> failed!", handle.id);
-    TCL_CONDITION(length >= 0, "<%"PRId64"> not found!", handle.id);
-  }
+  CHECK_ADLB_RETRIEVE(ac, handle, length);

   ADLB_PARSE_HANDLE_CLEANUP(&handle);

@@ -2773,8 +2772,6 @@
   Tcl_SetObjResult(interp, result);
   return TCL_OK;
 }
-
-
 static inline int
 set_enumerate_params(Tcl_Interp *interp, Tcl_Obj *const objv[],
                      const char* token, bool *include_keys,
@@ -3096,9 +3093,8 @@
   int length;
   int ret_rc = ADLB_Retrieve(handle.id, handle.sub.val, refcounts,
                              &type, xfer, &length);
-
-  TCL_CONDITION(ret_rc == ADLB_SUCCESS, "<%"PRId64"> failed!",
-                handle.id);
+  CHECK_ADLB_RETRIEVE(ret_rc, handle, length);
+
   TCL_CONDITION(type == ADLB_DATA_TYPE_BLOB,
                 "type mismatch: expected: %i actual: %i",
                 ADLB_DATA_TYPE_BLOB, type);
@@ -3359,7 +3355,7 @@

   rc = ADLB_Store(id, ADLB_NO_SUB, ADLB_DATA_TYPE_BLOB, pointer, length,
                   decr, ADLB_NO_REFC);
-  CHECK_ADLB_STORE(rc, id);
+  CHECK_ADLB_STORE(rc, id, ADLB_NO_SUB);

   return TCL_OK;
 }
@@ -3402,7 +3398,7 @@
   }
   rc = ADLB_Store(id, ADLB_NO_SUB, ADLB_DATA_TYPE_BLOB,
         xfer, length*(int)sizeof(double), decr, ADLB_NO_REFC);
-  CHECK_ADLB_STORE(rc, id);
+  CHECK_ADLB_STORE(rc, id, ADLB_NO_SUB);

   return TCL_OK;
 }
@@ -3445,7 +3441,7 @@
   }
   rc = ADLB_Store(id, ADLB_NO_SUB, ADLB_DATA_TYPE_BLOB,
         xfer, length*(int)sizeof(int), decr, ADLB_NO_REFC);
-  CHECK_ADLB_STORE(rc, id);
+  CHECK_ADLB_STORE(rc, id, ADLB_NO_SUB);

   return TCL_OK;
 }
@@ -3624,7 +3620,7 @@
                   member.data, member.length, decr, store_rc);

   // TODO: support binary subscript
-  CHECK_ADLB_STORE_SUB(rc, handle.id, handle.sub.val);
+  CHECK_ADLB_STORE(rc, handle.id, handle.sub.val);

   // Free if needed
   if (member.data != xfer_buf.data)
@@ -3800,9 +3796,7 @@
       break;
   } while (spin && rc == ADLB_SUCCESS && len < 0);

-  TCL_CONDITION(rc == ADLB_SUCCESS, "lookup failed for: "
-          "<%"PRId64">[%.*s]", handle.id, (int)handle.sub.val.length,
-          (const char*)handle.sub.val.key);
+  CHECK_ADLB_RETRIEVE(rc, handle, len);

   // TODO: support binary subscript
   TCL_CONDITION(len >= 0, "adlb::lookup <%"PRId64">[\"%.*s\"] not found",


Change needed by Root v3-03-06

Change needed by Root v3-03-06

--- CONTAINERS/AliCTypes.h
+++ CONTAINERS/AliCTypes.h
@@ -27,6 +27,9 @@

+// Removed:
+// friend operator>>
+// _ClassInit_
 #define LClassDef(name,id) \
 private: \
    static TClass *fgIsA; \
@@ -38,8 +41,6 @@
    TClass *IsA() const { return name::Class(); } \
    void ShowMembers(TMemberInspector &insp, char *parent); \
    void Streamer(TBuffer &b); \
-   friend TBuffer &operator>>(TBuffer &buf, name *&obj); \
-   _ClassInit_(name) \
    static const char *DeclFileName() { return __FILE__; } \
    static int DeclFileLine() { return __LINE__; } \
    static const char *ImplFileName(); \
@@ -47,6 +48,7 @@
    void    *operator new(size_t sz) { return TStorage::ObjectAlloc(sz); } \
    void    *operator new(size_t sz, void *vp) { return vp; } \
    void  Dump();
+   static int ImplFileLine();

 #define LClassImp(name)  \
   void name::Dump() { \


this had failed to compile for unicode refactored; put common code in base class

--- Utils/StringAdaptor.h
+++ Utils/StringAdaptor.h
@@ -9,70 +9,101 @@
 #include <Utils/convertstream.h>
 #include <Utils/utf8ucs2codecvt.h>

+
 namespace Arabica
 {

+//forward decl
 template<class stringT>
-class default_string_adaptor
+class default_string_adaptor;
+
+
+template<class stringT>
+class default_string_adaptor_base
 {
 public:
   typedef stringT string_type;
   typedef typename string_type::const_iterator const_iterator;
+  typedef typename string_type::iterator mutable_iterator;
+  typedef typename string_type::iterator iterator;
   typedef typename string_type::value_type value_type;
   typedef typename string_type::size_type size_type;
-  static const size_type npos;
-
-  template<class InputIterator> static string_type construct(InputIterator from, InputIterator to);
-  static string_type construct(const value_type* s);
-
-  static value_type convert_from_utf8(char c);
-  static string_type construct_from_utf8(const char* str);
-  static string_type construct_from_utf8(const char* str, int length);
+
+  static const typename string_type::size_type npos = static_cast<string_type::size_type>(-1);
+
+  //todo: is this safe?
+  template<class InputIterator>
+  static inline string_type construct(InputIterator from, InputIterator to)
+  {
+    return string_type(from, to);
+  }
+
+  static inline string_type construct(const_iterator from, const_iterator to)
+  {
+    return string_type(from, to);
+  }
+
+
+  static string_type construct(const value_type* str)
+  {
+    return str ? string_type(str) : string_type();
+  }
+
+  //todo: fix for utf8
+  static size_type length(const string_type& str) { return str.length(); }
+
+  // all these functions should operate as std::string member functions do
+  static bool empty(const string_type& str) { return str.empty(); }
+  static size_type find(const string_type& str, value_type what) { return str.find(what); }
+  static size_type find(const string_type& str, const string_type& what) { return str.find(what); }
+  static string_type substr(const string_type& str, const size_type& offset) { return str.substr(offset); }
+  static string_type substr(const string_type& str, const size_type& offset, const size_type& count) { return str.substr(offset, count); }
+  static void append(string_type& str, const string_type& a) { str.append(a); }
+  static void insert(string_type& str, size_type offset, const string_type& a) { str.insert(offset, a); }
+  static void replace(string_type& str, size_type offset, size_type count, const string_type& a) { str.replace(offset, count, a); }
+
+  static const_iterator begin(const string_type& str) { return str.begin(); }
+  static const_iterator end(const string_type& str) { return str.end(); }
+
+  static iterator begin(string_type& str) { return str.begin(); }
+  static iterator end(string_type& str) { return str.end(); }
+
+
+  // only used to constuct error strings - don't have to be highly efficient!
+  static std::string asStdString(const string_type& str);
+
 #ifndef ARABICA_NO_WCHAR_T
   static string_type construct_from_utf16(const wchar_t* str);
   static string_type construct_from_utf16(const wchar_t* str, int length);
+  static std::wstring asStdWString(const string_type& str);
+
+  typedef Arabica::convert::basic_iconvertstream<wchar_t, std::char_traits<wchar_t>,
+                               char, std::char_traits<char> > widener_t;
+  typedef Arabica::convert::basic_oconvertstream<wchar_t, std::char_traits<wchar_t>,
+                               char, std::char_traits<char> > narrower_t;
+
+
+  static const std::locale& utf8ucs2_locale()
+  {
+#ifndef ARABICA_VS6_WORKAROUND
+    static const std::locale loc(std::locale(),  new Arabica::convert::utf8ucs2codecvt());
+#else
+    static const std::locale loc(std::_Addfac(std::locale(),  new Arabica::convert::utf8ucs2codecvt()));
 #endif
-
-  // all these functions should operate as std::string member functions do
-  static bool empty(const string_type& str);
-  static size_type find(const string_type& str, const string_type& what);
-  static string_type substr(const string_type& str, const size_type& offset);
-  static string_type substr(const string_type& str, const size_type& offset, const size_type& count);
-  static size_type length(const string_type& str);
-  static void append(string_type& str, const string_type& a);
-  static void insert(string_type& str, size_type offset, const string_type& a);
-  static void replace(string_type& str, size_type offser, size_type count, const string_type& a);
-  static const_iterator begin(const string_type& str);
-  static const_iterator end(const string_type& str);
-
-  // only used to constuct error strings - don't have to be highly efficient!
-  static std::string asStdString(const string_type& str);
-#ifndef ARABICA_NO_WCHAR_T
-  static std::wstring asStdWString(const string_type& str);
-#endif
-}; // class default_string_adaptor
+    return loc;
+  }
+#endif //ARABICA_NO_WCHAR_T
+
+}; // class default_string_adaptor_base
+
+
+

 // specialize for std::string and std::wstring
 template<>
-class default_string_adaptor<std::string>
+class default_string_adaptor<std::string> : public default_string_adaptor_base<std::string>
 {
 public:
-  typedef std::string string_type;
-  typedef std::string::const_iterator const_iterator;
-  typedef std::string::iterator mutable_iterator;
-  typedef std::string::value_type value_type;
-  typedef std::string::size_type size_type;
-  static const size_type npos = static_cast<size_type>(-1);
-
-  template<class InputIterator> static std::string construct(InputIterator from, InputIterator to)
-  {
-    return std::string(from, to);
-  } // construct
-
-  static std::string construct(const value_type* s)
-  {
-    return std::string(s);
-  } // construct

   static char convert_from_utf8(char c) { return c; }

@@ -80,253 +111,133 @@
   {
     return str ? std::string(str) : std::string();
   } // makeStringT
+
   static std::string construct_from_utf8(const char* str, int length)
   {
     return std::string(str, length);
   } // makeStringT
+
   static const std::string& asStdString(const std::string& str)
   {
     return str;
   } // toStdString

+  static string_type makeStringT(const const_iterator& first, const const_iterator& last)
+  {
+    return string_type(first, last);
+  }
+
+  static string_type makeStringT(const char* str)
+  {
+    return construct_from_utf8(str);
+  }
+
+  static string_type makeStringT(const char* str, int len)
+  {
+    return construct_from_utf8(str, len);
+  }
+
 #ifndef ARABICA_NO_WCHAR_T
-  typedef Arabica::convert::basic_iconvertstream<wchar_t, std::char_traits<wchar_t>,
-                               char, std::char_traits<char> > widener;
-  typedef Arabica::convert::basic_oconvertstream<wchar_t, std::char_traits<wchar_t>,
-                               char, std::char_traits<char> > narrower;
-
   static std::string construct_from_utf16(const wchar_t* str)
   {
-#ifndef ARABICA_VS6_WORKAROUND
-    std::locale loc(std::locale(), new Arabica::convert::utf8ucs2codecvt());
-#else
-    std::locale loc(std::_Addfac(std::locale(), new Arabica::convert::utf8ucs2codecvt));
-#endif
-    narrower n;
-    n.imbue(loc);
-
-    n << str;
+    narrower_t n;
+    n.imbue(utf8ucs2_locale());
+    n.str(str ? str : L"");
+    //n << str;
     return n.str();
-  } // makeStringT
+  }

   static std::string construct_from_utf16(const wchar_t* str, int length)
   {
-#ifndef ARABICA_VS6_WORKAROUND
-    std::locale loc(std::locale(), new Arabica::convert::utf8ucs2codecvt());
-#else
-    std::locale loc(std::_Addfac(std::locale(), new Arabica::convert::utf8ucs2codecvt));
-#endif
-    narrower n;
-    n.imbue(loc);
-
-    for(int i = 0; i < length; ++i)
-      n << str[i];
+    narrower_t n;
+    n.imbue(utf8ucs2_locale());
+    n.str(std::wstring(str, length));
+    //for(int i = 0; i < length; ++i)
+    //  n << str[i];
     return n.str();
   } // construct_from_utf16

   static std::wstring asStdWString(const std::string& str)
   {
-#ifndef ARABICA_VS6_WORKAROUND
-    std::locale loc(std::locale(), new Arabica::convert::utf8ucs2codecvt());
-#else
-    std::locale loc(std::_Addfac(std::locale(), new Arabica::convert::utf8ucs2codecvt));
-#endif
-    widener w;
+    widener_t w;
+    w.imbue(utf8ucs2_locale());
     w.str(str);
     return w.str();
   } // toStdWString
-#endif
-
-  static bool empty(const std::string& str)
-  {
-    return str.empty();
-  } // empty
-
-  static size_type find(const std::string& str, const std::string& what)
-  {
-    return str.find(what);
-  } // find
-
-  static size_type find(const std::string& str, char what)
-  {
-    return str.find(what);
-  } // find
-
-  static std::string substr(const std::string& str, const size_type& offset)
-  {
-    return str.substr(offset);
-  } // substr
-
-  static std::string substr(const std::string& str, const size_type& offset, const size_type& count)
-  {
-    return str.substr(offset, count);
-  } // substr
-
-  static size_type length(const std::string& str)
-  {
-    return str.length(); // TODO - fix me for utf8
-  } // length
-
-  static void append(std::string& str, const std::string& a)
-  {
-    str.append(a);
-  } // append
-
-  static void insert(std::string& str, size_type offset, const std::string& a)
-  {
-    str.insert(offset, a);
-  } // insert
-
-  static void replace(std::string& str, size_type offset, size_type count, const std::string& a)
-  {
-    str.replace(offset, count, a);
-  } // replace
-
-  static const_iterator begin(const std::string& str) { return str.begin(); }
-  static mutable_iterator begin(std::string& str) { return str.begin(); }
-  static const_iterator end(const std::string& str) { return str.end(); }
-  static mutable_iterator end(std::string& str) { return str.end(); }
-}; // class default_string_adaptor
+#endif //ARABICA_NO_WCHAR_T
+
+}; // class default_string_adaptor<std::string>
+

 #ifndef ARABICA_NO_WCHAR_T
+
 template<>
-class default_string_adaptor<std::wstring>
-{
-  typedef Arabica::convert::basic_oconvertstream<wchar_t, std::char_traits<wchar_t>,
-                               char, std::char_traits<char> > narrower;
-  typedef Arabica::convert::basic_oconvertstream<char, std::char_traits<char>,
-                                                 wchar_t, std::char_traits<wchar_t> > widener;
+class default_string_adaptor<std::wstring> : public default_string_adaptor_base<std::wstring>
+{
 public:
-  typedef std::wstring stringT;
-  typedef std::wstring::const_iterator const_iterator;
-  typedef std::wstring::iterator mutable_iterator;
-  typedef std::wstring::value_type value_type;
-  typedef std::wstring::size_type size_type;
-  static const size_type npos = static_cast<size_type>(-1);
-
-  template<class InputIterator> static std::wstring construct(InputIterator from, InputIterator to)
-  {
-    return std::wstring(from, to);
-  } // construct
-
-  static std::wstring construct(const value_type* s)
-  {
-    return std::wstring(s);
-  } // construct
-
-  static wchar_t convert_from_utf8(char c)
-  {
+
+  static wchar_t makeValueT(char c)
+  {
     return static_cast<wchar_t>(c);
-  } // convert_from_utf8
-
-  static std::wstring construct_from_utf8(const char* str)
-  {
-#ifndef ARABICA_VS6_WORKAROUND
-    std::locale loc(std::locale(), new Arabica::convert::utf8ucs2codecvt());
-#else
-    std::locale loc(std::_Addfac(std::locale(), new Arabica::convert::utf8ucs2codecvt));
-#endif
-    widener w;
-    w.imbue(loc);
-    if(str)
-      w << str;
-    else
-      w.str("");
+  } // makeValueT
+
+  static std::wstring construct_from_utf8(const char* str)
+  {
+    widener_t w;
+    w.imbue(utf8ucs2_locale());
+    w.str(str ? str : "");
     return w.str();
-  } // construct_from_utf8
-
-  static std::wstring construct_from_utf8(const char* str, int length)
-  {
-#ifndef ARABICA_VS6_WORKAROUND
-    std::locale loc(std::locale(), new Arabica::convert::utf8ucs2codecvt());
-#else
-    std::locale loc(std::_Addfac(std::locale(), new Arabica::convert::utf8ucs2codecvt));
-#endif
-    widener w;
-    w.imbue(loc);
-    for(int i = 0; i < length; ++i)
-      w << str[i];
+  }
+
+  static std::wstring construct_from_utf8(const char* str, int length)
+  {
+    widener_t w;
+    w.imbue(utf8ucs2_locale());
+    w.str(std::string(str, length));
     return w.str();
-  } // construct_from_utf8
-
-  static std::wstring construct_from_utf16(const wchar_t* str)
+  }
+
+  static std::wstring construct_from_utf16(const wchar_t* str)
   {
     return str ? std::wstring(str) : std::wstring();
-  } // construct_from_utf16
-
-  static std::wstring construct_from_utf16(const wchar_t* str, int length)
+  }
+
+  static std::wstring construct_from_utf16(const wchar_t* str, int length)
   {
     return std::wstring(str, length);
-  } // construct_from_utf16
+  }
+
+  static string_type makeStringT(const const_iterator& first, const const_iterator& last)
+  {
+    return string_type(first, last);
+  }
+
+  static string_type makeStringT(const char* str)
+  {
+    return construct_from_utf8(str);
+  }
+
+  static string_type makeStringT(const char* str, int len)
+  {
+    return construct_from_utf8(str, len);
+  }

   static std::string asStdString(const std::wstring& str)
   {
-#ifndef ARABICA_VS6_WORKAROUND
-    std::locale loc(std::locale(), new Arabica::convert::utf8ucs2codecvt());
-#else
-    std::locale loc(std::_Addfac(std::locale(), new Arabica::convert::utf8ucs2codecvt));
-#endif
-    narrower n;
-    n.imbue(loc);
-    n << str;
+    narrower_t n;
+    n.imbue(utf8ucs2_locale());
+    n.str(str);
     return n.str();
   } // toStdString

-  static const std::wstring& asStdWString(const std::wstring& str)
+  static const std::wstring& asStdWString(const std::wstring& str)
   {
     return str;
   } // toStdWString

-  static bool empty(const std::wstring& str)
-  {
-    return str.empty();
-  } // empty
-
-  static size_type find(const std::wstring& str, const std::wstring& what)
-  {
-    return str.find(what);
-  } // find
-
-  static size_type find(const std::wstring& str, wchar_t what)
-  {
-    return str.find(what);
-  } // find
-
-  static std::wstring substr(const std::wstring& str, const size_type& offset)
-  {
-    return str.substr(offset);
-  } // substr
-
-  static std::wstring substr(const std::wstring& str, const size_type& offset, const size_type& count)
-  {
-    return str.substr(offset, count);
-  } // substr
-
-  static size_type length(const std::wstring& str)
-  {
-    return str.length();
-  } // length
-
-  static void append(std::wstring& str, const std::wstring& a)
-  {
-    str.append(a);
-  } // append
-
-  static void insert(std::wstring& str, size_type offset, const std::wstring& a)
-  {
-    str.insert(offset, a);
-  } // insert
-
-  static void replace(std::wstring& str, size_type offset, size_type count, const std::wstring& a)
-  {
-    str.replace(offset, count, a);
-  } // replace
-
-  static const_iterator begin(const std::wstring& str) { return str.begin(); }
-  static mutable_iterator begin(std::wstring& str) { return str.begin(); }
-  static const_iterator end(const std::wstring& str) { return str.end(); }
-  static mutable_iterator end(std::wstring& str) { return str.end(); }
-}; // class default_string_adaptor
+}; // class default_string_adaptor<std::wstring>
+
+
 #endif // ARABICA_NO_WCHAR_T

 } // namespace Arabica


Save some space and copying by combining the buffer which saves source
data with the buffer passed to the vdelta routine.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@837684 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_delta/text_delta.c
+++ subversion/libsvn_delta/text_delta.c
@@ -70,8 +70,8 @@
   apr_pool_t *pool;             /* Pool to allocate stream data from. */
   svn_boolean_t more;           /* TRUE if there are more data in the pool. */
   apr_off_t pos;                /* Offset of next read in source file. */
-  char *sbuf;                   /* Source view data from the last window. */
-  apr_size_t sbuf_len;
+  char *buf;                    /* Buffer for vdelta data. */
+  apr_size_t saved_source_len;  /* Amount of source data saved in buf. */
 };

@@ -199,8 +199,8 @@
   (*stream)->pool = subpool;
   (*stream)->more = TRUE;
   (*stream)->pos = 0;
-  (*stream)->sbuf = apr_palloc (subpool, svn_txdelta__window_size);
-  (*stream)->sbuf_len = 0;
+  (*stream)->buf = apr_palloc (subpool, 3 * svn_txdelta__window_size);
+  (*stream)->saved_source_len = 0;
 }

@@ -246,67 +246,57 @@
     }
   else
     {
-      svn_error_t *err = SVN_NO_ERROR;
-      apr_size_t source_len = svn_txdelta__window_size;
+      svn_error_t *err;
+      apr_size_t total_source_len;
+      apr_size_t new_source_len = svn_txdelta__window_size;
       apr_size_t target_len = svn_txdelta__window_size;
-      apr_size_t source_total, copy_len;
-      apr_pool_t *temp_pool = svn_pool_create (stream->pool);
-      char *buffer;

       /* If there is no saved source data yet, read an extra half
          window of data this time to get things started. */
-      if (stream->sbuf_len == 0)
-        source_len += svn_txdelta__window_size / 2;
-
-      /* Prepare the vdelta buffer and copy in the stashed source data. */
-      buffer = apr_palloc (temp_pool,
-                           stream->sbuf_len + source_len + target_len);
-      memcpy (buffer, stream->sbuf, stream->sbuf_len);
-
-      /* Read the source and target streams. */
-      err = stream->source_fn (stream->source_baton, buffer + stream->sbuf_len,
-                               &source_len, temp_pool);
+      if (stream->saved_source_len == 0)
+        new_source_len += svn_txdelta__window_size / 2;
+
+      /* Read the source stream. */
+      err = stream->source_fn (stream->source_baton,
+                               stream->buf + stream->saved_source_len,
+                               &new_source_len, stream->pool);
+      total_source_len = stream->saved_source_len + new_source_len;
+
+      /* Read the target stream. */
       if (err == SVN_NO_ERROR)
         err = stream->target_fn (stream->target_baton,
-                                 buffer + stream->sbuf_len + source_len,
-                                 &target_len, temp_pool);
+                                 stream->buf + total_source_len,
+                                 &target_len, stream->pool);
       if (err != SVN_NO_ERROR)
         return err;
-      stream->pos += source_len;
-
-      /* Stash the last window's worth of data from the source view. */
-      source_total = stream->sbuf_len + source_len;
-      copy_len = (source_total < svn_txdelta__window_size) ? source_total
-        : svn_txdelta__window_size;
-      memcpy (stream->sbuf, buffer + source_total - copy_len, copy_len);
-      stream->sbuf_len = copy_len;
+      stream->pos += new_source_len;

       /* Forget everything if there's no target data. */
-      *window = NULL;
       if (target_len == 0)
         {
+          *window = NULL;
           stream->more = FALSE;
-          apr_destroy_pool (temp_pool);
           return SVN_NO_ERROR;
         }

-      /* Create the delta window */
+      /* Create the delta window. */
       *window = svn_txdelta__make_window (stream->pool);
-      (*window)->sview_offset = stream->pos - source_total;
-      (*window)->sview_len = source_total;
+      (*window)->sview_offset = stream->pos - total_source_len;
+      (*window)->sview_len = total_source_len;
       (*window)->tview_len = target_len;
-      svn_txdelta__vdelta (*window, buffer,
-                           source_total, target_len,
-                           temp_pool);
+      svn_txdelta__vdelta (*window, stream->buf,
+                           total_source_len, target_len,
+                           stream->pool);
+
+      /* Save the last window's worth of data from the source view. */
+      stream->saved_source_len = (total_source_len < svn_txdelta__window_size)
+        ? total_source_len : svn_txdelta__window_size;
+      memmove (stream->buf,
+               stream->buf + total_source_len - stream->saved_source_len,
+               stream->saved_source_len);

       /* That's it. */
-      apr_destroy_pool (temp_pool);
-      if (err)
-        {
-          svn_txdelta_free_window (*window);
-          *window = NULL;
-        }
-      return err;
+      return SVN_NO_ERROR;
     }
 }


Create 01_Domashno.c

Create 01_Domashno.c

error: pathspec 'V/03/12/01_Domashno.c' did not match any file(s) known to git


added buffer clearing

added buffer clearing

--- CProject/UWFSSD/User.c
+++ CProject/UWFSSD/User.c
@@ -473,7 +473,7 @@
 	//display edit menu
 	while(choice!=9){
 		displayPatient(uuid);
-		printf("****Edit Patient\n");
+		printf("\n****Edit Patient\n");
 		printf("[1] Insurance\n");
 		printf("[2] Add Immunization\n");
 		printf("[3] Add Medication\n");
@@ -488,6 +488,7 @@
 		switch(choice){
 			case 1:
 			;
+			while(getchar()!='\n');//clean buffer
 				//edit insurance
 				char name[40];
 				char policyNumber[30];
@@ -515,7 +516,7 @@
 			break;
 			case 6:
 			;
-
+				while(getchar()!='\n');//clean buffer
 				char firstName[30];
 				initializeString(firstName,30);
 				char lastName[30];


Use correct type for entry modify flags.

* subversion/libsvn_wc/update_editor.c (add_directory): Use apr_uint64_t
  instead of apr_uint32_t for entry modify flags.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@862896 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_wc/update_editor.c
+++ subversion/libsvn_wc/update_editor.c
@@ -1190,7 +1190,7 @@
     {
       svn_wc_adm_access_t *adm_access;
       svn_wc_entry_t tmp_entry;
-      apr_uint32_t modify_flags = SVN_WC__ENTRY_MODIFY_KIND |
+      apr_uint64_t modify_flags = SVN_WC__ENTRY_MODIFY_KIND |
         SVN_WC__ENTRY_MODIFY_DELETED | SVN_WC__ENTRY_MODIFY_ABSENT;

       SVN_ERR(svn_wc_adm_retrieve(&adm_access, eb->adm_access,


Remove some usages of svn_wc_context_t from the absent handling in the update
editor and check for obstructing working copies.

* subversion/libsvn_wc/update_editor.c
  (edit_baton): Remove wc_ctx.
  (absent_file_or_dir): Rename to...
  (absent_node): ... this and use the wc_db api to obtain the information we
    need. Use db kind for argument. Handle obstructing working copies and
    local additions explicitly. Use the repository information from our baton
    instead of scanning. Do work in a scratch pool.
  (absent_file,
   absent_dir): Update caller.
  (make_editor): Don't put wc_ctx in baton.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@1099184 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_wc/update_editor.c
+++ subversion/libsvn_wc/update_editor.c
@@ -159,7 +159,6 @@

   /* The DB handle for managing the working copy state.  */
   svn_wc__db_t *db;
-  svn_wc_context_t *wc_ctx;

   /* Array of file extension patterns to preserve as extensions in
      generated conflict files. */
@@ -2565,52 +2564,100 @@

 /* Common code for 'absent_file' and 'absent_directory'. */
 static svn_error_t *
-absent_file_or_dir(const char *path,
-                   svn_node_kind_t kind,
-                   void *parent_baton,
-                   apr_pool_t *pool)
+absent_node(const char *path,
+            svn_wc__db_kind_t absent_kind,
+            void *parent_baton,
+            apr_pool_t *pool)
 {
-  const char *name = svn_dirent_basename(path, pool);
-  const char *local_abspath;
   struct dir_baton *pb = parent_baton;
   struct edit_baton *eb = pb->edit_baton;
-  const char *repos_relpath;
-  const char *repos_root_url;
-  const char *repos_uuid;
-  svn_boolean_t is_added;
-  svn_node_kind_t existing_kind;
-  svn_wc__db_kind_t db_kind
-    = kind == svn_node_dir ? svn_wc__db_kind_dir : svn_wc__db_kind_file;
-
-  local_abspath = svn_dirent_join(pb->local_abspath, name, pool);
+  apr_pool_t *scratch_pool = svn_pool_create(pool);
+  const char *name = svn_dirent_basename(path, NULL);
+  const char *local_abspath;
+  svn_error_t *err;
+  svn_wc__db_status_t status;
+  svn_wc__db_kind_t kind;
+
+  if (pb->skip_this)
+    return SVN_NO_ERROR;
+
+  local_abspath = svn_dirent_join(pb->local_abspath, name, scratch_pool);

   /* If an item by this name is scheduled for addition that's a
      genuine tree-conflict.  */
-  SVN_ERR(svn_wc_read_kind(&existing_kind, eb->wc_ctx, local_abspath, TRUE,
-                           pool));
-  if (existing_kind != svn_node_none)
-    {
-      SVN_ERR(svn_wc__node_is_added(&is_added, eb->wc_ctx, local_abspath,
-                                    pool));
-      if (is_added)
-        return svn_error_createf(
+  err = svn_wc__db_read_info(&status, &kind, NULL, NULL, NULL, NULL, NULL,
+                             NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                             NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+                             NULL, NULL, NULL, NULL,
+                             eb->db, local_abspath,
+                             scratch_pool, scratch_pool);
+
+  if (err)
+    {
+      if (err->apr_err != SVN_ERR_WC_PATH_NOT_FOUND)
+        return svn_error_return(err);
+
+      svn_error_clear(err);
+      status = svn_wc__db_status_not_present;
+      kind = svn_wc__db_kind_unknown;
+    }
+
+  if (status == svn_wc__db_status_normal
+      && kind == svn_wc__db_kind_dir)
+    {
+      /* We found an obstructing working copy!
+
+         We can do two things now:
+            1) notify the user, record a skip, etc.
+            2) Just record the absent node in BASE in the parent
+               working copy.
+
+         As option 2 happens to be exactly what we do anyway, lets do that.
+      */
+    }
+  else if (status == svn_wc__db_status_not_present
+           || status == svn_wc__db_status_absent
+           || status == svn_wc__db_status_excluded)
+    {
+      /* The BASE node is not actually there, so we can safely turn it into
+         an absent node */
+    }
+  else
+    {
+      /* We have a local addition. If this would be a BASE node it would have
+         been deleted before we get here. (Which might have turned it into
+         a copy).
+
+         ### This should be recorded as a tree conflict and the update
+         ### can just continue, as we can just record the absent status
+         ### in BASE.
+       */
+      SVN_ERR_ASSERT(status != svn_wc__db_status_normal);
+
+      return svn_error_createf(
          SVN_ERR_WC_OBSTRUCTED_UPDATE, NULL,
          _("Failed to mark '%s' absent: item of the same name is already "
            "scheduled for addition"),
-         svn_dirent_local_style(path, pool));
-    }
-
-  SVN_ERR(svn_wc__db_scan_base_repos(&repos_relpath, &repos_root_url,
-                                     &repos_uuid, eb->db, pb->local_abspath,
-                                     pool, pool));
-  repos_relpath = svn_dirent_join(repos_relpath, name, pool);
-
-  SVN_ERR(svn_wc__db_base_add_absent_node(eb->db, local_abspath,
-                                          repos_relpath, repos_root_url,
-                                          repos_uuid, *(eb->target_revision),
-                                          db_kind, svn_wc__db_status_absent,
-                                          NULL, NULL,
-                                          pool));
+         svn_dirent_local_style(local_abspath, pool));
+    }
+
+  {
+    const char *repos_relpath;
+    repos_relpath = svn_relpath_join(pb->new_relpath, name, scratch_pool);
+
+    /* Insert an absent node below the parent node to note that this child
+       is absent. (This puts it in the parent db if the child is obstructed) */
+    SVN_ERR(svn_wc__db_base_add_absent_node(eb->db, local_abspath,
+                                            repos_relpath, eb->repos_root,
+                                            eb->repos_uuid,
+                                            *(eb->target_revision),
+                                            absent_kind,
+                                            svn_wc__db_status_absent,
+                                            NULL, NULL,
+                                            scratch_pool));
+  }
+
+  svn_pool_destroy(scratch_pool);

   return SVN_NO_ERROR;
 }
@@ -2622,7 +2669,7 @@
             void *parent_baton,
             apr_pool_t *pool)
 {
-  return absent_file_or_dir(path, svn_node_file, parent_baton, pool);
+  return absent_node(path, svn_wc__db_kind_file, parent_baton, pool);
 }

@@ -2632,7 +2679,7 @@
                  void *parent_baton,
                  apr_pool_t *pool)
 {
-  return absent_file_or_dir(path, svn_node_dir, parent_baton, pool);
+  return absent_node(path, svn_wc__db_kind_dir, parent_baton, pool);
 }

@@ -4181,7 +4228,6 @@
   eb->repos_root               = repos_root;
   eb->repos_uuid               = repos_uuid;
   eb->db                       = wc_ctx->db;
-  eb->wc_ctx                   = wc_ctx;
   eb->target_basename          = target_basename;
   eb->anchor_abspath           = anchor_abspath;


Remove unnecessary code.  We haven't been using props timestamps
for some time now...

* subversion/libsvn_wc/update_editor.c
  (merge_props): Don't write log command to set properties timestamp, which,
  in the end, won't be written out anyway.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@863418 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_wc/update_editor.c
+++ subversion/libsvn_wc/update_editor.c
@@ -2055,24 +2055,6 @@
                                    entry_props, pool));
   else
     *lock_state = svn_wc_notify_lock_state_unchanged;
-
-  /* Possibly write log commands to tweak prop entry timestamp. */
-  if (regular_props)
-    {
-      svn_boolean_t prop_modified;
-
-      /* Are the working file's props locally modified? */
-      SVN_ERR(svn_wc_props_modified_p(&prop_modified,
-                                      file_path, adm_access,
-                                      pool));
-
-      /* Log entry which sets a new property timestamp, but only if
-         there are no local changes to the props. */
-      if (! prop_modified)
-        SVN_ERR(svn_wc__loggy_set_entry_timestamp_from_wc
-                (&log_accum, adm_access,
-                 base_name, SVN_WC__ENTRY_ATTR_PROP_TIME, pool));
-    }

   /* This writes a whole bunch of log commands to install wcprops.  */
   if (wc_props)


clean up SK_WALK_DECAL_IN_1616

clean up SK_WALK_DECAL_IN_1616

Change-Id: I6b7ef512235dfc986563a3ae03375423e176713d
Reviewed-on: https://skia-review.googlesource.com/c/173360
Reviewed-by: Mike Klein <14574f09dfa9b4e14759b88c3426a495a0e627b0@google.com>
Commit-Queue: Mike Klein <14574f09dfa9b4e14759b88c3426a495a0e627b0@google.com>

--- src/core/SkBitmapProcState_matrix.h
+++ src/core/SkBitmapProcState_matrix.h
@@ -43,18 +43,13 @@
 #ifdef CHECK_FOR_DECAL
     // TODO: can_truncate_to_fixed_for_decal() is kind of misnamed now that
     // we're not really stepping in SkFixed (16.16) anymore.
-    SkFixed fixedFx = SkFractionalIntToFixed(fx);
-    const SkFixed fixedDx = SkFractionalIntToFixed(dx);
-    if (can_truncate_to_fixed_for_decal(fixedFx, fixedDx, count, maxX)) {
+    if (can_truncate_to_fixed_for_decal(SkFractionalIntToFixed(fx),
+                                        SkFractionalIntToFixed(dx), count, maxX)) {
         while (count --> 0) {
+            SkFixed fixedFx = SkFractionalIntToFixed(fx);
             SkASSERT((fixedFx >> (16 + 14)) == 0);
             *xy++ = (fixedFx >> 12 << 14) | ((fixedFx >> 16) + 1);
-        #if defined(SK_WALK_DECAL_IN_1616)
-            fixedFx += fixedDx;
-        #else
             fx += dx;
-            fixedFx = SkFractionalIntToFixed(fx);
-        #endif
         }
         return;
     }


Fix a bug in tree conflict detection whereby "svn update" would fail (if run
from a current working directory in which the file was being added) or behave
wrongly on a file add-with-history.

* subversion/libsvn_wc/update_editor.c
  (add_file_with_history): Pass the victim path, not the parent path, to
    check_tree_conflict().

--- subversion/libsvn_wc/update_editor.c
+++ subversion/libsvn_wc/update_editor.c
@@ -3352,7 +3352,7 @@
                               pb->path, subpool));

   /* Raise a tree conflict if there's already something versioned here. */
-  SVN_ERR(check_tree_conflict(log_accum, pb->path, path_entry, adm_access,
+  SVN_ERR(check_tree_conflict(log_accum, path, path_entry, adm_access,
                               svn_wc_conflict_action_add, pool));

   /* Make a unique file name for the copyfrom text-base. */


berknip: not read thermistor in G3

berknip: not read thermistor in G3

This patch disable read thermistor:TEMP_SENSOR_5V_REGULATOR
when DUT in G3, the thermistor is powered by PP3300_A,
which is power off in G3.

BUG=none
BRANCH=zork
TEST=verify EC not read TEMP_SENSOR_5V_REGULATOR in G3

Signed-off-by: Zick Wei <3d0b14a1e83601e71d11cd2c38ee93ff1dbbc737@quanta.corp-partner.google.com>
Change-Id: Ifdbe81c963455e941ac8e907650f21a296da39ac
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2389721
Reviewed-by: Denis Brockus <6b21e8190fb5e373363fb95271367073a16474ef@chromium.org>
Commit-Queue: Denis Brockus <6b21e8190fb5e373363fb95271367073a16474ef@chromium.org>

--- board/berknip/board.c
+++ board/berknip/board.c
@@ -392,6 +392,10 @@
 		channel = ADC_TEMP_SENSOR_SOC;
 		break;
 	case TEMP_SENSOR_5V_REGULATOR:
+		/* thermistor is not powered in G3 */
+		if (chipset_in_state(CHIPSET_STATE_HARD_OFF))
+			return EC_ERROR_NOT_POWERED;
+
 		channel = ADC_TEMP_SENSOR_5V_REGULATOR;
 		break;
 	default:


i#912: add 4 more Win8 API set mappings.

These 4 are needed to load dbghelp.dll 6.2.9200.16384 (the default win8 and
VS2012 version).

git-svn-id: ed337ca7cdb08c0ba29d8fe58632bb7686892c2d@1959 49cc7528-f6fd-11dd-9d1a-b59b2e1864b6

--- core/win32/loader.c
+++ core/win32/loader.c
@@ -1227,11 +1227,15 @@
              str_case_prefix(name, "API-MS-Win-Core-Heap-Obsolete-L1-1") ||
              str_case_prefix(name, "API-MS-Win-Core-Timezone-L1-1") ||
              str_case_prefix(name, "API-MS-Win-Core-Threadpool-Legacy-L1-1") ||
-             str_case_prefix(name, "API-MS-Win-Core-BEM-L1-1"))
+             str_case_prefix(name, "API-MS-Win-Core-BEM-L1-1") ||
+             str_case_prefix(name, "API-MS-Win-Security-Base-Private-L1-1"))
         return "kernelbase.dll";
     else if (str_case_prefix(name, "API-MS-Win-Core-CRT-L1-1") ||
              str_case_prefix(name, "API-MS-Win-Core-CRT-L2-1"))
         return "msvcrt.dll";
+    else if (str_case_prefix(name, "API-MS-Win-Service-Private-L1-1") ||
+             str_case_prefix(name, "API-MS-Win-Security-Audit-L1-1"))
+        return "sechost.dll";
     else {
         SYSLOG_INTERNAL_WARNING("unknown API-MS-Win pseudo-dll %s", name);
         /* good guess */


fixed minor typo in error message

fixed minor typo in error message

--- src/core/serialization/Serializer.h
+++ src/core/serialization/Serializer.h
@@ -99,7 +99,7 @@
             ifs.close();
             Logger::error(
                     "Invalid index file. Either index files are built with a previous version"
-                            "of engine or copied from a different machine/architecture.");
+                            " of the engine or copied from a different machine/architecture.");
             throw ex;
         }
         ifs.close();


Fix pin change interrupts

Fix pin change interrupts

Fix register mapping of pin change interrupts.

Signed-off-by: Paul Brook <a027184a55211cd23e3f3094f1fdc728df5e0500@nowt.org>

--- variants/minimus32/pins_arduino.h
+++ variants/minimus32/pins_arduino.h
@@ -63,7 +63,7 @@
 extern const uint8_t PROGMEM pin_to_pcint_PGM[24];
 #define digitalPinToPCICR(p)	((pgm_read_byte(pin_to_pcint_PGM + (p)) < 12) ? &PCICR : (uint8_t *)0)
 #define digitalPinToPCICRbit(p) (pgm_read_byte(pin_to_pcint_PGM + (p)) >> 3)
-#define digitalPinToPCMSK(p)    ((pgm_read_byte(pin_to_pcint_PGM + (p)) >> 3) ? &PCMSK0 : &PCMSK1)
+#define digitalPinToPCMSK(p)    ((pgm_read_byte(pin_to_pcint_PGM + (p)) < 8) ? &PCMSK0 : &PCMSK1)
 #define digitalPinToPCMSKbit(p) (pgm_read_byte(pin_to_pcint_PGM + (p)) & 7)

 #define analogPinToChannel(P)  ( -1 )
@@ -233,9 +233,9 @@
 	NOT_ON_TIMER,
 	TIMER0A,	/* 17 */
 	NOT_ON_TIMER,
-	TIMER1A,	/* 18 */
-	NOT_ON_TIMER,
-	TIMER1B,	/* 19 */
+	TIMER1A,	/* 19 */
+	NOT_ON_TIMER,
+	TIMER1B,	/* 21 */
 	NOT_ON_TIMER,
 	NOT_ON_TIMER,
 };


* subversion/libsvn_wc/update_editor.c
  (svn_wc_add_repos_file4):
     Add comment about updating WORKING_NODE vs BASE_NODE.

git-svn-id: f8a4e5e023278da1e04e203c7fe051e3c4285d88@919976 13f79535-47bb-0310-9956-ffa450edef68

--- subversion/libsvn_wc/update_editor.c
+++ subversion/libsvn_wc/update_editor.c
@@ -5986,6 +5986,14 @@
                                         pool));
 }

+/* ### Note that this function is completely different from the rest of the
+       update editor in what it updates. The update editor changes only BASE
+       and ACTUAL and this function just changes WORKING and ACTUAL.
+
+       In the entries world this function shared a lot of code with the
+       update editor but in the wonderful new WC-NG world it will probably
+       do more and more by itself and would be more logically grouped with
+       the add/copy functionality in adm_ops.c and copy.c. */
 svn_error_t *
 svn_wc_add_repos_file4(svn_wc_context_t *wc_ctx,
                        const char *local_abspath,


scarlet: Upgrade the charger IC to RT9467 on rev2

WARNING: This will break charging on rev1 which uses RT9466
since RT9467 has different I2C address from RT9466.

BUG=b:67917615
BRANCH=none
TEST=manually verify charger works on rev2

Change-Id: I633ab783eece033cfe733401e09ee83359a5f265
Signed-off-by: Philip Chen <3ee404f9ef892bc3fda6e6a76e65843b5fa44db2@google.com>
Reviewed-on: https://chromium-review.googlesource.com/725001
Commit-Ready: Philip Chen <3ee404f9ef892bc3fda6e6a76e65843b5fa44db2@chromium.org>
Tested-by: Philip Chen <3ee404f9ef892bc3fda6e6a76e65843b5fa44db2@chromium.org>
Reviewed-by: Shawn N <5259333ce42e3ace6a73988cec7115ed9d3a661a@chromium.org>

--- board/scarlet/board.h
+++ board/scarlet/board.h
@@ -63,7 +63,7 @@
 #define CONFIG_VBOOT_HASH

 #define CONFIG_CHARGER
-#define CONFIG_CHARGER_RT9466
+#define CONFIG_CHARGER_RT9467
 #define CONFIG_CHARGER_INPUT_CURRENT 512
 #define CONFIG_CHARGER_MAINTAIN_VBAT
 #define CONFIG_CHARGER_V2


Revert "Debug: Print arrays"

Revert "Debug: Print arrays"

This reverts commit 31731f281705c2f785db61936447c82279d323ff.

--- unit_tests/verifysortedarrays.h
+++ unit_tests/verifysortedarrays.h
@@ -7,7 +7,6 @@
 #include "gtest/gtest.h"

 #include "verifyarrays.h"
-#include "printarray.h"

 #define VALIDATE_SORTING(to_sort_data, sorted_data, N)                  \
 {                                                                       \
@@ -25,7 +24,7 @@
 {                                                                       \
     SortingFunction(sorted_data, N);                                    \
                                                                         \
-    /*if (verbose)*/                                                        \
+    if (verbose)                                                        \
     {                                                                   \
         std::cout << "Arrays" << std::endl;                             \
         std::cout << "Index Original     Sorted " << std::endl;         \
@@ -72,7 +71,6 @@
 {                                                                       \
     for (int N = 1 ; N <= Nmax ; N++)                                   \
     {                                                                   \
-    std::cout << "#########################################" << std::endl; \
         type *to_sort_data = new type[N];                               \
         type *sorted_data  = new type[N];                               \
                                                                         \
@@ -102,13 +100,7 @@
                                                                         \
     memcpy(sorted_data, to_sort_data, N*sizeof(type));                  \
                                                                         \
-    std::cout << "to_sort_data:" << std::endl; \
-    PrintArray(to_sort_data, N); \
-    std::cout << "known_sorted:" << std::endl; \
-    PrintArray(known_sorted, N); \
     SORT_AND_VERIFY(to_sort_data, sorted_data, N, SortingFunction, verbose); \
-    std::cout << "to_sort_data:" << std::endl; \
-    PrintArray(to_sort_data, N); \
                                                                         \
     for (int i = 0 ; i < N ; i++)                                       \
     {                                                                   \


add absent file

add absent file

error: pathspec 'src/cpp/apps/include/appinterface.h' did not match any file(s) known to git

--- src/cpp/apps/include/appinterface.h
+++ src/cpp/apps/include/appinterface.h
@@ -0,0 +1,146 @@
+#ifndef APP_INTERFACE_H
+#define APP_INTERFACE_H
+
+#include "common/singleton.h"
+#include "twainet/application/twainet.h"
+#include "thread_lib/thread/thread.h"
+
+template<class Application>
+class IApplication : public Singleton<Application>
+{
+public:
+	IApplication(){}
+	virtual ~IApplication(){}
+
+	int Run()
+	{
+		Twainet::TwainetCallback tc = {&IApplication::OnServerConnected, &IApplication::OnServerDisconnected, &IApplication::OnServerCreationFailed,
+					      &IApplication::OnClientConnected, &IApplication::OnClientDisconnected, &IApplication::OnClientConnectionFailed,
+					      &IApplication::OnClientAuthFailed, &IApplication::OnModuleConnected, &IApplication::OnModuleDisconnected,
+					      &IApplication::OnModuleConnectionFailed, &IApplication::OnModuleCreationFailed, &IApplication::OnTunnelConnected,
+					      &IApplication::OnTunnelDisconnected, &IApplication::OnTunnelCreationFailed, &IApplication::OnMessageRecv,
+					      &IApplication::OnInternalConnectionStatusChanged, &IApplication::OnModuleListChanged};
+		Twainet::InitLibrary(tc);
+		InitializeApplication();
+		m_stop.Wait(INFINITE);
+		Twainet::CloseLibrary();
+	}
+
+
+	int Stop()
+	{
+		m_stop.Set();
+		return 0;
+	}
+
+protected:
+	virtual void InitializeApplication() = 0;
+
+public:
+	static void TWAINET_CALL OnModuleCreationFailed(Twainet::Module module)
+	{
+		Application& app = Application::GetInstance();
+		app.OnModuleCreationFailed(module);
+	}
+
+	static void TWAINET_CALL OnServerCreationFailed(Twainet::Module module)
+	{
+		Application& app = Application::GetInstance();
+		app.OnServerCreationFailed(module);
+	}
+
+	static void TWAINET_CALL OnTunnelCreationFailed(Twainet::Module module, const char* sessionId)
+	{
+		Application& app = Application::GetInstance();
+		app.OnTunnelCreationFailed(module, sessionId);
+	}
+
+	static void TWAINET_CALL OnServerConnected(Twainet::Module module, const char* sessionId)
+	{
+		Application& app = Application::GetInstance();
+		app.OnServerConnected(module, sessionId);
+	}
+
+	static void TWAINET_CALL OnClientConnected(Twainet::Module module, const char* sessionId)
+	{
+		Application& app = Application::GetInstance();
+		app.OnClientConnected(module, sessionId);
+	}
+
+	static void TWAINET_CALL OnClientDisconnected(Twainet::Module module, const char* sessionId)
+	{
+		Application& app = Application::GetInstance();
+		app.OnClientDisconnected(module, sessionId);
+	}
+
+	static void TWAINET_CALL OnClientConnectionFailed(Twainet::Module module)
+	{
+		Application& app = Application::GetInstance();
+		app.OnClientConnectionFailed(module);
+	}
+
+	static void TWAINET_CALL OnClientAuthFailed(Twainet::Module module)
+	{
+		Application& app = Application::GetInstance();
+		app.OnClientAuthFailed(module);
+	}
+
+	static void TWAINET_CALL OnServerDisconnected(Twainet::Module module)
+	{
+		Application& app = Application::GetInstance();
+		app.OnServerDisconnected(module);
+	}
+
+	static void TWAINET_CALL OnModuleConnected(Twainet::Module module, const Twainet::ModuleName& moduleId)
+	{
+		Application& app = Application::GetInstance();
+		app.OnModuleConnected(module, moduleId);
+	}
+
+	static void TWAINET_CALL OnModuleDisconnected(Twainet::Module module, const Twainet::ModuleName& moduleId)
+	{
+		Application& app = Application::GetInstance();
+		app.OnModuleDisconnected(module, moduleId);
+	}
+
+	static void TWAINET_CALL OnModuleConnectionFailed(Twainet::Module module, const Twainet::ModuleName& moduleId)
+	{
+		Application& app = Application::GetInstance();
+		app.OnModuleConnectionFailed(module, moduleId);
+	}
+
+	static void TWAINET_CALL OnTunnelConnected(Twainet::Module module, const char* sessionId, Twainet::TypeConnection type)
+	{
+		Application& app = Application::GetInstance();
+		app.OnTunnelConnected(module, sessionId, type);
+	}
+
+	static void TWAINET_CALL OnTunnelDisconnected(Twainet::Module module, const char* sessionId)
+	{
+		Application& app = Application::GetInstance();
+		app.OnTunnelDisconnected(module, sessionId);
+	}
+
+	static void TWAINET_CALL OnMessageRecv(Twainet::Module module, const Twainet::Message& msg)
+	{
+		Application& app = Application::GetInstance();
+		app.OnMessageRecv(module, msg);
+	}
+
+	static void TWAINET_CALL OnInternalConnectionStatusChanged(Twainet::Module module, const char* moduleName, Twainet::InternalConnectionStatus status, int port)
+	{
+		Application& app = Application::GetInstance();
+		app.OnInternalConnectionStatusChanged(module, moduleName, status, port);
+	}
+
+	static void TWAINET_CALL OnModuleListChanged(Twainet::Module module)
+	{
+		Application& app = Application::GetInstance();
+		app.OnModuleListChanged(module);
+	}
+
+private:
+	Semaphore m_stop;
+};
+
+#endif/*APP_INTERFACE_H*/


fix minor glib warning

fix minor glib warning

--- lib/c_glib/src/thrift/c_glib/transport/thrift_socket.c
+++ lib/c_glib/src/thrift/c_glib/transport/thrift_socket.c
@@ -163,7 +163,7 @@
   /* open a connection */
   if (connect (tsocket->sd, (struct sockaddr *) &pin, sizeof(pin)) == -1)
   {
-      thrift_socket_close(tsocket, NULL);
+      thrift_socket_close(transport, NULL);
       g_set_error (error, THRIFT_TRANSPORT_ERROR, THRIFT_TRANSPORT_ERROR_CONNECT,
                  "failed to connect to host %s:%d - %s",
                  tsocket->hostname, tsocket->port, strerror(errno));


Return more work items from merge_file(), rather than performing a manual
queuing in the middle.

* subversion/libsvn_wc/update_editor.c:
  (merge_file): stop calling db_wq_add since we can now queue everything
    onto the returned *WORK_ITEMS.
  (svn_wc_add_repos_file4): remove a localvar that shadowed WORK_ITEM

--- subversion/libsvn_wc/update_editor.c
+++ subversion/libsvn_wc/update_editor.c
@@ -4640,10 +4640,6 @@
         }
     }

-  /* ### dang. gotta queue the existing work before the stuff below.  */
-  SVN_ERR(svn_wc__db_wq_add(eb->db, pb->local_abspath, *work_items, pool));
-  *work_items = NULL;
-
   /* Deal with installation of the new textbase, if appropriate. */
 #ifndef SVN_EXPERIMENTAL_PRISTINE
   if (new_text_base_tmp_abspath)
@@ -4655,7 +4651,7 @@
                                  new_text_base_tmp_abspath,
                                  fb->text_base_abspath,
                                  pool));
-      SVN_ERR(svn_wc__db_wq_add(eb->db, pb->local_abspath, work_item, pool));
+      *work_items = svn_wc__wq_merge(*work_items, work_item, pool);
     }
 #endif

@@ -4673,8 +4669,7 @@
                     &work_item, eb->db, pb->local_abspath,
                     fb->local_abspath, fb->last_changed_date,
                     pool));
-          SVN_ERR(svn_wc__db_wq_add(eb->db, pb->local_abspath, work_item,
-                                    pool));
+          *work_items = svn_wc__wq_merge(*work_items, work_item, pool);
         }

       if ((new_text_base_tmp_abspath || magic_props_changed)
@@ -4684,14 +4679,13 @@
           SVN_ERR(svn_wc__loggy_set_entry_timestamp_from_wc(
                     &work_item, eb->db, pb->local_abspath,
                     fb->local_abspath, pool));
-          SVN_ERR(svn_wc__db_wq_add(eb->db, pb->local_abspath, work_item,
-                                    pool));
+          *work_items = svn_wc__wq_merge(*work_items, work_item, pool);
         }

       SVN_ERR(svn_wc__loggy_set_entry_working_size_from_wc(
                 &work_item, eb->db, pb->local_abspath,
                 fb->local_abspath, pool));
-      SVN_ERR(svn_wc__db_wq_add(eb->db, pb->local_abspath, work_item, pool));
+      *work_items = svn_wc__wq_merge(*work_items, work_item, pool);
     }

   /* Set the returned content state. */
@@ -6114,7 +6108,6 @@
     source_abspath = tmp_text_base_abspath;

   {
-    svn_skel_t *work_item;
     svn_boolean_t record_fileinfo;

     /* If new contents were provided, then we do NOT want to record the


Appease -Wnon-virtual-dtor and fix a typo in a comment

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

--- unittests/Tooling/TestVisitor.h
+++ unittests/Tooling/TestVisitor.h
@@ -23,7 +23,7 @@

 namespace clang {

-/// \brief Base class for sipmle RecursiveASTVisitor based tests.
+/// \brief Base class for simple RecursiveASTVisitor based tests.
 ///
 /// This is a drop-in replacement for RecursiveASTVisitor itself, with the
 /// additional capability of running it over a snippet of code.
@@ -33,6 +33,8 @@
 class TestVisitor : public RecursiveASTVisitor<T> {
 public:
   TestVisitor() { }
+
+  virtual ~TestVisitor() { }

   /// \brief Runs the current AST visitor over the given code.
   bool runOver(StringRef Code) {
@@ -89,7 +91,7 @@
   ExpectedLocationVisitor()
     : ExpectedLine(0), ExpectedColumn(0), Found(false) {}

-  ~ExpectedLocationVisitor() {
+  virtual ~ExpectedLocationVisitor() {
     EXPECT_TRUE(Found)
       << "Expected \"" << ExpectedMatch << "\" at " << ExpectedLine
       << ":" << ExpectedColumn << PartialMatches;


add Unique_Key.h

add Unique_Key.h

error: pathspec 'BitMRC/include/Storage/Unique_Key.h' did not match any file(s) known to git

--- BitMRC/include/Storage/Unique_Key.h
+++ BitMRC/include/Storage/Unique_Key.h
@@ -0,0 +1,26 @@
+/*
+ * Unique_Key.h
+ *
+ *  Created on: 01.06.2016
+ *      Author: steady286
+ *      unique key class for use w/ Storage/Storable
+ */
+#include <Addr.h>
+
+#ifndef UNIQUE_KEY_H_
+#define UNIQUE_KEY_H_
+
+class Unique_Key {
+public:
+	Unique_Key();
+	~Unique_Key();
+private:
+	std::string key;
+public:
+	bool create_from_addr(Addr &);
+	bool operator==(Addr &);
+};
+
+
+
+#endif /* UNIQUE_KEY_H_ */


cleanup

cleanup

--- LOADER/source/LOADER.c
+++ LOADER/source/LOADER.c
@@ -75,7 +75,7 @@
 		upause( 5 );
 	}
 	MDR_EEPROM->CMD &= EEPROM_CMD_DELAY_Msk;
-	MDR_EEPROM->KEY = 0;
+	MDR_EEPROM->KEY  = 0;
 	upause( 1 );
 	__enable_irq();

@@ -125,7 +125,7 @@
 		data += 1;
 	}
 	MDR_EEPROM->CMD &= EEPROM_CMD_DELAY_Msk;
-	MDR_EEPROM->KEY = 0;
+	MDR_EEPROM->KEY  = 0;
 	upause( 1 );
 	__enable_irq();


hls_memcopy: cosmetic cleaing

hls_memcopy: cosmetic cleaing

Signed-off-by: Bruno Mesnet <c55c08b6a3960ca6c8bd85035c51229c4d68713b@fr.ibm.com>

--- actions/hls_memcopy/sw/snap_memcopy.c
+++ actions/hls_memcopy/sw/snap_memcopy.c
@@ -1,18 +1,18 @@
 /*
- *  * Copyright 2016, 2017 International Business Machines
- *   *
- *    * Licensed under the Apache License, Version 2.0 (the "License");
- *     * you may not use this file except in compliance with the License.
- *      * You may obtain a copy of the License at
- *       *
- *        *     http://www.apache.org/licenses/LICENSE-2.0
- *         *
- *          * Unless required by applicable law or agreed to in writing, software
- *           * distributed under the License is distributed on an "AS IS" BASIS,
- *            * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *             * See the License for the specific language governing permissions and
- *              * limitations under the License.
- *               */
+ * Copyright 2016, 2017 International Business Machines
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */

 #include <fcntl.h>
 #include <stdio.h>
@@ -37,11 +37,11 @@

 static const char *mem_tab[] = { "HOST_DRAM", "CARD_DRAM", "TYPE_NVME", "UNUSED"};

-/**
- *  * @brief	prints valid command line options
- *   *
- *    * @param prog	current program's name
- *     */
+/*
+ * @brief	prints valid command line options
+ *
+ * @param prog	current program's name
+ */
 static void usage(const char *prog)
 {
 	printf("Usage: %s [-h] [-v, --verbose] [-V, --version]\n"
@@ -87,9 +87,9 @@
 	snap_job_set(cjob, mjob, sizeof(*mjob), NULL, 0);
 }

-/**
- *  * Read accelerator specific registers. Must be called as root!
- *   */
+/*
+ * Read accelerator specific registers. Must be called as root!
+ */
 int main(int argc, char *argv[])
 {
 	int ch, rc = 0;


remove cstdio

remove cstdio

--- wrapper/xgboost_wrapper.h
+++ wrapper/xgboost_wrapper.h
@@ -6,11 +6,6 @@
  * \brief a C style wrapper of xgboost
  *  can be used to create wrapper of other languages
  */
-#ifdef __cplusplus
-#include <cstdio>
-#else
-#include <stdio.h>
-#endif
 #ifdef _MSC_VER
 #define XGB_DLL __declspec(dllexport)
 #else