]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Indent comment.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 1 Oct 2002 19:12:48 +0000 (19:12 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 1 Oct 2002 19:12:48 +0000 (19:12 +0000)
git-svn-id: https://svn.dealii.org/trunk@6587 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/contrib/hsl/source/detached_ma27.cc
deal.II/lac/source/sparse_direct.cc

index 3e84c53e5a609398bc7d924410e383c975f4e6cb..39995d79d1c2407c82c32d0a07271327b8f390bd 100644 (file)
@@ -21,6 +21,7 @@
 #include <cstdio>
 #include <cstdlib>
 #include <typeinfo>
+#include <string>
 
 #include <unistd.h>
 #include <pthread.h>
@@ -154,21 +155,25 @@ void monitor_parent_liveness (const pid_t master_pid)
 template <typename T>
 void put (const T *t, const size_t N, const char *debug_info)
 {
-                                   // repeat writing until syscall is
-                                   // not interrupted
-  int ret;
-  do
-    ret = write (1, reinterpret_cast<const char *> (t),
-                 sizeof(T) * N);
-  while ((ret<0) && (errno==EINTR));
-  if (ret < 0)
-    die ("error on client side in 'put'", ret, errno);
-  if (ret < static_cast<signed int>(sizeof(T)*N))
-    die ("not everything was written", ret, sizeof(T)*N);
+  unsigned int count = 0;
+  while (count < sizeof(T)*N)
+    {
+                                       // repeat writing until syscall
+                                       // is not interrupted
+      int ret;
+      do
+        ret = write (1, reinterpret_cast<const char *> (t),
+                     sizeof(T) * N);
+      while ((ret<0) && (errno==EINTR));
+      if (ret < 0)
+        die ("error on client side in 'put'", ret, errno);
 
+      count += ret;
+    };
+  
   fflush (NULL);
   CommunicationsLog::
-    record_communication<T> (CommunicationsLog::put, N, ret, debug_info);
+    record_communication<T> (CommunicationsLog::put, N, count, debug_info);
 };
 
 
index 26cbfaaa82fd00f4c996c03b080009ee1abfa804..3fbf854692aa1c54f3306286f169c9d7b4352851 100644 (file)
@@ -363,8 +363,9 @@ struct SparseDirectMA27::DetachedModeData
         unsigned int count = 0;
         while (count < sizeof(T)*N)
           {
-                                             // repeat writing until syscall is
-                                             // not interrupted
+                                             // repeat writing until
+                                             // syscall is not
+                                             // interrupted
             int ret;
             do
               ret = write (server_client_pipe[1],

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.