Fix CID 134399

Fix CID 134399

--- src/common/cm/cm_load.cpp
+++ src/common/cm/cm_load.cpp
@@ -50,8 +50,6 @@
 int       c_pointcontents;
 int       c_traces, c_brush_traces, c_patch_traces, c_trisoup_traces;

-byte      *cmod_base;
-
 cmodel_t  box_model;
 cplane_t  *box_planes;
 cbrush_t  *box_brush;
@@ -94,7 +92,7 @@
 CMod_LoadShaders
 =================
 */
-void CMod_LoadShaders( lump_t *l )
+void CMod_LoadShaders(const byte *const cmod_base, lump_t *l)
 {
 	dshader_t *in, *out;
 	int       i, count;
@@ -135,7 +133,7 @@
 CMod_LoadSubmodels
 =================
 */
-void CMod_LoadSubmodels( lump_t *l )
+void CMod_LoadSubmodels(const byte *const cmod_base, lump_t *l)
 {
 	dmodel_t *in;
 	cmodel_t *out;
@@ -202,7 +200,7 @@

 =================
 */
-void CMod_LoadNodes( lump_t *l )
+void CMod_LoadNodes(const byte *const cmod_base, lump_t *l)
 {
 	dnode_t *in;
 	int     child;
@@ -264,7 +262,7 @@

 =================
 */
-void CMod_LoadBrushes( lump_t *l )
+void CMod_LoadBrushes(const byte *const cmod_base, lump_t *l)
 {
 	dbrush_t *in;
 	cbrush_t *out;
@@ -308,7 +306,7 @@
 CMod_LoadLeafs
 =================
 */
-void CMod_LoadLeafs( lump_t *l )
+void CMod_LoadLeafs(const byte *const cmod_base, lump_t *l)
 {
 	int     i;
 	cLeaf_t *out;
@@ -363,7 +361,7 @@
 CMod_LoadPlanes
 =================
 */
-void CMod_LoadPlanes( lump_t *l )
+void CMod_LoadPlanes(const byte *const cmod_base, lump_t *l)
 {
 	int      i, j;
 	cplane_t *out;
@@ -407,7 +405,7 @@
 CMod_LoadLeafBrushes
 =================
 */
-void CMod_LoadLeafBrushes( lump_t *l )
+void CMod_LoadLeafBrushes(const byte *const cmod_base, lump_t *l)
 {
 	int i;
 	int *out;
@@ -440,7 +438,7 @@
 CMod_LoadLeafSurfaces
 =================
 */
-void CMod_LoadLeafSurfaces( lump_t *l )
+void CMod_LoadLeafSurfaces(const byte *const cmod_base, lump_t *l)
 {
 	int i;
 	int *out;
@@ -472,7 +470,7 @@
 CMod_LoadBrushSides
 =================
 */
-void CMod_LoadBrushSides( lump_t *l )
+void CMod_LoadBrushSides(const byte *const cmod_base, lump_t *l)
 {
 	int          i;
 	cbrushside_t *out;
@@ -669,7 +667,7 @@
 CMod_LoadEntityString
 =================
 */
-void CMod_LoadEntityString( lump_t *l )
+void CMod_LoadEntityString(const byte *const cmod_base, lump_t *l)
 {
 	const char *p, *token;
 	char keyname[ MAX_TOKEN_CHARS ];
@@ -738,12 +736,9 @@
 =================
 */
 #define VIS_HEADER 8
-void CMod_LoadVisibility( lump_t *l )
-{
-	int  len;
-	byte *buf;
-
-	len = l->filelen;
+void CMod_LoadVisibility(const byte *const cmod_base, lump_t *l)
+{
+	int len = l->filelen;

 	if ( !len )
 	{
@@ -753,7 +748,7 @@
 		return;
 	}

-	buf = cmod_base + l->fileofs;
+	const byte *buf = cmod_base + l->fileofs;

 	cm.vised = true;
 	cm.visibility = ( byte * ) CM_Alloc( len - VIS_HEADER );
@@ -771,7 +766,7 @@
 */
 #define MAX_PATCH_SIZE  64
 #define MAX_PATCH_VERTS ( MAX_PATCH_SIZE * MAX_PATCH_SIZE )
-void CMod_LoadSurfaces( lump_t *surfs, lump_t *verts, lump_t *indexesLump )
+void CMod_LoadSurfaces(const byte *const cmod_base, lump_t *surfs, lump_t *verts, lump_t *indexesLump)
 {
 	drawVert_t    *dv, *dv_p;
 	dsurface_t    *in;
@@ -951,21 +946,22 @@
 		           name.c_str(), header.version, BSP_VERSION, BSP_VERSION_Q3 );
 	}

-	cmod_base = ( byte * ) mapData.data();
+	const byte *const cmod_base = reinterpret_cast<const byte*>(mapData.data());

 	// load into heap
-	CMod_LoadShaders( &header.lumps[ LUMP_SHADERS ] );
-	CMod_LoadLeafs( &header.lumps[ LUMP_LEAFS ] );
-	CMod_LoadLeafBrushes( &header.lumps[ LUMP_LEAFBRUSHES ] );
-	CMod_LoadLeafSurfaces( &header.lumps[ LUMP_LEAFSURFACES ] );
-	CMod_LoadPlanes( &header.lumps[ LUMP_PLANES ] );
-	CMod_LoadBrushSides( &header.lumps[ LUMP_BRUSHSIDES ] );
-	CMod_LoadBrushes( &header.lumps[ LUMP_BRUSHES ] );
-	CMod_LoadSubmodels( &header.lumps[ LUMP_MODELS ] );
-	CMod_LoadNodes( &header.lumps[ LUMP_NODES ] );
-	CMod_LoadEntityString( &header.lumps[ LUMP_ENTITIES ] );
-	CMod_LoadVisibility( &header.lumps[ LUMP_VISIBILITY ] );
-	CMod_LoadSurfaces( &header.lumps[ LUMP_SURFACES ], &header.lumps[ LUMP_DRAWVERTS ], &header.lumps[ LUMP_DRAWINDEXES ] );
+	CMod_LoadShaders(cmod_base, &header.lumps[LUMP_SHADERS]);
+	CMod_LoadLeafs(cmod_base, &header.lumps[LUMP_LEAFS]);
+	CMod_LoadLeafBrushes(cmod_base, &header.lumps[LUMP_LEAFBRUSHES]);
+	CMod_LoadLeafSurfaces(cmod_base, &header.lumps[LUMP_LEAFSURFACES]);
+	CMod_LoadPlanes(cmod_base, &header.lumps[LUMP_PLANES]);
+	CMod_LoadBrushSides(cmod_base, &header.lumps[LUMP_BRUSHSIDES]);
+	CMod_LoadBrushes(cmod_base, &header.lumps[LUMP_BRUSHES]);
+	CMod_LoadSubmodels(cmod_base, &header.lumps[LUMP_MODELS]);
+	CMod_LoadNodes(cmod_base, &header.lumps[LUMP_NODES]);
+	CMod_LoadEntityString(cmod_base, &header.lumps[LUMP_ENTITIES]);
+	CMod_LoadVisibility(cmod_base, &header.lumps[LUMP_VISIBILITY]);
+	CMod_LoadSurfaces(cmod_base,
+					  &header.lumps[LUMP_SURFACES], &header.lumps[LUMP_DRAWVERTS], &header.lumps[LUMP_DRAWINDEXES]);

 	CMod_CreateBrushSideWindings();


keyring_init: don't print error when explicit key/keyfile is specified

e.g. when I am non-root and specify a key explicitly, no need to complain
about not being able to read root's /etc/ceph/keyring.

Signed-off-by: Sage Weil <c5b6ff1fd4f0bde10db63d7a3e07166cf6c4229f@dreamhost.com>

--- src/common/common_init.cc
+++ src/common/common_init.cc
@@ -72,16 +72,14 @@
   }

   int ret = g_keyring.load(filename);
-  if (ret) {
-    derr << "keyring_init: failed to load " << filename << dendl;
-    return;
-  }

   if (g_conf.key && g_conf.key[0]) {
     string k = g_conf.key;
     EntityAuth ea;
     ea.key.decode_base64(k);
     g_keyring.add(*g_conf.entity_name, ea);
+
+    ret = 0;
   } else if (g_conf.keyfile && g_conf.keyfile[0]) {
     char buf[100];
     int fd = ::open(g_conf.keyfile, O_RDONLY);
@@ -106,6 +104,13 @@
     EntityAuth ea;
     ea.key.decode_base64(k);
     g_keyring.add(*g_conf.entity_name, ea);
+
+    ret = 0;
+  }
+
+  if (ret) {
+    derr << "keyring_init: failed to load " << filename << dendl;
+    return;
   }
 }


Add one more "None" option to the combo to display no recipes missing ingredients

svn path=/trunk/kdeextragear-3/krecipes/; revision=298599

--- src/dialogs/ingredientmatcherdialog.cpp
+++ src/dialogs/ingredientmatcherdialog.cpp
@@ -39,7 +39,8 @@
 	missingNumberLabel->setText(i18n("Missing ingredients allowed:"));
 	missingNumberCombo=new KComboBox(missingBox);
 	QStringList optionsList;
-	optionsList.append("1");
+	optionsList.append(i18n("None"));
+	optionsList+="1";
 	optionsList+="2";
 	optionsList+="3";
 	optionsList+=i18n("any");
@@ -122,11 +123,16 @@
 		missingNumbers.append(missing.count());
 		}

+	//Check if the user wants to show missing ingredients
+
+	if (this->missingNumberCombo->currentItem()==0) return; //None
+
 	// Show recipes with missing ingredients
 	new SectionItem(recipeListView->listView(),i18n("You are missing some ingredients for:"));

 	QValueList<int>::Iterator nit;
-	if (this->missingNumberCombo->currentItem()==3) // Any
+
+	if (this->missingNumberCombo->currentItem()==4) // Any
 	{
 		for (it=incompleteRecipes.begin();it!=incompleteRecipes.end();++it)
 		{


This assert didn't turn out to fail in the case I'm debugging right now, but couldn't hurt to test it in the future.

--- libmesh/src/base/dof_map.C
+++ libmesh/src/base/dof_map.C
@@ -907,6 +907,10 @@
       this->set_nonlocal_dof_objects(mesh.elements_begin(),
                                      mesh.elements_end(),
                                      mesh, &DofMap::elem_ptr);
+
+#ifdef DEBUG
+      MeshTools::libmesh_assert_valid_dof_ids(mesh);
+#endif
     }

   // Set the total number of degrees of freedom


removed warning about unused variable

removed warning about unused variable

git-svn-id: 28d9401aa571d5108e51b194aae6f24ca5964c06@885 8cc4aa7f-3514-0410-904f-f2cc9021211c

--- libs/csparser/csloader.cpp
+++ libs/csparser/csloader.cpp
@@ -617,7 +617,7 @@

 typedef char ObName[30];

-csThing* CSLoader::load_sixface (char* name, csWorld* w, char* buf,
+csThing* CSLoader::load_sixface (char* name, csWorld* /*w*/, char* buf,
                                csTextureList* textures, csSector* sec)
 {
   static tokenDesc commands[] = {


surfaceelementlist fix in z-refinement

surfaceelementlist fix in z-refinement

--- libsrc/meshing/zrefine.cpp
+++ libsrc/meshing/zrefine.cpp
@@ -708,9 +708,10 @@
 	      }
 	  }

+        mesh.RebuildSurfaceElementLists();
 	PrintMessage (5, "Surface elements done, NSE = ", mesh.GetNSE());
-
-      }
+      }
+
   }


Stop passing ExecCtx as avl user_data.

Stop passing ExecCtx as avl user_data.

--- src/core/ext/filters/client_channel/subchannel_index.cc
+++ src/core/ext/filters/client_channel/subchannel_index.cc
@@ -91,7 +91,7 @@
   gpr_free(k);
 }

-static void sck_avl_destroy(void* p, void* user_data) {
+static void sck_avl_destroy(void* p, void* unused) {
   grpc_subchannel_key_destroy(static_cast<grpc_subchannel_key*>(p));
 }

@@ -104,7 +104,7 @@
                                      static_cast<grpc_subchannel_key*>(b));
 }

-static void scv_avl_destroy(void* p, void* user_data) {
+static void scv_avl_destroy(void* p, void* unused) {
   GRPC_SUBCHANNEL_WEAK_UNREF((grpc_subchannel*)p, "subchannel_index");
 }

@@ -137,7 +137,7 @@
 void grpc_subchannel_index_unref(void) {
   if (gpr_unref(&g_refcount)) {
     gpr_mu_destroy(&g_mu);
-    grpc_avl_unref(g_subchannel_index, grpc_core::ExecCtx::Get());
+    grpc_avl_unref(g_subchannel_index, nullptr);
   }
 }

@@ -147,13 +147,12 @@
   // Lock, and take a reference to the subchannel index.
   // We don't need to do the search under a lock as avl's are immutable.
   gpr_mu_lock(&g_mu);
-  grpc_avl index = grpc_avl_ref(g_subchannel_index, grpc_core::ExecCtx::Get());
+  grpc_avl index = grpc_avl_ref(g_subchannel_index, nullptr);
   gpr_mu_unlock(&g_mu);

   grpc_subchannel* c = GRPC_SUBCHANNEL_REF_FROM_WEAK_REF(
-      (grpc_subchannel*)grpc_avl_get(index, key, grpc_core::ExecCtx::Get()),
-      "index_find");
-  grpc_avl_unref(index, grpc_core::ExecCtx::Get());
+      (grpc_subchannel*)grpc_avl_get(index, key, nullptr), "index_find");
+  grpc_avl_unref(index, nullptr);

   return c;
 }
@@ -169,13 +168,11 @@
     // Compare and swap loop:
     // - take a reference to the current index
     gpr_mu_lock(&g_mu);
-    grpc_avl index =
-        grpc_avl_ref(g_subchannel_index, grpc_core::ExecCtx::Get());
+    grpc_avl index = grpc_avl_ref(g_subchannel_index, nullptr);
     gpr_mu_unlock(&g_mu);

     // - Check to see if a subchannel already exists
-    c = static_cast<grpc_subchannel*>(
-        grpc_avl_get(index, key, grpc_core::ExecCtx::Get()));
+    c = static_cast<grpc_subchannel*>(grpc_avl_get(index, key, nullptr));
     if (c != nullptr) {
       c = GRPC_SUBCHANNEL_REF_FROM_WEAK_REF(c, "index_register");
     }
@@ -184,11 +181,9 @@
       need_to_unref_constructed = true;
     } else {
       // no -> update the avl and compare/swap
-      grpc_avl updated =
-          grpc_avl_add(grpc_avl_ref(index, grpc_core::ExecCtx::Get()),
-                       subchannel_key_copy(key),
-                       GRPC_SUBCHANNEL_WEAK_REF(constructed, "index_register"),
-                       grpc_core::ExecCtx::Get());
+      grpc_avl updated = grpc_avl_add(
+          grpc_avl_ref(index, nullptr), subchannel_key_copy(key),
+          GRPC_SUBCHANNEL_WEAK_REF(constructed, "index_register"), nullptr);

       // it may happen (but it's expected to be unlikely)
       // that some other thread has changed the index:
@@ -200,9 +195,9 @@
       }
       gpr_mu_unlock(&g_mu);

-      grpc_avl_unref(updated, grpc_core::ExecCtx::Get());
-    }
-    grpc_avl_unref(index, grpc_core::ExecCtx::Get());
+      grpc_avl_unref(updated, nullptr);
+    }
+    grpc_avl_unref(index, nullptr);
   }

   if (need_to_unref_constructed) {
@@ -219,24 +214,22 @@
     // Compare and swap loop:
     // - take a reference to the current index
     gpr_mu_lock(&g_mu);
-    grpc_avl index =
-        grpc_avl_ref(g_subchannel_index, grpc_core::ExecCtx::Get());
+    grpc_avl index = grpc_avl_ref(g_subchannel_index, nullptr);
     gpr_mu_unlock(&g_mu);

     // Check to see if this key still refers to the previously
     // registered subchannel
-    grpc_subchannel* c = static_cast<grpc_subchannel*>(
-        grpc_avl_get(index, key, grpc_core::ExecCtx::Get()));
+    grpc_subchannel* c =
+        static_cast<grpc_subchannel*>(grpc_avl_get(index, key, nullptr));
     if (c != constructed) {
-      grpc_avl_unref(index, grpc_core::ExecCtx::Get());
+      grpc_avl_unref(index, nullptr);
       break;
     }

     // compare and swap the update (some other thread may have
     // mutated the index behind us)
     grpc_avl updated =
-        grpc_avl_remove(grpc_avl_ref(index, grpc_core::ExecCtx::Get()), key,
-                        grpc_core::ExecCtx::Get());
+        grpc_avl_remove(grpc_avl_ref(index, nullptr), key, nullptr);

     gpr_mu_lock(&g_mu);
     if (index.root == g_subchannel_index.root) {
@@ -245,8 +238,8 @@
     }
     gpr_mu_unlock(&g_mu);

-    grpc_avl_unref(updated, grpc_core::ExecCtx::Get());
-    grpc_avl_unref(index, grpc_core::ExecCtx::Get());
+    grpc_avl_unref(updated, nullptr);
+    grpc_avl_unref(index, nullptr);
   }
 }


GPU benchmark new API

GPU benchmark new API

--- benchmarks/linear_algebra/blas/level3/sgemm/gpu/generator.cpp
+++ benchmarks/linear_algebra/blas/level3/sgemm/gpu/generator.cpp
@@ -6,34 +6,26 @@

 int main(int argc, char **argv)
 {
-    tiramisu::init(); // Set default tiramisu options.
+    tiramisu::init("matmul");

     // -------------------------------------------------------
     // Layer I
     // -------------------------------------------------------

-    function matmul("matmul");
-
-    // Declare constants
-    constant p0("N", expr((int32_t) N), p_int32, true, NULL, 0, &matmul);
-    constant p1("M", expr((int32_t) M), p_int32, true, NULL, 0, &matmul);
-    constant p2("K", expr((int32_t) K), p_int32, true, NULL, 0, &matmul);
-    constant p3("B", expr((int32_t) BLOCK), p_int32, true, NULL, 0, &matmul);
-
     // Declare loop iterators
-    var i("i"), j("j"), k("k"), i0("i0"), i1("i1"), j0("j0"), j1("j1"), k0("k0"), k1("k1");
+    var i("i", 0, M), j("j", 0, N), k("k", 0, K), i0("i0"), i1("i1"), j0("j0"), j1("j1"), k0("k0", 0, (K - 1) / BLOCK + 1), k1("k1");

     // Declare cpu buffers.
-    buffer b_A("b_A", {expr(M), expr(K)}, DATA_PTYPE, a_input, &matmul);
-    buffer b_B("b_B", {expr(K), expr(N)}, DATA_PTYPE, a_input, &matmul);
-    buffer b_C("b_C", {expr(M), expr(N)}, DATA_PTYPE, a_output, &matmul);
+    buffer b_A("b_A", {M, K}, DATA_PTYPE, a_input);
+    buffer b_B("b_B", {K, N}, DATA_PTYPE, a_input);
+    buffer b_C("b_C", {M, N}, DATA_PTYPE, a_output);
     // Declare gpu buffers.
-    buffer b_A_gpu("b_A_gpu", {M, K}, DATA_PTYPE, a_temporary, &matmul);
-    buffer b_B_gpu("b_B_gpu", {K, N}, DATA_PTYPE, a_temporary, &matmul);
-    buffer b_C_gpu("b_C_gpu", {M, N}, DATA_PTYPE, a_temporary, &matmul);
-    buffer b_A_gpu_tile("b_A_gpu_tile", {expr(BLOCK), expr(BLOCK)}, DATA_PTYPE, a_temporary, &matmul);
-    buffer b_B_gpu_tile("b_B_gpu_tile", {expr(BLOCK), expr(BLOCK)}, DATA_PTYPE, a_temporary, &matmul);
-    buffer b_acc("b_acc", {1}, DATA_PTYPE, a_temporary, &matmul);
+    buffer b_A_gpu("b_A_gpu", {M, K}, DATA_PTYPE, a_temporary);
+    buffer b_B_gpu("b_B_gpu", {K, N}, DATA_PTYPE, a_temporary);
+    buffer b_C_gpu("b_C_gpu", {M, N}, DATA_PTYPE, a_temporary);
+    buffer b_A_gpu_tile("b_A_gpu_tile", {BLOCK, BLOCK}, DATA_PTYPE, a_temporary);
+    buffer b_B_gpu_tile("b_B_gpu_tile", {BLOCK, BLOCK}, DATA_PTYPE, a_temporary);
+    buffer b_acc("b_acc", {1}, DATA_PTYPE, a_temporary);
     b_A_gpu.tag_gpu_global();
     b_B_gpu.tag_gpu_global();
     b_C_gpu.tag_gpu_global();
@@ -42,31 +34,31 @@
     b_acc.tag_gpu_register();

     // Declare wrappers for input buffers
-    computation c_A("[M,N,K]->{c_A[i,j,k0]: 0<=i<M and 0<=j<K and 0<=k0<(K-1)/" BLOCK_STR " + 1}", expr(), false, DATA_PTYPE, &matmul);
-    computation c_B("[M,N,K]->{c_B[i,j,k0]: 0<=i<K and 0<=j<N and 0<=k0<(K-1)/" BLOCK_STR " + 1}", expr(), false, DATA_PTYPE, &matmul);
+    input c_A("c_A", {i, j, k0}, DATA_PTYPE);
+    input c_B("c_B", {i, j, k0}, DATA_PTYPE);
     // Declare wrappers for shared arrays
-    computation c_A_tile("[M,K]->{c_A_tile[i,j]: 0<=i<M and 0<=j<K}", expr(), false, DATA_PTYPE, &matmul);
-    computation c_A_tile_dec("[M,N]->{c_A_tile_dec[i,j]: 0<=i<M and 0<=j<N}", allocate(b_A_gpu_tile), true, p_none, &matmul);
-    computation c_A_tile_init("[M,N,K]->{c_A_tile_init[i,j,k0]: 0<=i<M and 0<=j<N and 0<=k0<(K - 1)/" BLOCK_STR " + 1}", c_A(i, j, k0), true, DATA_PTYPE, &matmul);
-    computation c_B_tile("[K,N]->{c_B_tile[i,j]: 0<=i<K and 0<=j<N}", expr(), false, DATA_PTYPE, &matmul);
-    computation c_B_tile_dec("[M,N]->{c_B_tile_dec[i,j]: 0<=i<M and 0<=j<N}", allocate(b_B_gpu_tile), true, p_none, &matmul);
-    computation c_B_tile_init("[M,N,K]->{c_B_tile_init[i,j,k0]: 0<=i<M and 0<=j<N and 0<=k0<(K - 1)/" BLOCK_STR " + 1}", c_B(i, j, k0), true, DATA_PTYPE, &matmul);
+    input c_A_tile("c_A_tile", {i, j}, DATA_PTYPE);
+    computation c_A_tile_dec({i, j}, allocate(b_A_gpu_tile));
+    computation c_A_tile_init("c_A_tile_init", {i, j, k0}, c_A(i, j, k0));
+    input c_B_tile("c_B_tile", {i, j}, DATA_PTYPE);
+    computation c_B_tile_dec({i, j}, allocate(b_B_gpu_tile));
+    computation c_B_tile_init("c_B_tile_init", {i, j, k0}, c_B(i, j, k0));
     // Declare synchronizer computations
-    computation sync1("[M,N,K]->{sync1[i,j,k0]: 0<=i<M and 0<=j<N and 0<=k0<(K-1)/" BLOCK_STR " + 1}", tiramisu::sync(), true, p_none, &matmul);
-    computation sync2("[M,N,K]->{sync2[i,j,k0]: 0<=i<M and 0<=j<N and 0<=k0<(K-1)/" BLOCK_STR " + 1}", tiramisu::sync(), true, p_none, &matmul);
+    computation sync1({i, j, k0}, tiramisu::sync());
+    computation sync2({i, j, k0}, tiramisu::sync());
     // Declare wrapper computation for accumulator
-    computation c_acc_dec("[M,N]->{c_acc_dec[i,j]: 0<=i<M and 0<=j<N}", allocate(b_acc), true, p_none, &matmul);
-    computation c_acc_init("[M,N]->{c_acc_init[i,j]: 0<=i<M and 0<=j<N}", (DATA_TYPE) 0, true, DATA_PTYPE, &matmul);
-    computation c_acc("[M,N,K]->{c_acc[i,j,k]: 0<=i<M and 0<=j<N and 0<=k<K}", expr(), true, DATA_PTYPE, &matmul);
+    computation c_acc_dec({i, j}, allocate(b_acc));
+    computation c_acc_init({i, j}, (DATA_TYPE) 0, DATA_PTYPE);
+    computation c_acc({i, j, k}, DATA_PTYPE);
     c_acc.set_expression(c_acc(i, j, k - 1) + c_A_tile(i, k) * c_B_tile(k, j));
     // Declare wrapper for the output buffer
-    computation c_C("[M,N]->{c_C[i,j]: 0<=i<M and 0<=j<N}", expr(), true, DATA_PTYPE, &matmul);
+    computation c_C({i, j}, DATA_PTYPE);
     c_C.set_expression(c_acc(i, j, 0) * alpha + c_C(i, j) * beta);
     // Declare host-gpu transfer computations.
-    computation copy_A_to_device("{copy_A_to_device[0]}", memcpy(b_A, b_A_gpu), true, p_none, &matmul);
-    computation copy_B_to_device("{copy_B_to_device[0]}", memcpy(b_B, b_B_gpu), true, p_none, &matmul);
-    computation copy_C_to_device("{copy_C_to_device[0]}", memcpy(b_C, b_C_gpu), true, p_none, &matmul);
-    computation copy_C_to_host("{copy_C_to_host[0]}", memcpy(b_C_gpu, b_C), true, p_none, &matmul);
+    computation copy_A_to_device({}, memcpy(b_A, b_A_gpu));
+    computation copy_B_to_device({}, memcpy(b_B, b_B_gpu));
+    computation copy_C_to_device({}, memcpy(b_C, b_C_gpu));
+    computation copy_C_to_host({}, memcpy(b_C_gpu, b_C));

     // -------------------------------------------------------
     // Layer II
@@ -113,8 +105,8 @@
     c_B_tile.set_access("{c_B_tile[i, j] -> b_B_gpu_tile[j % " BLOCK_STR ", i % " BLOCK_STR "]}");
     c_B_tile_init.set_access("{c_B_tile_init[i, j, k0] -> b_B_gpu_tile[j % " BLOCK_STR ", i % " BLOCK_STR "]}");

-    c_acc_init.set_access("{c_acc_init[i, j] -> b_acc[0]}");
-    c_acc.set_access("{c_acc[i, j, k] -> b_acc[0]}");
+    c_acc_init.store_in(&b_acc, {});
+    c_acc.store_in(&b_acc, {});

     c_C.store_in(&b_C_gpu);

@@ -123,10 +115,7 @@
     // -------------------------------------------------------

     // Generate object files. Last argument triggers cuda compilation.
-    matmul.codegen({&b_A, &b_B, &b_C}, "fct.o", true);
+    tiramisu::codegen({&b_A, &b_B, &b_C}, "fct.o", true);

-    // Dump the generated Halide statement (just for debugging).
-    matmul.dump_halide_stmt();
-
     return 0;
 }


removed test prints

removed test prints

--- src/Kernel.cpp
+++ src/Kernel.cpp
@@ -70,24 +70,6 @@
 	PCIDeviceList usbHostControllers(0x0C, 0x03, false);
 	terminalWriteLine(" Done!");
 	terminalWriteLine("!!!!ExOS fully booted!!!!");
-	printf("Test printf %d %c\n", 42, 'B');
-	printf("Newline is 0x%x%c", '\n', '\n');
-	uint32_t i = (uint32_t) malloc(10);
-	printf("malloc returned 0x%x\n", i);
-	i = (uint32_t)malloc(100);
-	printf("malloc returned 0x%x\n", i);
-	 i =(uint32_t) malloc(50);
-	printf("malloc returned 0x%x\n", i);
-	 i = (uint32_t)malloc(1);
-	printf("malloc returned 0x%x\n", i);
-	printf("freeing 1 byte");
-	free((void*)i);
-	 i = (uint32_t)malloc(1);
-	printf("malloc returned 0x%x\n", i);
-/*
-	for (int cx = 0; cx < 10; cx++) {
-		printf("%d", cx);
-	}*/
 	//dont return.
 	while (true) {
 		asm("hlt");


Dan Roche, June 2004 Converting timing reports to mops, million operations per second, added dot product timings.

--- linbox/tests/test-fields.C
+++ linbox/tests/test-fields.C
@@ -7,14 +7,13 @@
  * See COPYING for license information
  */

-// to compile: g++ -I../ -I./ -I../.. -I/usr/local/algebra/include -L/usr/local/algebra/lib -lgmp -O3 -Wall -o test-fields test-fields.C ../linbox/.libs/liblinbox.a -lntl
-
 #include "linbox/util/timer.h"
-#include "linbox/field/double-fmod.h"
+#include "linbox/field/givaro-gfq.h"
 #include "linbox/field/ntl-zz_p.h"
 #include "linbox/field/modular.h"
 #include "linbox/field/modular-int.h"
 #include "linbox/field/modular-double.h"
+#include "linbox/vector/stream.h"
 #include <iostream>
 #include <iomanip>

@@ -26,24 +25,23 @@
 namespace LinBox {

 template< class Element >
-Element& noop( Element& a, Element& b, Element& c ) { return a; }
-
-template< class Element >
-Element& noop( Element& a, Element& b ) { return a; }
-
-template< class Element >
-Element& noop( Element& a, Element& b, Element&c, Element& d ) { return a; }
+Element& noop( Element& a, const Element& b ) { return a = b; }

 /* fieldTest is a template function to test out the performance of a given field on a
  * machine.  Taken are three arguments.  The first is a field class object.  The second
- * is an array, declared but not necessarily initialized, of seven doubles.  These
- * values will be filled with timings for add, sub, neg, mul, int, div, and axpy,
- * respectively.  The third argument is optional and specifies how many loop
- * iterations to use.
+ * is an array, declared but not necessarily initialized, of ten doubles.  The
+ * first nine values will be filled with mops for add, sub, neg, mul, int, div,
+ * axpy, dot1, and dot2, respectively.  (Dot1 is dense*dense, Dot2 is dense*sparse).
+ * The last value is filled with mops for walking through an array of size iter.
+ * The third argument is optional and specifies how many loop iterations to use.
  */

 template< class Field >
-void fieldTest( const Field& f, double* array, int iter = 1000000 ) {
+void fieldTest( const Field& f, double* array, long iter = 1000000 ) {
+
+	long vectorSize = 10000;
+	float sparsity = .01;
+	int i;

 	// initialize and fill array of random elements.
 	typename Field::RandIter r(f);
@@ -53,100 +51,155 @@
 		do { r.random( elements[i] ); }
 			while( f.isZero( elements[i] ) );
 	}
-	typename Field::Element returnValue;
+	register typename Field::Element returnValue;
+
+	// initialize random vector streams
+	RandomDenseStream<Field> dense1( f, vectorSize, iter/vectorSize );
+	RandomDenseStream<Field> dense2( f, vectorSize, iter/vectorSize );
+	RandomSparseStream<Field> sparse( f, sparsity, vectorSize, 0 );
+
+	// initialize individual vectors to hold results
+	typename RandomDenseStream<Field>::Vector dv1;
+	typename RandomDenseStream<Field>::Vector dv2;
+	typename RandomSparseStream<Field>::Vector sv;
+	VectorWrapper::ensureDim (dv1,vectorSize);
+	VectorWrapper::ensureDim (dv2,vectorSize);
+	VectorWrapper::ensureDim (sv,vectorSize);
+
+	VectorDomain<Field> VD( f );

 	UserTimer timer;

-	// Compute overhead time for 2-argument functions.
-	timer.clear();
-	timer.start();
-	for( int i = 0; i < iter; i++ ) {
+	// Compute overhead time for non-vector functions.
+	timer.clear();
+	timer.start();
+	for( i = 0; i < iter; i++ ) {
 		noop( returnValue, elements[ i*3 ] );
-	}
-	timer.stop();
-	double overHeadTime2 = timer.time();
-
-        // Compute overhead time for 3-argument functions.
-        timer.clear();
-        timer.start();
-        for( int i = 0; i < iter; i++ ) {
-                noop( returnValue, elements[ i*3 ], elements[ i*3 + 1 ] );
-        }
-        timer.stop();
-        double overHeadTime3 = timer.time();
-
-	// Compute overhead time for 4-argument functions.
-	timer.clear();
-	timer.start();
-	for( int i = 0; i < iter; i++ ) {
-		noop( returnValue, elements[ i*3 ], elements[ i*3 + 1 ], elements[ i*3 + 2 ] );
-	}
-	timer.stop();
-	double overHeadTime4 = timer.time();
-
+
+	}
+	timer.stop();
+	double overHeadTime = timer.time();
+
+	// Compute overhead time for DotProduct1( dense*dense )
+	timer.clear();
+	timer.start();
+	while( dense1 && dense2 ) {
+		dense1.get( dv1 );
+		dense2.get( dv2 );
+	}
+	timer.stop();
+	dense1.reset();
+	dense2.reset();
+	double overHeadTimeDD = timer.time();
+
+	// Compute overhead time for DotProduct2( dense*sparse )
+	timer.clear();
+	timer.start();
+        while( dense1 ) {
+                dense1.get( dv1 );
+                for( float fi = 0; fi < 1; fi += sparsity ) sparse.get( sv );
+        }
+	timer.stop();
+	dense1.reset();
+	sparse.reset();
+	double overHeadTimeDS = timer.time();

 	// add
 	timer.clear();
 	timer.start();
-	for( int i = 0; i < iter; i++ ) {
+	for( i = 0; i < iter; i++ ) {
 		f.add( returnValue, elements[ i*3 ], elements[ i*3 + 1 ] );
 	}
 	timer.stop();
-	array[0] = timer.time() - overHeadTime3;
+	array[0] = timer.time() - overHeadTime;

         // sub
         timer.clear();
         timer.start();
-        for( int i = 0; i < iter; i++ ) {
+        for( i = 0; i < iter; i++ ) {
                 f.sub( returnValue, elements[ i*3 ], elements[ i*3 + 1 ] );
         }
         timer.stop();
-        array[1] = timer.time() - overHeadTime3;
+        array[1] = timer.time() - overHeadTime;

         // neg
         timer.clear();
         timer.start();
-        for( int i = 0; i < iter; i++ ) {
+        for( i = 0; i < iter; i++ ) {
                 f.neg( returnValue, elements[ i*3 ] );
         }
         timer.stop();
-        array[2] = timer.time() - overHeadTime2;
+        array[2] = timer.time() - overHeadTime;

         // mul
         timer.clear();
         timer.start();
-        for( int i = 0; i < iter; i++ ) {
+        for( i = 0; i < iter; i++ ) {
                 f.mul( returnValue, elements[ i*3 ], elements[ i*3 + 1 ] );
         }
         timer.stop();
-        array[3] = timer.time() - overHeadTime3;
+        array[3] = timer.time() - overHeadTime;

         // inv
         timer.clear();
         timer.start();
-        for( int i = 0; i < iter; i++ ) {
+        for( i = 0; i < iter; i++ ) {
                 f.inv( returnValue, elements[ i*3 ] );
         }
         timer.stop();
-        array[4] = timer.time() - overHeadTime2;
+        array[4] = timer.time() - overHeadTime;

         // div
         timer.clear();
         timer.start();
-        for( int i = 0; i < iter; i++ ) {
+        for( i = 0; i < iter; i++ ) {
                 f.div( returnValue, elements[ i*3 ], elements[ i*3 + 1 ] );
         }
         timer.stop();
-        array[5] = timer.time() - overHeadTime3;
+        array[5] = timer.time() - overHeadTime;

         // axpy
         timer.clear();
         timer.start();
-        for( int i = 0; i < iter; i++ ) {
-                f.axpy( returnValue, elements[ i*3 ], elements[ i*3 + 1 ], elements[ i*3 + 2 ] );
-        }
-        timer.stop();
-        array[6] = timer.time() - overHeadTime4;
+        for( i = 0; i < iter; i++ ) {
+                f.axpy( returnValue, elements[ i*3 ], elements[ i*3 + 1 ],
+			elements[ i*3 + 2 ] );
+        }
+        timer.stop();
+        array[6] = timer.time() - overHeadTime;
+
+	// DotProduct1 ( dense * dense )
+	timer.clear();
+	timer.start();
+        while( dense1 && dense2 ) {
+                dense1.get( dv1 );
+                dense2.get( dv2 );
+		VD.dot( returnValue, dv1, dv2 );
+        }
+	timer.stop();
+	dense1.reset();
+	dense2.reset();
+	array[7] = timer.time() - overHeadTimeDD;
+
+	// DotProduct2 ( dense * sparse )
+	timer.clear();
+	timer.start();
+        while( dense1 && sparse ) {
+                dense1.get( dv1 );
+                for (float fi = 0; fi < 1; fi += sparsity) {
+			sparse.get( sv );
+			VD.dot( returnValue, dv1, sv );
+		}
+	}
+	timer.stop();
+	dense1.reset();
+	sparse.reset();
+	array[8] = timer.time() - overHeadTimeDS;
+
+	// Convert timings to mops (million operations per second)
+	array[9] = overHeadTime;
+	for( i = 0; i < 10; i++ )
+		array[i] = iter / (array[i] * 1000000);
 }

 }
@@ -154,50 +207,50 @@
 using namespace LinBox;

 void printTimings( double* timings ) {
-	cout << setw(8) << timings[0]
-	     << setw(8) << timings[1]
-	     << setw(8) << timings[2]
-	     << setw(8) << timings[3]
-	     << setw(8) << timings[4]
-	     << setw(8) << timings[5]
-	     << setw(8) << timings[6];
+	cout << setw(8) << timings[0] << ' '
+	     << setw(8) << timings[1] << ' '
+	     << setw(8) << timings[2] << ' '
+	     << setw(8) << timings[3] << ' '
+	     << setw(8) << timings[4] << ' '
+	     << setw(8) << timings[5] << ' '
+	     << setw(8) << timings[6] << ' '
+	     << setw(8) << timings[7] << ' '
+	     << setw(8) << timings[8] << ' '
+	     << setw(8) << timings[9];
 }

 int main(int argc, char** argv) {
-	double timings[7];
-	long prime = 268435399;
-	cout << setw(20) << "Field Name"
+	double timings[10];
+	long prime = 65521;
+	cout << setw(15) << "Field Name"
 	     << setw(8) << "add"
-	     << setw(8) << "sub"
-	     << setw(8) << "neg"
-	     << setw(8) << "mul"
-	     << setw(8) << "inv"
-	     << setw(8) << "div"
-	     << setw(8) << "axpy" << endl;
-
-	DoubleFmod field1( prime );
+	     << setw(9) << "sub"
+	     << setw(9) << "neg"
+	     << setw(9) << "mul"
+	     << setw(9) << "inv"
+	     << setw(9) << "div"
+	     << setw(9) << "axpy"
+	     << setw(9) << "dot d*d"
+	     << setw(9) << "dot d*s"
+	     << setw(9) << "array" << endl;
+
+	Modular<double> field1( prime );
 	fieldTest( field1, timings );
-	cout << setw(20) << "DoubleFmod";
+	cout << setw(15) << "Modular<double>";
 	printTimings( timings );
 	cout << endl;

-	Modular<double> field15( prime );
-	fieldTest( field15, timings );
-	cout << setw(20) << "Modular<double>";
+	NTL_zz_p field2( prime );
+	fieldTest( field2, timings );
+	cout << setw(15) << "NTL_zz_p";
 	printTimings( timings );
 	cout << endl;

-	NTL_zz_p field2( prime );
-	fieldTest( field2, timings );
-	cout << setw(20) << "NTL_zz_p";
+	Modular<int> field3( prime );
+	fieldTest( field3, timings );
+	cout << setw(15) << "Modular<int>";
 	printTimings( timings );
 	cout << endl;

-	Modular<int> field3( prime );
-	fieldTest( field3, timings );
-	cout << setw(20) << "Modular<int>";
-	printTimings( timings );
-	cout << endl;
-
 	return 0;
 }


Jump out of preprocessor mode when a comment, // or /*, is found.

--- src/LexCPP.cxx
+++ src/LexCPP.cxx
@@ -113,7 +113,7 @@
 					sc.SetState(SCE_C_DEFAULT);
 				}
 			} else {
-				if (sc.atLineEnd) {
+				if ((sc.atLineEnd) || (sc.Match('/', '*')) || (sc.Match('/', '/'))) {
 					sc.SetState(SCE_C_DEFAULT);
 				}
 			}


#95979# text encoding used for IPR fixed for windows

--- linguistic/source/misc.cxx
+++ linguistic/source/misc.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: misc.cxx,v $
  *
- *  $Revision: 1.14 $
- *
- *  last change: $Author: tl $ $Date: 2001-11-06 13:40:45 $
+ *  $Revision: 1.15 $
+ *
+ *  last change: $Author: tl $ $Date: 2001-12-14 18:02:41 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -168,15 +168,31 @@
             case LANGUAGE_NORWEGIAN_BOKMAL :
             case LANGUAGE_NORWEGIAN_NYNORSK :
             case LANGUAGE_AFRIKAANS :
+#ifdef WNT
+                    nEncoding = RTL_TEXTENCODING_MS_1252;   break;
+#else
                     nEncoding = RTL_TEXTENCODING_ISO_8859_1;   break;
+#endif
             case LANGUAGE_CZECH :
             case LANGUAGE_HUNGARIAN :
             case LANGUAGE_POLISH :
+#ifdef WNT
+                    nEncoding = RTL_TEXTENCODING_MS_1250;   break;
+#else
                     nEncoding = RTL_TEXTENCODING_ISO_8859_2;   break;
+#endif
             case LANGUAGE_RUSSIAN :
+#ifdef WNT
+                    nEncoding = RTL_TEXTENCODING_MS_1251;   break;
+#else
                     nEncoding = RTL_TEXTENCODING_ISO_8859_5;   break;
+#endif
             case LANGUAGE_GREEK :
+#ifdef WNT
+                    nEncoding = RTL_TEXTENCODING_MS_1253;   break;
+#else
                     nEncoding = RTL_TEXTENCODING_ISO_8859_7;   break;
+#endif
             default:
                     DBG_ERROR( "unexpected language" );
         }


Patch from Kein-Hong Man support new Lua 5.1 long string and block comment syntax [=[...]=] and --[=[...]=].

--- src/LexLua.cxx
+++ src/LexLua.cxx
@@ -57,6 +57,18 @@
 	return false;
 }

+// Test for [=[ ... ]=] delimiters, returns 0 if it's only a [ or ],
+// return 1 for [[ or ]], returns >=2 for [=[ or ]=] and so on.
+// The maximum number of '=' characters allowed is 254.
+static int LongDelimCheck(StyleContext &sc) {
+	int sep = 1;
+	while (sc.GetRelative(sep) == '=' && sep < 0xFF)
+		sep++;
+	if (sc.GetRelative(sep) == sc.ch)
+		return sep;
+	return 0;
+}
+
 static void ColouriseLuaDoc(
 	unsigned int startPos,
 	int length,
@@ -74,15 +86,15 @@
 	WordList &keywords8 = *keywordlists[7];

 	int currentLine = styler.GetLine(startPos);
-	// Initialize the literal string [[ ... ]] nesting level, if we are inside such a string.
-	int literalStringLevel = 0;
-	if (initStyle == SCE_LUA_LITERALSTRING) {
-		literalStringLevel = styler.GetLineState(currentLine - 1);
-	}
-	// Initialize the block comment --[[ ... ]] nesting level, if we are inside such a comment
-	int blockCommentLevel = 0;
-	if (initStyle == SCE_LUA_COMMENT) {
-		blockCommentLevel = styler.GetLineState(currentLine - 1);
+	// Initialize long string [[ ... ]] or block comment --[[ ... ]] nesting level,
+	// if we are inside such a string. Block comment was introduced in Lua 5.0,
+	// blocks with separators [=[ ... ]=] in Lua 5.1.
+	int nestLevel = 0;
+	int sepCount = 0;
+	if (initStyle == SCE_LUA_LITERALSTRING || initStyle == SCE_LUA_COMMENT) {
+		int lineState = styler.GetLineState(currentLine - 1);
+		nestLevel = lineState >> 8;
+		sepCount = lineState & 0xFF;
 	}

 	// Do not leak onto next line
@@ -101,12 +113,9 @@
 			currentLine = styler.GetLine(sc.currentPos);
 			switch (sc.state) {
 			case SCE_LUA_LITERALSTRING:
-				// Inside a literal string, we set the line state
-				styler.SetLineState(currentLine, literalStringLevel);
-				break;
-			case SCE_LUA_COMMENT: 	// Block comment
-				// Inside a block comment, we set the line state
-				styler.SetLineState(currentLine, blockCommentLevel);
+			case SCE_LUA_COMMENT:
+				// Inside a literal string or block comment, we set the line state
+				styler.SetLineState(currentLine, (nestLevel << 8) | sepCount);
 				break;
 			default:
 				// Reset the line state
@@ -164,11 +173,7 @@
 				}
 				sc.SetState(SCE_LUA_DEFAULT);
 			}
-		} else if (sc.state == SCE_LUA_COMMENTLINE) {
-			if (sc.atLineEnd) {
-				sc.ForwardSetState(SCE_LUA_DEFAULT);
-			}
-		} else if (sc.state == SCE_LUA_PREPROCESSOR) {
+		} else if (sc.state == SCE_LUA_COMMENTLINE || sc.state == SCE_LUA_PREPROCESSOR) {
 			if (sc.atLineEnd) {
 				sc.ForwardSetState(SCE_LUA_DEFAULT);
 			}
@@ -194,26 +199,23 @@
 				sc.ChangeState(SCE_LUA_STRINGEOL);
 				sc.ForwardSetState(SCE_LUA_DEFAULT);
 			}
-		} else if (sc.state == SCE_LUA_LITERALSTRING) {
-			if (sc.Match('[', '[')) {
-				literalStringLevel++;
-				sc.Forward();
-				sc.SetState(SCE_LUA_LITERALSTRING);
-			} else if (sc.Match(']', ']') && literalStringLevel > 0) {
-				literalStringLevel--;
-				sc.Forward();
-				if (literalStringLevel == 0) {
-					sc.ForwardSetState(SCE_LUA_DEFAULT);
-				}
-			}
-		} else if (sc.state == SCE_LUA_COMMENT) {	// Lua 5.0's block comment
-			if (sc.Match('[', '[')) {
-				blockCommentLevel++;
-				sc.Forward();
-			} else if (sc.Match(']', ']') && blockCommentLevel > 0) {
-				blockCommentLevel--;
-				sc.Forward();
-				if (blockCommentLevel == 0) {
+		} else if (sc.state == SCE_LUA_LITERALSTRING || sc.state == SCE_LUA_COMMENT) {
+			if (sc.ch == '[') {
+				int sep = LongDelimCheck(sc);
+				if (sep == 1 && sepCount == 1) {    // [[-only allowed to nest
+					nestLevel++;
+					sc.Forward();
+				}
+			} else if (sc.ch == ']') {
+				int sep = LongDelimCheck(sc);
+				if (sep == 1 && sepCount == 1) {    // un-nest with ]]-only
+					nestLevel--;
+					sc.Forward();
+					if (nestLevel == 0) {
+						sc.ForwardSetState(SCE_LUA_DEFAULT);
+					}
+				} else if (sep > 1 && sep == sepCount) {   // ]=]-style delim
+					sc.Forward(sep);
 					sc.ForwardSetState(SCE_LUA_DEFAULT);
 				}
 			}
@@ -225,21 +227,32 @@
 				sc.SetState(SCE_LUA_NUMBER);
 			} else if (IsAWordStart(sc.ch)) {
 				sc.SetState(SCE_LUA_IDENTIFIER);
-			} else if (sc.Match('\"')) {
+			} else if (sc.ch == '\"') {
 				sc.SetState(SCE_LUA_STRING);
-			} else if (sc.Match('\'')) {
+			} else if (sc.ch == '\'') {
 				sc.SetState(SCE_LUA_CHARACTER);
-			} else if (sc.Match('[', '[')) {
-				literalStringLevel = 1;
-				sc.SetState(SCE_LUA_LITERALSTRING);
-				sc.Forward();
-			} else if (sc.Match("--[[")) {	// Lua 5.0's block comment
-				blockCommentLevel = 1;
-				sc.SetState(SCE_LUA_COMMENT);
-				sc.Forward(3);
+			} else if (sc.ch == '[') {
+				sepCount = LongDelimCheck(sc);
+				if (sepCount == 0) {
+					sc.SetState(SCE_LUA_OPERATOR);
+				} else {
+					nestLevel = 1;
+					sc.SetState(SCE_LUA_LITERALSTRING);
+					sc.Forward(sepCount);
+				}
 			} else if (sc.Match('-', '-')) {
 				sc.SetState(SCE_LUA_COMMENTLINE);
-				sc.Forward();
+				if (sc.Match("--[")) {
+					sc.Forward(2);
+					sepCount = LongDelimCheck(sc);
+					if (sepCount > 0) {
+						nestLevel = 1;
+						sc.ChangeState(SCE_LUA_COMMENT);
+						sc.Forward(sepCount);
+					}
+				} else {
+					sc.Forward();
+				}
 			} else if (sc.atLineStart && sc.Match('$')) {
 				sc.SetState(SCE_LUA_PREPROCESSOR);	// Obsolete since Lua 4.0, but still in old code
 			} else if (IsLuaOperator(static_cast<char>(sc.ch))) {


Modify linked list cycle

Modify linked list cycle

--- algorithms/linked_list_cycle.cpp
+++ algorithms/linked_list_cycle.cpp
@@ -29,8 +29,6 @@

         while (fast != NULL && fast->next != NULL)
         {
-            cout << slow->value << ", ";
-
             slow = slow->next;
             fast = fast->next->next;

@@ -53,7 +51,6 @@

         while(fast != NULL && fast->next != NULL)
         {
-            cout << slow->value << ", ";
             slow = slow->next;
             fast = fast->next->next;

@@ -63,7 +60,6 @@
                 Node *q = slow;
                 while (p != q)
                 {
-                    cout << p->value << ", ";
                     ++n;
                     p = p->next;
                     q = q->next;


Support for SQL Anywhere allowing "ENDIF" to terminate a fold and an option for "EXISTS" not to.

--- src/LexSQL.cxx
+++ src/LexSQL.cxx
@@ -230,6 +230,10 @@
 	bool foldComment = styler.GetPropertyInt("fold.comment") != 0;
 	bool foldCompact = styler.GetPropertyInt("fold.compact", 1) != 0;
 	bool foldOnlyBegin = styler.GetPropertyInt("fold.sql.only.begin", 0) != 0;
+
+	// property fold.sql.exists
+	//	Enables "EXISTS" to end a fold as is started by "IF" in "DROP TABLE IF EXISTS".
+	bool foldSqlExists = styler.GetPropertyInt("fold.sql.exists", 1) != 0;

 	unsigned int endPos = startPos + length;
 	int visibleChars = 0;
@@ -303,9 +307,13 @@
 				}
 			} else if (strcmp(s, "begin") == 0) {
 				levelNext++;
-			} else if (strcmp(s, "end") == 0 ||
-						// DROP TABLE IF EXISTS or CREATE TABLE IF NOT EXISTS
-						strcmp(s, "exists") == 0) {
+			} else if ((strcmp(s, "end") == 0) ||
+//						// DROP TABLE IF EXISTS or CREATE TABLE IF NOT EXISTS
+						(foldSqlExists && (strcmp(s, "exists") == 0)) ||
+//						//  SQL Anywhere permits IF ... ELSE ... ENDIF
+//						//      will only be active if "endif" appears in the
+//						//		keyword list.
+						(strcmp(s, "endif") == 0)) {
 				endFound = true;
 				levelNext--;
 				if (levelNext < SC_FOLDLEVELBASE) {


[resources] Create staging buffer allocator

--- src/renderer/resource_loader.cpp
+++ src/renderer/resource_loader.cpp
@@ -203,6 +203,8 @@
     }

     void ResourceStorage::allocate_staging_buffer_memory() {
+        staging_buffer_allocator = std::unique_ptr<AllocatorHandle<>>(renderer.get_global_allocator()->create_suballocator());
+
         DeviceMemory* memory = device
                                    ->allocate_device_memory(STAGING_BUFFER_TOTAL_MEMORY_SIZE,
                                                             MemoryUsage::StagingBuffer,


(Tracked On: DSO-6842)

(Tracked On: DSO-6842)

--- src/ds5/advanced_mode/advanced_mode.cpp
+++ src/ds5/advanced_mode/advanced_mode.cpp
@@ -906,7 +906,8 @@
         if (p.color_auto_white_balance.was_set && p.color_auto_white_balance.auto_white_balance == 0)
             set_color_white_balance(p.color_white_balance);

-        set_color_power_line_frequency(p.color_power_line_frequency);
+        // TODO: Itay, check the issue of setting PWF to auto
+        //set_color_power_line_frequency(p.color_power_line_frequency);
     }

     std::vector<uint8_t> ds5_advanced_mode_base::send_receive(const std::vector<uint8_t>& input) const


#i10000#,#i78538#: insert missing conversion

--- jvmfwk/source/elements.cxx
+++ jvmfwk/source/elements.cxx
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: elements.cxx,v $
  *
- *  $Revision: 1.18 $
+ *  $Revision: 1.19 $
  *
- *  last change: $Author: obo $ $Date: 2007-06-13 07:57:18 $
+ *  last change: $Author: hr $ $Date: 2007-06-20 17:13:59 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -323,7 +323,7 @@
             {
                 CXmlCharPtr sUser(xmlNodeListGetString(
                     docUser, cur->children, 1));
-                m_userClassPath = boost::optional<rtl::OUString>(sUser);
+                m_userClassPath = boost::optional<rtl::OUString>(rtl::OUString(sUser));
             }
         }
         else if (xmlStrcmp(cur->name, (xmlChar*) "javaInfo") == 0)


Added transport log module name and static checks on log name arrays.

--- src/Logging.cc
+++ src/Logging.cc
@@ -136,11 +136,16 @@
 static const char* logLevelNames[] = {"(none)", "ERROR", "WARNING",
                                       "NOTICE", "DEBUG"};

+static_assert(sizeof(logLevelNames) / sizeof(logLevelNames[0]) ==
+              NUM_LOG_LEVELS);
 /**
  * Friendly names for each #LogModule value.
  * Keep this in sync with the LogModule enum.
  */
-static const char* logModuleNames[] = {"default"};
+static const char* logModuleNames[] = {"default", "transport"};
+
+static_assert(sizeof(logModuleNames) / sizeof(logModuleNames[0]) ==
+              NUM_LOG_MODULES);

 /**
  * Create a new debug logger.


INTEGRATION: CWS aw019 (1.4.564); FILE MERGED 2004/09/29 14:30:12 aw 1.4.564.1: #i11190#

--- sd/source/core/cusshow.cxx
+++ sd/source/core/cusshow.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: cusshow.cxx,v $
  *
- *  $Revision: 1.4 $
- *
- *  last change: $Author: aw $ $Date: 2001-08-06 08:34:08 $
+ *  $Revision: 1.5 $
+ *
+ *  last change: $Author: pjunck $ $Date: 2004-11-03 08:52:59 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -126,69 +126,69 @@
 |* Inserter fuer SvStream zum Speichern
 |*
 \************************************************************************/
-SvStream& operator << (SvStream& rOut, const SdCustomShow& rCustomShow)
-{
-    // Letzter Parameter ist die aktuelle Versionsnummer des Codes
-    SdIOCompat aIO(rOut, STREAM_WRITE, 0);
-
-    // Name
-    // #90477# rOut.WriteByteString( rCustomShow.aName, ::GetStoreCharSet( gsl_getSystemTextEncoding() ) );
-    rOut.WriteByteString(rCustomShow.aName,
-        GetSOStoreTextEncoding(gsl_getSystemTextEncoding(), (sal_uInt16)rOut.GetVersion()));
-
-    // Anzahl Seiten
-    UINT32 nCount = rCustomShow.Count();
-    rOut << nCount;
-
-    for (UINT32 i = 0; i < nCount; i++)
-    {
-        // Seite aus Liste holen
-        SdPage* pPage = (SdPage*) rCustomShow.GetObject(i);
-
-        if (pPage)
-        {
-            // SdPage-Seitennummer
-            UINT16 nPageNum = (pPage->GetPageNum() - 1) / 2;
-            rOut << nPageNum;
-        }
-    }
-
-    return rOut;
-}
+//BFS02SvStream& operator << (SvStream& rOut, const SdCustomShow& rCustomShow)
+//BFS02{
+//BFS02 // Letzter Parameter ist die aktuelle Versionsnummer des Codes
+//BFS02 SdIOCompat aIO(rOut, STREAM_WRITE, 0);
+//BFS02
+//BFS02 // Name
+//BFS02 // #90477# rOut.WriteByteString( rCustomShow.aName, ::GetStoreCharSet( gsl_getSystemTextEncoding() ) );
+//BFS02 rOut.WriteByteString(rCustomShow.aName,
+//BFS02     GetSOStoreTextEncoding(gsl_getSystemTextEncoding(), (sal_uInt16)rOut.GetVersion()));
+//BFS02
+//BFS02 // Anzahl Seiten
+//BFS02 UINT32 nCount = rCustomShow.Count();
+//BFS02 rOut << nCount;
+//BFS02
+//BFS02 for (UINT32 i = 0; i < nCount; i++)
+//BFS02 {
+//BFS02     // Seite aus Liste holen
+//BFS02     SdPage* pPage = (SdPage*) rCustomShow.GetObject(i);
+//BFS02
+//BFS02     if (pPage)
+//BFS02     {
+//BFS02         // SdPage-Seitennummer
+//BFS02         UINT16 nPageNum = (pPage->GetPageNum() - 1) / 2;
+//BFS02         rOut << nPageNum;
+//BFS02     }
+//BFS02 }
+//BFS02
+//BFS02 return rOut;
+//BFS02}

 /*************************************************************************
 |*
 |* Extractor fuer SvStream zum Laden
 |*
 \************************************************************************/
-SvStream& operator >> (SvStream& rIn, SdCustomShow& rCustomShow)
-{
-    SdIOCompat aIO(rIn, STREAM_READ);
-
-    // Name
-    // #90477# rIn.ReadByteString( rCustomShow.aName, ::GetStoreCharSet( gsl_getSystemTextEncoding() ) );
-    rIn.ReadByteString(rCustomShow.aName,
-        GetSOLoadTextEncoding(gsl_getSystemTextEncoding(), (sal_uInt16)rIn.GetVersion()));
-
-    // Anzahl Seiten
-    UINT32 nCount = 0;
-    rIn >> nCount;
-
-    rCustomShow.Clear();
-
-    for (UINT32 i = 0; i < nCount; i++)
-    {
-        // Seitennummer
-        UINT16 nPageNum;
-        rIn >> nPageNum;
-
-        // Seite in Liste einfuegen
-        SdPage* pPage = (SdPage*) rCustomShow.pDoc->GetSdPage(nPageNum, PK_STANDARD);
-        rCustomShow.Insert(pPage, LIST_APPEND);
-    }
-
-    return rIn;
-}
+//BFS02SvStream& operator >> (SvStream& rIn, SdCustomShow& rCustomShow)
+//BFS02{
+//BFS02 SdIOCompat aIO(rIn, STREAM_READ);
+//BFS02
+//BFS02 // Name
+//BFS02 // #90477# rIn.ReadByteString( rCustomShow.aName, ::GetStoreCharSet( gsl_getSystemTextEncoding() ) );
+//BFS02 rIn.ReadByteString(rCustomShow.aName,
+//BFS02     GetSOLoadTextEncoding(gsl_getSystemTextEncoding(), (sal_uInt16)rIn.GetVersion()));
+//BFS02
+//BFS02 // Anzahl Seiten
+//BFS02 UINT32 nCount = 0;
+//BFS02 rIn >> nCount;
+//BFS02
+//BFS02 rCustomShow.Clear();
+//BFS02
+//BFS02 for (UINT32 i = 0; i < nCount; i++)
+//BFS02 {
+//BFS02     // Seitennummer
+//BFS02     UINT16 nPageNum;
+//BFS02     rIn >> nPageNum;
+//BFS02
+//BFS02     // Seite in Liste einfuegen
+//BFS02     SdPage* pPage = (SdPage*) rCustomShow.pDoc->GetSdPage(nPageNum, PK_STANDARD);
+//BFS02     rCustomShow.Insert(pPage, LIST_APPEND);
+//BFS02 }
+//BFS02
+//BFS02 return rIn;
+//BFS02}

 extern uno::Reference< uno::XInterface > createUnoCustomShow( SdCustomShow* pShow );


INTEGRATION: CWS presentationengine01 (1.70.12); FILE MERGED 2004/11/17 19:23:38 thb 1.70.12.7: RESYNC: (1.71-1.72); FILE MERGED 2004/11/07 18:17:59 cl 1.70.12.6: #i36286# fixed navigator for new engine 2004/10/12 22:53:03 thb 1.70.12.5: RESYNC: (1.70-1.71); FILE MERGED 2004/09/02 09:12:43 cl 1.70.12.4: moved effect and transition presets access to a singleton 2004/08/25 15:23:19 cl 1.70.12.3: replaced old FuSlideShow with new SlideShow 2004/08/22 22:23:22 cl 1.70.12.2: dependency clean up and more text group support 2004/08/19 09:53:16 cl 1.70.12.1: new helper for transition presets

--- sd/source/core/drawdoc.cxx
+++ sd/source/core/drawdoc.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: drawdoc.cxx,v $
  *
- *  $Revision: 1.72 $
- *
- *  last change: $Author: pjunck $ $Date: 2004-11-03 08:53:14 $
+ *  $Revision: 1.73 $
+ *
+ *  last change: $Author: rt $ $Date: 2004-11-26 19:46:34 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -232,11 +232,46 @@

 SdDrawDocument* SdDrawDocument::pDocLockedInsertingLinks = NULL;

-/*************************************************************************
-|*
-|* Konstruktor
-|*
-\************************************************************************/
+//////////////////////////////////////////////////////////////////////////////
+
+PresentationSettings::PresentationSettings()
+:   mbAll( true ),
+    mbEndless( false ),
+    mbManual( false ),
+    mbMouseVisible( true ),
+    mbMouseAsPen( false ),
+    mbLockedPages( false ),
+    mbAlwaysOnTop( false ),
+    mbFullScreen( true ),
+    mbAnimationAllowed( true ),
+    mnPauseTimeout( 10 ),
+    mbShowPauseLogo( false ),
+    mbCustomShow(false),
+    mbStartWithNavigator(false)
+{
+}
+
+// ---------------------------------------------------------------------------
+
+PresentationSettings::PresentationSettings( const PresentationSettings& r )
+:   maPresPage( r.maPresPage ),
+    mbAll( r.mbAll ),
+    mbEndless( r.mbEndless ),
+    mbManual( r.mbManual ),
+    mbMouseVisible( r.mbMouseVisible ),
+    mbMouseAsPen( r.mbMouseAsPen ),
+    mbLockedPages( r.mbLockedPages ),
+    mbAlwaysOnTop( r.mbAlwaysOnTop ),
+    mbFullScreen( r.mbFullScreen ),
+    mbAnimationAllowed( r.mbAnimationAllowed ),
+    mnPauseTimeout( r.mnPauseTimeout ),
+    mbShowPauseLogo( r.mbShowPauseLogo ),
+    mbCustomShow( r.mbCustomShow ),
+    mbStartWithNavigator( r.mbStartWithNavigator )
+{
+}
+
+// ---------------------------------------------------------------------------

 SdDrawDocument::SdDrawDocument(DocumentType eType, SfxObjectShell* pDrDocSh) :
     FmFormModel(
@@ -245,20 +280,6 @@
     eDocType(eType),
     pDocSh(static_cast< ::sd::DrawDocShell*>(pDrDocSh)),
     pCreatingTransferable( NULL ),
-    bPresAll(TRUE),
-    bPresEndless(FALSE),
-    bPresManual(FALSE),
-    bPresMouseVisible(TRUE),
-    bPresMouseAsPen(FALSE),
-    bPresLockedPages(FALSE),
-    bStartPresWithNavigator(FALSE),
-    bAnimationAllowed(TRUE),
-    bPresAlwaysOnTop(FALSE),
-    bPresFullScreen(TRUE),
-    nPresPause(10),
-    bPresShowLogo(FALSE),
-    bCustomShow(false),
-    nPresFirstPage(1),
     pOutliner(NULL),
     pInternalOutliner(NULL),
     ePageNumType(SVX_ARABIC),
@@ -675,540 +696,6 @@

 /*************************************************************************
 |*
-|* Inserter fuer SvStream zum Speichern
-|*
-\************************************************************************/
-
-//BFS02SvStream& operator << (SvStream& rOut, SdDrawDocument& rDoc)
-//BFS02{
-//BFS02 // #90477# CharSet eSysSet = ::GetStoreCharSet( gsl_getSystemTextEncoding());
-//BFS02 CharSet eSysSet = GetSOStoreTextEncoding(gsl_getSystemTextEncoding(), (sal_uInt16)rOut.GetVersion());
-//BFS02
-//BFS02 /**************************************************************************
-//BFS02 * Aktuelle FileFormat-Versionsnummer
-//BFS02 * Bei Aenderugen stets inkrementieren und beim Laden beruecksichtigen!
-//BFS02 **************************************************************************/
-//BFS02 rDoc.nFileFormatVersion = 18;
-//BFS02
-//BFS02 // AutoLayouts muessen ggf. erzeugt werden
-//BFS02 rDoc.StopWorkStartupDelay();
-//BFS02
-//BFS02 // Eindeutige Namen der StandardLayer erzeugen
-//BFS02 rDoc.MakeUniqueLayerNames();
-//BFS02
-//BFS02 rOut << (FmFormModel&) rDoc;
-//BFS02
-//BFS02 // Sprachabhaengige Namen der StandardLayer wieder herstellen
-//BFS02 rDoc.RestoreLayerNames();
-//BFS02
-//BFS02 if ( rDoc.IsStreamingSdrModel() )
-//BFS02 {
-//BFS02     // Es wird nur das SdrModel gestreamt, nicht das SdDrawDocument!
-//BFS02     // Anwendungsfall: svdraw Clipboard-Format
-//BFS02     return(rOut);
-//BFS02 }
-//BFS02
-//BFS02 SdIOCompat aIO(rOut, STREAM_WRITE, rDoc.nFileFormatVersion);
-//BFS02
-//BFS02 BOOL bDummy = TRUE;
-//BFS02 rOut << bDummy;                    // ehem. bPresentation
-//BFS02 rOut << rDoc.bPresAll;
-//BFS02 rOut << rDoc.bPresEndless;
-//BFS02 rOut << rDoc.bPresManual;
-//BFS02 rOut << rDoc.bPresMouseVisible;
-//BFS02 rOut << rDoc.bPresMouseAsPen;
-//BFS02 rOut << rDoc.nPresFirstPage;
-//BFS02
-//BFS02 // Es wird nun eine Liste von FrameViews geschrieben (siehe weiter unten),
-//BFS02 // daher wird an dieser Stelle ein FALSE vermerkt.
-//BFS02 BOOL bSingleFrameView = FALSE;
-//BFS02 rOut << bSingleFrameView;
-//BFS02
-//BFS02 /**************************************************************************
-//BFS02 * Frueher (StarDraw Version 3.0, File-Format Version 3) wurde hier das
-//BFS02 * JobSetup geschrieben, nun der Printer (binaer-kompatibel, daher wurde
-//BFS02 * die Version des File-Formats nicht geaendert)
-//BFS02 **************************************************************************/
-//BFS02 if (rDoc.pDocSh)
-//BFS02 {
-//BFS02     SfxPrinter* pPrinter = rDoc.pDocSh->GetPrinter(TRUE);
-//BFS02     pPrinter->Store(rOut);
-//BFS02 }
-//BFS02 else
-//BFS02 {
-//BFS02     // Keine DocShell, daher wird ein JobSetup geschrieben
-//BFS02     JobSetup aJobSetup;
-//BFS02     rOut << aJobSetup;
-//BFS02 }
-//BFS02
-//BFS02 rOut << (ULONG) rDoc.eLanguage;
-//BFS02
-//BFS02 /**************************************************************************
-//BFS02 * FrameViews schreiben
-//BFS02 **************************************************************************/
-//BFS02 ULONG nFrameViewCount = 0;
-//BFS02 ::sd::ViewShell* pViewSh = NULL;
-//BFS02 SfxViewShell* pSfxViewSh = NULL;
-//BFS02 SfxViewFrame* pSfxViewFrame = SfxViewFrame::GetFirst(rDoc.pDocSh,
-//BFS02                                                      TYPE(SfxTopViewFrame));
-//BFS02
-//BFS02 while (pSfxViewFrame)
-//BFS02 {
-//BFS02     // Anzahl FrameViews ermitteln
-//BFS02     pSfxViewSh = pSfxViewFrame->GetViewShell();
-//BFS02     pViewSh = PTR_CAST(::sd::ViewShell, pSfxViewSh );
-//BFS02
-//BFS02     if ( pViewSh && pViewSh->GetFrameView() )
-//BFS02     {
-//BFS02         nFrameViewCount++;
-//BFS02     }
-//BFS02
-//BFS02     pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, rDoc.pDocSh,
-//BFS02                                           TYPE(SfxTopViewFrame));
-//BFS02 }
-//BFS02
-//BFS02 // Anzahl FrameViews schreiben
-//BFS02 rOut << nFrameViewCount;
-//BFS02
-//BFS02 ::sd::FrameView* pFrame = NULL;
-//BFS02 pViewSh = NULL;
-//BFS02 pSfxViewSh = NULL;
-//BFS02 pSfxViewFrame = SfxViewFrame::GetFirst(rDoc.pDocSh, TYPE(SfxTopViewFrame));
-//BFS02
-//BFS02 while (pSfxViewFrame)
-//BFS02 {
-//BFS02     // FrameViews schreiben
-//BFS02     pSfxViewSh = pSfxViewFrame->GetViewShell();
-//BFS02     pViewSh = PTR_CAST(::sd::ViewShell, pSfxViewSh );
-//BFS02
-//BFS02     if ( pViewSh && pViewSh->GetFrameView() )
-//BFS02     {
-//BFS02         pViewSh->WriteFrameViewData();
-//BFS02         rOut << *pViewSh->GetFrameView();
-//BFS02     }
-//BFS02
-//BFS02     pSfxViewFrame = SfxViewFrame::GetNext(*pSfxViewFrame, rDoc.pDocSh,
-//BFS02                                           TYPE(SfxTopViewFrame));
-//BFS02 }
-//BFS02
-//BFS02 rOut << rDoc.bStartPresWithNavigator;
-//BFS02 rOut << rDoc.bPresLockedPages;
-//BFS02 rOut << rDoc.bPresAlwaysOnTop;
-//BFS02 rOut << rDoc.bOnlineSpell;
-//BFS02 rOut << rDoc.bHideSpell;
-//BFS02 rOut << rDoc.bPresFullScreen;
-//BFS02 rOut.WriteByteString( rDoc.aPresPage, eSysSet );
-//BFS02 rOut << rDoc.bAnimationAllowed;
-//BFS02
-//BFS02 UINT16 nDocType = (UINT16) rDoc.eDocType;
-//BFS02 rOut << nDocType;
-//BFS02
-//BFS02 // CustomShow aktiv
-//BFS02 rOut << rDoc.bCustomShow;
-//BFS02
-//BFS02 // Anzahl CustomShows schreiben
-//BFS02 ULONG nCustomShowCount = 0;
-//BFS02
-//BFS02 if (rDoc.pCustomShowList)
-//BFS02 {
-//BFS02     nCustomShowCount = rDoc.pCustomShowList->Count();
-//BFS02 }
-//BFS02
-//BFS02 rOut << nCustomShowCount;
-//BFS02
-//BFS02 if (rDoc.pCustomShowList)
-//BFS02 {
-//BFS02     for (ULONG i = 0; i < nCustomShowCount; i++)
-//BFS02     {
-//BFS02         // CustomShows schreiben
-//BFS02         SdCustomShow* pCustomShow = (SdCustomShow*) rDoc.pCustomShowList->GetObject(i);
-//BFS02         rOut << *pCustomShow;
-//BFS02     }
-//BFS02
-//BFS02     // Position der aktuellen CustomShow
-//BFS02     ULONG nCurPos = rDoc.pCustomShowList->GetCurPos();
-//BFS02     rOut << nCurPos;
-//BFS02 }
-//BFS02
-//BFS02 // ab Version 15
-//BFS02 rOut << (ULONG) rDoc.GetPageNumType();
-//BFS02
-//BFS02 // ab Version 17
-//BFS02 rOut << rDoc.GetPresPause() << rDoc.IsPresShowLogo();
-//BFS02
-//BFS02 // ab Version 18 (keine Aenderung)
-//BFS02
-//BFS02 return rOut;
-//BFS02}
-
-/*************************************************************************
-|*
-|* Extractor fuer SvStream zum Laden
-|*
-\************************************************************************/
-
-//BFS02SvStream& operator >> (SvStream& rIn, SdDrawDocument& rDoc)
-//BFS02{
-//BFS02 // #90477# CharSet eSysSet = ::GetStoreCharSet( gsl_getSystemTextEncoding());
-//BFS02 CharSet eSysSet = GetSOLoadTextEncoding(gsl_getSystemTextEncoding(), (sal_uInt16)rIn.GetVersion());
-//BFS02
-//BFS02 rIn >> (FmFormModel&) rDoc;
-//BFS02 rDoc.GetItemPool().LoadCompleted();
-//BFS02 rDoc.SetTextDefaults();     // overwrites loaded pool defaults
-//BFS02
-//BFS02    // Turn off printer independent layout (make it printer *dependent*) for
-//BFS02    // pre-6.0 documents.
-//BFS02    rDoc.SetPrinterIndependentLayout (
-//BFS02        ::com::sun::star::document::PrinterIndependentLayout::DISABLED);
-//BFS02
-//BFS02 // Fehler ?
-//BFS02 if (rIn.GetError() != 0)
-//BFS02     return (rIn);
-//BFS02
-//BFS02 if ( rDoc.IsStreamingSdrModel() )
-//BFS02 {
-//BFS02     // Es wird nur das SdrModel gestreamt, nicht das SdDrawDocument!
-//BFS02     // Anwendungsfall: svdraw Clipboard-Format
-//BFS02     return(rIn);
-//BFS02 }
-//BFS02
-//BFS02 SdIOCompat aIO(rIn, STREAM_READ);
-//BFS02
-//BFS02 BOOL bDummy;
-//BFS02 rIn >> bDummy;                     // ehem. bPresentation
-//BFS02 rIn >> rDoc.bPresAll;
-//BFS02 rIn >> rDoc.bPresEndless;
-//BFS02 rIn >> rDoc.bPresManual;
-//BFS02 rIn >> rDoc.bPresMouseVisible;
-//BFS02 rIn >> rDoc.bPresMouseAsPen;
-//BFS02 rIn >> rDoc.nPresFirstPage;
-//BFS02
-//BFS02 rDoc.nFileFormatVersion = aIO.GetVersion();
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 1)
-//BFS02 {
-//BFS02     // Daten der Versionen >= 1 einlesen
-//BFS02
-//BFS02     BOOL bSingleFrameView;
-//BFS02     rIn >> bSingleFrameView;
-//BFS02
-//BFS02     if (bSingleFrameView)
-//BFS02     {
-//BFS02         ::sd::FrameView * pFrameView = new ::sd::FrameView( &rDoc );
-//BFS02         rIn >> *pFrameView;
-//BFS02         rDoc.pFrameViewList->Insert(pFrameView, LIST_APPEND);
-//BFS02
-//BFS02         // Fehler ?
-//BFS02         if (rIn.GetError() != 0)
-//BFS02             return (rIn);
-//BFS02     }
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 2)
-//BFS02 {
-//BFS02     // Daten der Versionen >= 2 einlesen
-//BFS02
-//BFS02     /******************************************************************
-//BFS02     * Frueher (StarDraw Version 3.0, File-Format Version 3) wurde hier
-//BFS02     * das JobSetup eingelesen, nun wird der Printer erzeugt
-//BFS02     * (binaer-kompatibel)
-//BFS02     *******************************************************************/
-//BFS02     // ItemSet mit speziellem Poolbereich anlegen
-//BFS02     SfxItemSet* pSet = new SfxItemSet( rDoc.GetPool(),
-//BFS02                     SID_PRINTER_NOTFOUND_WARN,  SID_PRINTER_NOTFOUND_WARN,
-//BFS02                     SID_PRINTER_CHANGESTODOC,   SID_PRINTER_CHANGESTODOC,
-//BFS02                     ATTR_OPTIONS_PRINT,         ATTR_OPTIONS_PRINT,
-//BFS02                     0 );
-//BFS02     // PrintOptionsSet setzen
-//BFS02     SdOptionsPrintItem aPrintItem(ATTR_OPTIONS_PRINT
-//BFS02                                   ,SD_MOD()->GetSdOptions(rDoc.eDocType)
-//BFS02                                   );
-//BFS02
-//BFS02     SfxFlagItem aFlagItem( SID_PRINTER_CHANGESTODOC );
-//BFS02     USHORT      nFlags = 0;
-//BFS02
-//BFS02     nFlags =  (aPrintItem.IsWarningSize() ? SFX_PRINTER_CHG_SIZE : 0) |
-//BFS02             (aPrintItem.IsWarningOrientation() ? SFX_PRINTER_CHG_ORIENTATION : 0);
-//BFS02     aFlagItem.SetValue( nFlags );
-//BFS02
-//BFS02     pSet->Put( aPrintItem );
-//BFS02     pSet->Put( SfxBoolItem( SID_PRINTER_NOTFOUND_WARN, aPrintItem.IsWarningPrinter() ) );
-//BFS02     pSet->Put( aFlagItem );
-//BFS02
-//BFS02     SfxPrinter* pPrinter = SfxPrinter::Create(rIn, pSet);
-//BFS02
-//BFS02     MapMode aMM (pPrinter->GetMapMode());
-//BFS02     aMM.SetMapUnit(MAP_100TH_MM);
-//BFS02     pPrinter->SetMapMode(aMM);
-//BFS02     if (rDoc.pDocSh)            // z. B. nicht bei "Einfuegen-Datei"
-//BFS02         rDoc.pDocSh->SetPrinter(pPrinter);
-//BFS02     else
-//BFS02         delete pPrinter;
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 3)
-//BFS02 {
-//BFS02     ULONG nTmp;
-//BFS02     rIn >> nTmp;
-//BFS02     rDoc.SetLanguage( (LanguageType) nTmp, EE_CHAR_LANGUAGE );
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 4)
-//BFS02 {
-//BFS02     /**********************************************************************
-//BFS02     * FrameViews lesen
-//BFS02     **********************************************************************/
-//BFS02     ULONG nCount = 0;
-//BFS02     ::sd::FrameView* pFrameView = NULL;
-//BFS02
-//BFS02     for (nCount=0; nCount<rDoc.pFrameViewList->Count(); nCount++)
-//BFS02     {
-//BFS02         // Ggf. FrameViews loeschen
-//BFS02         pFrameView = static_cast< ::sd::FrameView*>(
-//BFS02                rDoc.pFrameViewList->GetObject(nCount));
-//BFS02
-//BFS02         if (pFrameView)
-//BFS02             delete pFrameView;
-//BFS02     }
-//BFS02
-//BFS02     rDoc.pFrameViewList->Clear();
-//BFS02
-//BFS02     // Anzahl FrameViews lesen
-//BFS02     const SvtSaveOptions aOptions;
-//BFS02     BOOL bIsSaveDocView = aOptions.IsSaveDocView();
-//BFS02
-//BFS02     ULONG nFrameViewCount = 0;
-//BFS02     rIn >> nFrameViewCount;
-//BFS02
-//BFS02     for (nCount=0; nCount<nFrameViewCount; nCount++)
-//BFS02     {
-//BFS02         // Einzelne FrameViews lesen
-//BFS02         pFrameView = new ::sd::FrameView( &rDoc );
-//BFS02         rIn >> *pFrameView;
-//BFS02
-//BFS02         if (bIsSaveDocView)
-//BFS02         {
-//BFS02             // FrameViews werden fuer die ViewShell gebraucht
-//BFS02             // Die FrameView gehoert nun der Liste
-//BFS02             rDoc.pFrameViewList->Insert(pFrameView, nCount);
-//BFS02         }
-//BFS02         else
-//BFS02         {
-//BFS02             // FrameView kann wieder geloescht werden
-//BFS02             delete pFrameView;
-//BFS02         }
-//BFS02
-//BFS02         // Fehler ?
-//BFS02         if (rIn.GetError() != 0)
-//BFS02             return (rIn);
-//BFS02     }
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 5)
-//BFS02 {
-//BFS02     rIn >> rDoc.bStartPresWithNavigator;
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 6)
-//BFS02 {
-//BFS02     rIn >> rDoc.bPresLockedPages;
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 7)
-//BFS02 {
-//BFS02     rIn >> rDoc.bPresAlwaysOnTop;
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 8)
-//BFS02 {
-//BFS02     rIn >> rDoc.bOnlineSpell;
-//BFS02     rIn >> rDoc.bHideSpell;
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 9)
-//BFS02 {
-//BFS02     rIn >> rDoc.bPresFullScreen;
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 10)
-//BFS02 {
-//BFS02     rIn.ReadByteString( rDoc.aPresPage, eSysSet );
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 11)
-//BFS02 {
-//BFS02     rIn >> rDoc.bAnimationAllowed;
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 12)
-//BFS02 {
-//BFS02     UINT16 nDocType;
-//BFS02     rIn >> nDocType;
-//BFS02     rDoc.eDocType = (DocumentType) nDocType;
-//BFS02     // existiert eine DocShell bestimmt diese den DocType
-//BFS02     if(rDoc.pDocSh)
-//BFS02     {
-//BFS02         if(NULL != PTR_CAST(::sd::GraphicDocShell,rDoc.pDocSh))
-//BFS02             rDoc.eDocType = DOCUMENT_TYPE_DRAW;
-//BFS02         else
-//BFS02             rDoc.eDocType = DOCUMENT_TYPE_IMPRESS;
-//BFS02     }
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 13)
-//BFS02 {
-//BFS02     // Keine Aenderung
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 14)
-//BFS02 {
-//BFS02     // CustomShow aktiv
-//BFS02     rIn >> rDoc.bCustomShow;
-//BFS02
-//BFS02     ULONG nCustomShowCount = 0;
-//BFS02     rIn >> nCustomShowCount;
-//BFS02
-//BFS02     if (nCustomShowCount > 0)
-//BFS02     {
-//BFS02         // Liste erzeugen
-//BFS02         rDoc.GetCustomShowList(TRUE);
-//BFS02         rDoc.pCustomShowList->Clear();
-//BFS02
-//BFS02         for (ULONG i = 0; i < nCustomShowCount; i++)
-//BFS02         {
-//BFS02             // Einzelne CustomShows lesen
-//BFS02             SdCustomShow* pCustomShow = new SdCustomShow(&rDoc);
-//BFS02             rIn >> *pCustomShow;
-//BFS02
-//BFS02             // Die CustomShows gehoert nun der Liste
-//BFS02             rDoc.pCustomShowList->Insert(pCustomShow, i);
-//BFS02
-//BFS02             // Fehler ?
-//BFS02             if (rIn.GetError() != 0)
-//BFS02                 return (rIn);
-//BFS02         }
-//BFS02
-//BFS02         // Aktuelle CustomShow selektieren
-//BFS02         ULONG nCurPos;
-//BFS02         rIn >> nCurPos;
-//BFS02         rDoc.pCustomShowList->Seek(nCurPos);
-//BFS02     }
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 15)
-//BFS02 {
-//BFS02     ULONG nTmp;
-//BFS02     rIn >> nTmp;
-//BFS02     rDoc.SetPageNumType( (SvxNumType) nTmp );
-//BFS02 }
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 17)
-//BFS02 {
-//BFS02     ULONG   nPauseSec;
-//BFS02     BOOL    bShowLogo;
-//BFS02
-//BFS02     rIn >> nPauseSec >> bShowLogo;
-//BFS02     rDoc.SetPresPause( nPauseSec );
-//BFS02     rDoc.SetPresShowLogo( bShowLogo );
-//BFS02 }
-//BFS02 else
-//BFS02     rDoc.SetPresPause( 0 );
-//BFS02
-//BFS02 if (rDoc.nFileFormatVersion >= 18)
-//BFS02 {
-//BFS02     // Keine Aenderung
-//BFS02 }
-//BFS02
-//BFS02 /**************************************************************************
-//BFS02 * So machts der Writer, und so muessen es alle machen:
-//BFS02 * Bug 9714: Der CharSet an den Fonts muss geaendert werden, wenn
-//BFS02 * es der globale CharSet ist (MT)
-//BFS02 **************************************************************************/
-//BFS02 SfxItemPool& rPool = rDoc.GetItemPool();
-//BFS02 USHORT nMaxItems = rPool.GetItemCount(EE_CHAR_FONTINFO);
-//BFS02 SvxFontItem* pItem;
-//BFS02 CharSet eSrcSet = ((SdPage*) rDoc.GetPage(0))->GetCharSet();
-//BFS02
-//BFS02 for (USHORT n = 0; n < nMaxItems; ++n)
-//BFS02 {
-//BFS02     pItem = (SvxFontItem*) rPool.GetItem(EE_CHAR_FONTINFO, n);
-//BFS02     if (pItem && pItem->GetCharSet() == eSrcSet)
-//BFS02     {
-//BFS02         pItem->GetCharSet() = eSysSet;
-//BFS02     }
-//BFS02 }
-//BFS02
-//BFS02 return rIn;
-//BFS02}
-
-/*************************************************************************
-|*
-|* "Alle Dias"-Parameter der Praesentation aendern
-|*
-\************************************************************************/
-
-void SdDrawDocument::SetPresAll(BOOL bNewPresAll)
-{
-    bPresAll     = bNewPresAll;
-}
-
-/*************************************************************************
-|*
-|* "Endlos"-Parameter der Praesentation aendern
-|*
-\************************************************************************/
-
-void SdDrawDocument::SetPresEndless(BOOL bNewPresEndless)
-{
-    bPresEndless = bNewPresEndless;
-}
-
-/*************************************************************************
-|*
-|* "Manuell"-Parameter der Praesentation aendern
-|*
-\************************************************************************/
-
-void SdDrawDocument::SetPresManual(BOOL bNewPresManual)
-{
-    bPresManual  = bNewPresManual;
-}
-
-/*************************************************************************
-|*
-|* "Maus sichtbar"-Parameter der Praesentation aendern
-|*
-\************************************************************************/
-
-void SdDrawDocument::SetPresMouseVisible(BOOL bNewPresMouseVisible)
-{
-    bPresMouseVisible = bNewPresMouseVisible;
-}
-
-/*************************************************************************
-|*
-|* "Maus als Stift"-Parameter der Praesentation aendern
-|*
-\************************************************************************/
-
-void SdDrawDocument::SetPresMouseAsPen(BOOL bNewPresMouseAsPen)
-{
-    bPresMouseAsPen = bNewPresMouseAsPen;
-}
-
-/*************************************************************************
-|*
-|* "Ab Dia"-Parameter der Praesentation aendern
-|*
-\************************************************************************/
-
-void SdDrawDocument::SetPresFirstPage(ULONG nNewPresFirstPage)
-{
-    nPresFirstPage = nNewPresFirstPage;
-}
-
-/*************************************************************************
-|*
 |* SetChanged(), das Model wurde geaendert
 |*
 \************************************************************************/
@@ -1613,51 +1100,6 @@

 /*************************************************************************
 |*
-|* beim Starten der Praesentation den Navigator hochfahren oder nicht
-|*
-\************************************************************************/
-
-void SdDrawDocument::SetStartPresWithNavigator(BOOL bStart)
-{
-    bStartPresWithNavigator = bStart;
-}
-
-/*************************************************************************
-|*
-|* in der Praesentation bei einem Klick in die Flaeche nicht die Seite wechslen
-|*
-\************************************************************************/
-
-void SdDrawDocument::SetPresLockedPages(BOOL bLock)
-{
-    bPresLockedPages = bLock;
-}
-
-/*************************************************************************
-|*
-|* Praesentation immer oberstes Fenster oder nicht
-|*
-\************************************************************************/
-
-void SdDrawDocument::SetPresAlwaysOnTop(BOOL bOnTop)
-{
-    bPresAlwaysOnTop = bOnTop;
-}
-
-/*************************************************************************
-|*
-|* Praesentation im Vollbild-Modus oder im Fenster
-|*
-\************************************************************************/
-
-void SdDrawDocument::SetPresFullScreen(BOOL bNewFullScreen)
-{
-    bPresFullScreen = bNewFullScreen;
-}
-
-
-/*************************************************************************
-|*
 |* OnlineSpelling ein/aus
 |*
 \************************************************************************/
@@ -1841,4 +1283,5 @@
     mpMasterPageListWatcher->Invalidate();
 }

+
 // eof


Make lockscreen bypass window transition animations

--- application.cpp
+++ application.cpp
@@ -697,6 +697,7 @@
             model->setFilterKey("/meego/ux/settings/lockscreen/filters");
             lockScreen->rootContext()->setContextProperty("notificationModel", model);

+            lockScreen->setSkipAnimation();
             lockScreen->setSource(QUrl::fromLocalFile("/usr/share/meego-ux-daemon/lockscreen.qml"));
             lockScreen->show();
         }


INTEGRATION: CWS sj05 (1.62.4); FILE MERGED 2004/02/13 14:41:51 sj 1.62.4.3: RESYNC: (1.62-1.66); FILE MERGED 2004/02/09 15:14:58 cl 1.62.4.2: #i20484# added new CustomShape ui 2003/12/04 20:14:08 sj 1.62.4.1: not crashing if creating unomodel if there is no docshell

--- sd/source/core/drawdoc.cxx
+++ sd/source/core/drawdoc.cxx
@@ -2,9 +2,9 @@
  *
  *  $RCSfile: drawdoc.cxx,v $
  *
- *  $Revision: 1.67 $
+ *  $Revision: 1.68 $
  *
- *  last change: $Author: rt $ $Date: 2004-03-30 15:43:59 $
+ *  last change: $Author: rt $ $Date: 2004-04-02 13:20:25 $
  *
  *  The Contents of this file are made available subject to the terms of
  *  either of the following licenses
@@ -1761,7 +1761,8 @@

     try
     {
-        xModel = pDocSh->GetModel();
+        if ( pDocSh )
+            xModel = pDocSh->GetModel();
     }
     catch( uno::RuntimeException& e )
     {


changed my mind

changed my mind

--- application.cpp
+++ application.cpp
@@ -12,8 +12,8 @@
 #include <cxxutils/vterm.h>

 // atomic vars are to avoid race conditions
-static std::atomic_int  s_return_value;
-static std::atomic_bool s_run; // quit signal
+static std::atomic_int  s_return_value(0);
+static std::atomic_bool s_run(true); // quit signal

 posix::lockable<std::queue<vfunc>> Application::ms_signal_queue;

@@ -75,8 +75,6 @@

 int Application::exec(void) noexcept // non-static function to ensure an instance of Application exists
 {
-  s_return_value = 0; // reinit return value
-  s_run = true; // reinit execution status
   while(s_run) // while not quitting
   {
     EventBackend::poll(); // get event queue results


translation of German comments in file sd/source/core/stlpool.cxx

Change-Id: Ie5274ef6c5bba0caa8ba8057f751db3301618f32

--- sd/source/core/stlpool.cxx
+++ sd/source/core/stlpool.cxx
@@ -45,7 +45,7 @@

 #include <svx/svdattr.hxx>
 #include "eetext.hxx"
-#include <svx/xtable.hxx>           // fuer RGB_Color
+#include <svx/xtable.hxx>           // for RGB_Color
 #include <editeng/bulletitem.hxx>
 #include <editeng/lrspitem.hxx>
 #include <editeng/adjustitem.hxx>
@@ -131,8 +131,8 @@

 /*************************************************************************
 |*
-|* eine Liste der Gliederungstextvorlagen fuer ein Praesentationlayout
-|* erstellen, der Aufrufer muss die Liste wieder loeschen
+|* Create a list of outline text templates for a presentation layout.
+|* The caller has to delete the list.
 |*
 \************************************************************************/

@@ -156,7 +156,7 @@

 /*************************************************************************
 |*
-|* StyleSheets mit Defaultweren fuer das genannte Praesentationslayout erzeugen
+|* Create style sheets with default values for the named presentation layout
 |*
 \************************************************************************/

@@ -177,7 +177,7 @@

     mpDoc->getDefaultFonts( aLatinFont, aCJKFont, aCTLFont );

-    // Font fuer Titel und Gliederung
+    // Font for title and outline
     SvxFontItem aSvxFontItem( aLatinFont.GetFamily(), aLatinFont.GetName(), aLatinFont.GetStyleName(), aLatinFont.GetPitch(),
                               aLatinFont.GetCharSet(), EE_CHAR_FONTINFO );

@@ -190,7 +190,7 @@
     Font aBulletFont( GetBulletFont() );

     /**************************************************************************
-    * Gliederungsebenen
+    * outline levels
     **************************************************************************/
     String aName(SdResId(STR_LAYOUT_OUTLINE));
     String aHelpFile;
@@ -216,7 +216,7 @@

             pSheet->SetParent( String() );

-            // Attributierung fuer Level 1, die anderen Ebenen "erben"
+            // attributing for level 1, the others levels inherit
             if (nLevel == 1)
             {
                 SfxItemSet&     rSet = pSheet->GetItemSet();
@@ -324,7 +324,7 @@
     }

     /**************************************************************************
-    * Titel
+    * Title
     **************************************************************************/
     aName = String(SdResId(STR_LAYOUT_TITLE));
     aName.Insert(aPrefix, 0);
@@ -369,7 +369,7 @@
     }

     /**************************************************************************
-    * Untertitel
+    * Subtitle
     **************************************************************************/
     aName = String(SdResId(STR_LAYOUT_SUBTITLE));
     aName.Insert(aPrefix, 0);
@@ -417,7 +417,7 @@
     }

     /**************************************************************************
-    * Notizen
+    * Notes
     **************************************************************************/
     aName = String(SdResId(STR_LAYOUT_NOTES));
     aName.Insert(aPrefix, 0);
@@ -461,7 +461,7 @@
     }

     /**************************************************************************
-    * Hintergrundobjekte
+    * Background objects
     **************************************************************************/
     aName = String(SdResId(STR_LAYOUT_BACKGROUNDOBJECTS));
     aName.Insert(aPrefix, 0);
@@ -476,7 +476,7 @@
         SfxItemSet& rBackgroundObjectsSet = pSheet->GetItemSet();
         rBackgroundObjectsSet.Put(SdrShadowItem(sal_False));
         rBackgroundObjectsSet.Put(SdrShadowColorItem(Color(COL_GRAY)));
-        rBackgroundObjectsSet.Put(SdrShadowXDistItem(200)); // 3 mm Schattendistanz
+        rBackgroundObjectsSet.Put(SdrShadowXDistItem(200)); // 3 mm shadow distance
         rBackgroundObjectsSet.Put(SdrShadowYDistItem(200));
         // #i16874# enable kerning by default but only for new documents
         rBackgroundObjectsSet.Put( SvxAutoKernItem( sal_True, EE_CHAR_PAIRKERNING ) );
@@ -484,7 +484,7 @@
     }

     /**************************************************************************
-    * Hintergrund
+    * Background
     **************************************************************************/
     aName = String(SdResId(STR_LAYOUT_BACKGROUND));
     aName.Insert(aPrefix, 0);
@@ -508,10 +508,9 @@

 /*************************************************************************
 |*
-|* Graphik-StyleSheets  aus dem Quellpool in diesen Pool kopieren
-|*
-|* (rSourcePool kann nicht const sein, weil SfxStyleSheetPoolBase::Find
-|*  nicht const ist)
+|* Copy graphic style sheets from source pool into this pool
+|*
+|* (rSourcePool can not be const since SfxStyleSheetPoolBase::Find isn't const)
 |*
 \************************************************************************/

@@ -644,14 +643,12 @@

 /*************************************************************************
 |*
-|* StyleSheets des genannten Praesentationslayouts aus dem Quellpool in diesen
-|* Pool kopieren. Kopiert werden nur solche StyleSheets, die in diesem Pool
-|* noch nicht vorhanden sind.
-|* pCreatedSheets wird - wenn ungleich NULL - mit Zeigern auf die erzeugten
-|* StyleSheets gefuellt.
-|*
-|* (rSourcePool kann nicht const sein, weil SfxStyleSheetPoolBase::Find
-|*  nicht const ist)
+|* Copy style sheets of the named presentation layout from the source pool into
+|* this pool. Copies only the style sheets which aren't yet in this pool.
+|* If not NULL, pCreatedSheets is filled with pointers to the created style
+|* sheets.
+|*
+|* (rSourcePool can not be const since SfxStyleSheetPoolBase::Find isn't const)
 |*
 \************************************************************************/

@@ -672,7 +669,7 @@
             DBG_ASSERT(pSourceSheet, "CopyLayoutSheets: Quellvorlage nicht gefunden");
             if (pSourceSheet)
             {
-                // falls einer mit Methusalem-Doks. ankommt
+                // In the case one comes with Methusalem-Docs.
                 SfxStyleSheetBase& rNewSheet = Make(*it, SD_STYLE_FAMILY_MASTERPAGE);
                 rNewSheet.SetHelpId( sEmpty, pSourceSheet->GetHelpId( sEmpty ) );
                 rNewSheet.GetItemSet().Put(pSourceSheet->GetItemSet());
@@ -681,7 +678,7 @@
         }
     }

-    // Sonderbehandlung fuer Gliederungsvorlagen: Parentbeziehungen aufbauen
+    // Special treatment for outline templates: create parent relation
     std::vector<SfxStyleSheetBase*> aOutlineSheets;
     CreateOutlineSheetList(rLayoutName,aOutlineSheets);

@@ -710,8 +707,8 @@

 /*************************************************************************
 |*
-|* Liste mit den Namen der Praesentationsvorlagen eines Layouts erzeugen.
-|* Die Liste und die enthaltenen Strings gehoeren dem Caller!
+|* Create list with names of the presentation templates of a layout.
+|* The list and the containing strings are owned by the caller!
 |*
 \************************************************************************/

@@ -756,8 +753,8 @@

 /*************************************************************************
 |*
-|* Liste mit Zeigern auf Praesentationsvorlagen eines Layouts erzeugen.
-|* Die Liste gehoert dem Caller!
+|* Create a list with pointer to presentation templates of a layout.
+|* The list is owned by the caller!
 |*
 \************************************************************************/

@@ -780,7 +777,7 @@

 /*************************************************************************
 |*
-|* ggfs. PseudoStyleSheets erzeugen
+|* Create pseudo style sheets if necessary
 |*
 \************************************************************************/

@@ -866,7 +863,7 @@

 /*************************************************************************
 |*
-|* Standard-Styles den richtigen Namen in der Programm-Sprache geben
+|* Set the correct name in the program language to the standard styles
 |*
 \************************************************************************/

@@ -930,7 +927,7 @@
                 case HID_SD_CELL_STYLE_LAST_COLUMN:     nNameId = STR_POOLSHEET_LAST_COLUMN; break;

                 default:
-                    // 0 oder falsche (alte) HelpId
+                    // 0 or wrong (old) HelpId
                     bHelpKnown = sal_False;
             }
             if( bHelpKnown )
@@ -951,12 +948,12 @@

                     if ( !pSheetFound )
                     {
-                        // Sheet existiert noch nicht: Altes Sheet wird umbenannt
-                        pStyle->SetName( aNewName );    // setzt auch Parents um
+                        // Sheet does not yet exist: rename old sheet
+                        pStyle->SetName( aNewName );    // transform also parents
                     }
                     else
                     {
-                        // Sheet existiert schon: Altes Sheet muss entfernt werden
+                        // Sheet does exist: old sheet has to be removed
                         aEraseList.push_back( pStyle );
                     }
                 }
@@ -964,12 +961,12 @@
         }
     }

-    // Styles, welche nicht umbenannt werden konnten, muessen entfernt werden
+    // styles that could not be renamed, must be removed
     for ( size_t i = 0, n = aEraseList.size(); i < n; ++i )
         Remove( aEraseList[ i ] );
 }
 // --------------------------------------------------------------------
-// Neues SvxNumBulletItem fuer das jeweilige StyleSheet setzen
+// Set new SvxNumBulletItem for the respective style sheet
 // --------------------------------------------------------------------

 void SdStyleSheetPool::PutNumBulletItem( SfxStyleSheetBase* pSheet,
@@ -983,7 +980,7 @@
     {
         case HID_STANDARD_STYLESHEET_NAME :
         {
-            // Standard-Vorlage
+            // Standard template
             SvxNumberFormat aNumberFormat(SVX_NUM_CHAR_SPECIAL);
             aNumberFormat.SetBulletFont(&rBulletFont);
             aNumberFormat.SetBulletChar( 0x25CF ); // StarBats: 0xF000 + 34
@@ -1012,7 +1009,7 @@
             /* title gets same bullet as subtitle and not that page symbol anymore */
         case HID_PSEUDOSHEET_SUBTITLE :
         {
-            // Untertitel-Vorlage
+            // Subtitle template
             SvxNumRule* pDefaultRule = ((SvxNumBulletItem*) rSet.GetPool()->GetSecondaryPool()->GetPoolDefaultItem(EE_PARA_NUMBULLET))->GetNumRule();
             DBG_ASSERT( pDefaultRule, "Wo ist mein Default? [CL]" );

@@ -1041,7 +1038,7 @@

         case HID_PSEUDOSHEET_OUTLINE + 1 :
         {
-            // Gliederungs-Vorlage
+            // Outline template
             SvxNumberFormat aNumberFormat(SVX_NUM_CHAR_SPECIAL);
             aNumberFormat.SetBulletColor(Color(COL_AUTO));
             aNumberFormat.SetStart(1);
@@ -1109,7 +1106,7 @@

 /*************************************************************************
 |*
-|* Standard Bullet-Font erzeugen (ohne Groesse)
+|* Create standard bullet font (without size)
 |*
 \************************************************************************/


Fix BMC #18606

Fix BMC #18606

Ensure that attempts at updating the lockscreen do not result in
the viewport updating while the screen is off.

--- application.cpp
+++ application.cpp
@@ -976,7 +976,6 @@
         {
             setScreenOn(false);
             send_ux_msg(UX_CMD_SCREEN_ON, 0);
-            lock();
             context_provider_set_string("Session.State", "normal");
             return true;
         }
@@ -1835,13 +1834,32 @@
             orientationSensor.start();
         if (m_ambientLightSensorAvailable)
             ambientLightSensor.stop();
-    }
-    else
-    {
+
+        // Re-enable updates
+        if (lockScreen)
+        {
+            lockScreen->setViewportUpdateMode(QGraphicsView::FullViewportUpdate);
+        }
+    }
+    else
+    {
+        // Open the lockscreen so that it's ready when the screen comes back on,
+        // and to ensure all apps take measures to save power because they are
+        // no longer in the foreground
+        lock();
+
         if (m_orientationSensorAvailable)
             orientationSensor.stop();
         if (m_ambientLightSensorAvailable)
             ambientLightSensor.stop();
+
+        // The lookscreen window is still visible as far as Qt knows, so
+        // manually disable updates to prevent issues with painting while the
+        // screen is off
+        if (lockScreen)
+        {
+            lockScreen->setViewportUpdateMode(QGraphicsView::NoViewportUpdate);
+        }
     }
 }


print to cmd corrected for matrices without solver

--- src/Matrix.cpp
+++ src/Matrix.cpp
@@ -807,15 +807,15 @@
     printf("j_col.size():       %lu \n", j_col.size());
     printf("val.size():         %lu \n", val.size());
     printf("dense.size():       %lu \n", dense.size());
+    printf("solver:             %d (-1: None, 0: pardiso, 1: dissection)\n", solver);
     if (solver > -1)
-        printf("solver:             %d (-1: None, 0: pardiso, 1: dissection)\n", solver);
-    else
         printf("            :       %s \n", options2["linear_solver"].c_str());

     double density = 100 * nnz / (double)( n_row_cmprs * n_col );

     printf("density:            %1.2f %% \n", density);
+    printf("............................................................................\n");
 }

 int Matrix::ij(int i_, int j_){


INTEGRATION: CWS ooo19126 (1.18.236); FILE MERGED 2005/09/05 13:21:33 rt 1.18.236.1: #i54170# Change license header: remove SISSL

--- sd/source/ui/app/tbxww.cxx
+++ sd/source/ui/app/tbxww.cxx
@@ -1,62 +1,35 @@
  /*************************************************************************
-
+ *
+ *  OpenOffice.org - a multi-platform office productivity suite
  *
  *  $RCSfile: tbxww.cxx,v $
  *
- *  $Revision: 1.18 $
- *
- *  last change: $Author: kz $ $Date: 2005-01-18 15:14:33 $
- *
- *  The Contents of this file are made available subject to the terms of
- *  either of the following licenses
- *
- *         - GNU Lesser General Public License Version 2.1
- *         - Sun Industry Standards Source License Version 1.1
- *
- *  Sun Microsystems Inc., October, 2000
- *
- *  GNU Lesser General Public License Version 2.1
- *  =============================================
- *  Copyright 2000 by Sun Microsystems, Inc.
- *  901 San Antonio Road, Palo Alto, CA 94303, USA
- *
- *  This library is free software; you can redistribute it and/or
- *  modify it under the terms of the GNU Lesser General Public
- *  License version 2.1, as published by the Free Software Foundation.
- *
- *  This library is distributed in the hope that it will be useful,
- *  but WITHOUT ANY WARRANTY; without even the implied warranty of
- *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *  Lesser General Public License for more details.
- *
- *  You should have received a copy of the GNU Lesser General Public
- *  License along with this library; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston,
- *  MA  02111-1307  USA
- *
- *
- *  Sun Industry Standards Source License Version 1.1
- *  =================================================
- *  The contents of this file are subject to the Sun Industry Standards
- *  Source License Version 1.1 (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.openoffice.org/license.html.
- *
- *  Software provided under this License is provided on an "AS IS" basis,
- *  WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
- *  WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
- *  MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
- *  See the License for the specific provisions governing your rights and
- *  obligations concerning the Software.
- *
- *  The Initial Developer of the Original Code is: Sun Microsystems, Inc.
- *
- *  Copyright: 2000 by Sun Microsystems, Inc.
- *
- *  All Rights Reserved.
- *
- *  Contributor(s): _______________________________________
- *
+ *  $Revision: 1.19 $
+ *
+ *  last change: $Author: rt $ $Date: 2005-09-09 03:47:19 $
+ *
+ *  The Contents of this file are made available subject to
+ *  the terms of GNU Lesser General Public License Version 2.1.
+ *
+ *
+ *    GNU Lesser General Public License Version 2.1
+ *    =============================================
+ *    Copyright 2005 by Sun Microsystems, Inc.
+ *    901 San Antonio Road, Palo Alto, CA 94303, USA
+ *
+ *    This library is free software; you can redistribute it and/or
+ *    modify it under the terms of the GNU Lesser General Public
+ *    License version 2.1, as published by the Free Software Foundation.
+ *
+ *    This library is distributed in the hope that it will be useful,
+ *    but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ *    Lesser General Public License for more details.
+ *
+ *    You should have received a copy of the GNU Lesser General Public
+ *    License along with this library; if not, write to the Free Software
+ *    Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+ *    MA  02111-1307  USA
  *
  ************************************************************************/


src: fixed a bug

src: fixed a bug

--- src/Matrix.hpp
+++ src/Matrix.hpp
@@ -363,6 +363,7 @@
   }

   static bool HasInstance(const v8::Handle<v8::Value>& value) {
+    NanScope();
     v8::Local<v8::FunctionTemplate> tpl = NanNew(function_template);
     return tpl->HasInstance(value);
   }


TBR: phajdan.jr

TBR: phajdan.jr

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

--- chrome/browser/extensions/extension_install_ui_browsertest.cc
+++ chrome/browser/extensions/extension_install_ui_browsertest.cc
@@ -36,7 +36,7 @@
 // Flaky, http://crbug.com/43441.
 // Crashy, http://crbug.com/44548.
 IN_PROC_BROWSER_TEST_F(ExtensionInstallUIBrowserTest,
-                       DISABLED_TestThemeInstallUndoResetsToDefault) {
+                       TestThemeInstallUndoResetsToDefault) {
   // Install theme once and undo to verify we go back to default theme.
   FilePath theme_path = test_data_dir_.AppendASCII("theme.crx");
   ASSERT_TRUE(InstallExtensionWithUI(theme_path, 1));


Marking crashing tests as DISABLED instead of FAILS

A couple of crashing extensions tests are causing integration test runs
to show a red status. Disabling tests so that they aren't run.

TBR=akalin@chromium.org
BUG=66925
TEST=sync_integration_tests

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

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

--- chrome/test/live_sync/two_client_live_extensions_sync_test.cc
+++ chrome/test/live_sync/two_client_live_extensions_sync_test.cc
@@ -44,9 +44,9 @@
   ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier());
 }

-// TODO(rsimha): Remove FAILS_ prefix after http://crbug.com/66925 is fixed.
+// TODO(rsimha): Remove DISABLED_ prefix after http://crbug.com/66925 is fixed.
 IN_PROC_BROWSER_TEST_F(TwoClientLiveExtensionsSyncTest,
-                       FAILS_StartWithDifferentExtensions) {
+                       DISABLED_StartWithDifferentExtensions) {
   ASSERT_TRUE(SetupClients());

   int i = 0;
@@ -80,9 +80,9 @@
   ASSERT_TRUE(AllProfilesHaveSameExtensionsAsVerifier());
 }

-// TODO(rsimha): Remove FAILS_ prefix after http://crbug.com/66925 is fixed.
+// TODO(rsimha): Remove DISABLED_ prefix after http://crbug.com/66925 is fixed.
 IN_PROC_BROWSER_TEST_F(TwoClientLiveExtensionsSyncTest,
-                       FAILS_InstallDifferentExtensions) {
+                       DISABLED_InstallDifferentExtensions) {
   ASSERT_TRUE(SetupClients());

   int i = 0;


Changed pose estimation to the new linear orthographic projection algorithm

--- apps/4dface.cpp
+++ apps/4dface.cpp
@@ -22,8 +22,9 @@
 #include "eos/core/Landmark.hpp"
 #include "eos/core/LandmarkMapper.hpp"
 #include "eos/fitting/fitting.hpp"
-#include "eos/fitting/nonlinear_camera_estimation.hpp"
+#include "eos/fitting/orthographic_camera_estimation_linear.hpp"
 #include "eos/fitting/contour_correspondence.hpp"
+#include "eos/fitting/RenderingParameters.hpp"
 #include "eos/render/utils.hpp"
 #include "eos/render/render.hpp"
 #include "eos/render/texture_extraction.hpp"
@@ -200,7 +201,8 @@
 		vector<Vec4f> model_points; // the corresponding points in the 3D shape model
 		vector<int> vertex_indices; // their vertex indices
 		std::tie(image_points, model_points, vertex_indices) = get_corresponding_pointset(current_landmarks, landmark_mapper, morphable_model);
-		auto rendering_params = fitting::estimate_orthographic_camera(image_points, model_points, frame.cols, frame.rows);
+		auto scaled_ortho_projection = fitting::estimate_orthographic_projection_linear(image_points, model_points, true, frame.rows);
+		auto rendering_params = fitting::RenderingParameters(scaled_ortho_projection, frame.cols, frame.rows);

 		// Given the estimated pose, find 2D-3D contour correspondences:
 		// These are the additional contour correspondences we're going to find and then use:
@@ -215,7 +217,8 @@
 		image_points = concat(image_points, image_points_contour);

 		// Re-estimate the pose with all landmarks, including the contour landmarks:
-		rendering_params = fitting::estimate_orthographic_camera(image_points, model_points, frame.cols, frame.rows);
+		scaled_ortho_projection = fitting::estimate_orthographic_projection_linear(image_points, model_points, true, frame.rows);
+		rendering_params = fitting::RenderingParameters(scaled_ortho_projection, frame.cols, frame.rows);
 		Mat affine_cam = fitting::get_3x4_affine_camera_matrix(rendering_params, frame.cols, frame.rows);

 		// Fit the PCA shape model and expression blendshapes:


* take cached icons stuff out of the for curl.

svn path=/trunk/kdepim/; revision=407851

--- kmail/objecttreeparser.cpp
+++ kmail/objecttreeparser.cpp
@@ -2466,6 +2466,19 @@

     /* calculate line's current quoting depth */
     int actQuoteLevel = -1;
+
+    if ( GlobalSettings::showExpandQuotesMark() )
+    {
+      // Cache Icons
+      if ( mCollapseIcon.isEmpty() ) {
+        mCollapseIcon= pngToDataUrl(
+            KGlobal::instance()->iconLoader()->iconPath( "quotecollapse",0 ));
+      }
+      if ( mExpandIcon.isEmpty() )
+        mExpandIcon= pngToDataUrl(
+            KGlobal::instance()->iconLoader()->iconPath( "quoteexpand",0 ));
+    }
+
     for (unsigned int p=0; p<line.length(); p++) {
       switch (line[p].latin1()) {
         case '>':
@@ -2504,14 +2517,6 @@
       {
         if ( GlobalSettings::showExpandQuotesMark() )
         {
-          // Cache Icons
-          if ( mCollapseIcon.isEmpty() )
-            mCollapseIcon= pngToDataUrl(
-                KGlobal::instance()->iconLoader()->iconPath( "quotecollapse",0 ));
-          if ( mExpandIcon.isEmpty() )
-            mExpandIcon= pngToDataUrl(
-                KGlobal::instance()->iconLoader()->iconPath( "quoteexpand",0 ));
-
           if ( !actHidden )
           {
             htmlStr += "<div class=\"quotelevelmark\" >" ;


fixed comment about an actual volume range

--- koala_buzzer/sw/Buzzer.hpp
+++ koala_buzzer/sw/Buzzer.hpp
@@ -10,7 +10,7 @@
     TCCR0A |= _BV(WGM01) | _BV(WGM00);
     // 1->0 PWM's output compare
     TCCR0A |= _BV(COM0B1);
-    // volume 0-255
+    // volume 0-128
     OCR0B = 2;
     // output mode
     DDRB |= _BV(PB1);