Displaying 20 results from an estimated 105 matches for "c_".
2020 Mar 17
0
[PATCH libnbd v2 3/3] golang: Add straightforward bindings, without callbacks.
..."false"
+  | RStaticString -> "nil"
+  | RErr -> "0"
+  | RFd -> "0/*XXX*/"
+  | RInt -> "0"
+  | RInt64 -> "0"
+  | RCookie -> "0"
+  | RString -> "nil"
+  | RUInt -> "0"
+
+let go_ret_c_errcode = function
+  | RBool -> Some "-1"
+  | RStaticString -> Some "nil"
+  | RErr -> Some "-1"
+  | RFd -> Some "-1/*XXX*/"
+  | RInt -> Some "-1"
+  | RInt64 -> Some "-1"
+  | RCookie -> Some "-1"
+  | RS...
2002 Oct 12
2
Can't make a shadow direcory
Hi,
I'm trying to make a shadow directory, and followed the instructions out of 
the Wine manual, but it doesn't work. I should do this:
~>cd /
/>mkdir c_shadow
/>cd c_shadow
/c_shadow>ln -s /c_/* .
/c_shadow>rm windows AnApp
/c_shadow>cp -R /c_/{windows,AnApp} .
/c_shadow>chmod -R 777 windows AnApp
/c_shadow>perl -p -i -e 's|/c$|/c_shadow|g' /usr/local/etc/wine.conf
I didn't came further than:
[root@ben /]# mkdir c_sh...
2020 Mar 17
5
[PATCH libnbd v2 0/3] Unfinished golang bindings.
These bindings get as far as running very simple connections.
However there are many missing parts still:
* No callbacks.
* No functions which handle buffers (pread/pwrite!)
This is posted just for general early interest, not even for review.
Rich.
2019 Jun 27
0
[PATCH 6/9] Rust bindings: Add generator of function signatures
...rator/rust.ml b/generator/rust.ml
index a229d5eac..aa8b249ff 100644
--- a/generator/rust.ml
+++ b/generator/rust.ml
@@ -59,8 +59,10 @@ let generate_rust () =
   generate_header CStyle LGPLv2plus;
 
   pr "
+use std::collections;
 use std::ffi;
 use std::slice;
+use std::ptr;
 use std::os::raw::c_char;
 
 
@@ -130,6 +132,18 @@ impl CreateFlags {
     }
 }
 
+fn arg_string_list (v: &Vec<String>) -> Vec<*const i8> {
+    let length = v.len();
+    let mut w = Vec::new();
+    for x in v.iter() {
+        let y: &str = x;
+        let s = ffi::CString::new(y).unwrap();
+...
2019 Jun 27
0
Re: [PATCH 08/11] Rust bindings: Fix memory management and format the file
...a/generator/rust.ml b/generator/rust.ml
index 79e16dfc6..ee65b1073 100644
--- a/generator/rust.ml
+++ b/generator/rust.ml
@@ -61,14 +61,16 @@ let generate_rust () =
   pr "
 use std::collections;
 use std::convert;
+use std::convert::TryFrom;
 use std::ffi;
-use std::slice;
+use std::os::raw::{c_char, c_int, c_void};
 use std::ptr;
-use std::os::raw::{c_char, c_int};
+use std::slice;
+use std::str;
 #[allow(non_camel_case_types)]
-enum guestfs_h {}  // opaque struct
+enum guestfs_h {} // opaque struct
 #[link(name = \"guestfs\")]
 extern \"C\" {
@@ -79,6 +81,11 @@ ext...
2020 Mar 24
1
[PATCH libnbd v3] Add Go language bindings (golang) (RHBZ#1814538).
This feature is roughly finished now, although it needs a few more
tests and some examples.
It's pretty much up to par with all the other bindings, but it lacks a
completely safe AIO buffer.  It won't stop you from freeing the buffer
too early) because golang's GC inexplicably lacks a way to declare a
root from C.  I can probably do it with a global variable and ref
counting on the
2020 Mar 25
3
[PATCH libnbd v4] Add Go language bindings (golang) (RHBZ#1814538).
Now runs a complete set of tests, notably including the AIO test.
File descriptors are passed in and out as plain ints (instead of
*os.File) for a couple of reasons: (1) We have to pass the plain int
to syscall.Select.  (2) Turning an fd into an os.File causes golang to
set the blocking flag which is deeply unhelpful.
Rich.
2020 Sep 29
2
[PATCH libnbd] generator: Add SizeT type, maps to C size_t.
...ring"
+  | SizeT _ -> "int"
   | SockAddrAndLen _ -> "string"
   | String _ -> "string"
   | StringList _ -> "[]string"
@@ -276,6 +278,8 @@ let print_binding (name, { args; optargs; ret; shortdesc }) =
     | Path n ->
        pr "    c_%s := C.CString (%s)\n" n n;
        pr "    defer C.free (unsafe.Pointer (c_%s))\n" n
+    | SizeT n ->
+       pr "    c_%s := C.size_t (%s)\n" n n
     | SockAddrAndLen (n, len) ->
        pr "    panic (\"SockAddrAndLen not supported\")\n";...
2011 Mar 14
1
Math characters in column heading using latex() in Hmisc
Hi Everybody
I want to print a latex table containing math characters in the column
heading
These are the formulae I want to use as column headings. It prints OK from
TeX
$\sum_{i}\sum_{j}C_{P,i,j,y}\times\mathit{FC}_{i}$, $XU_{alt,y}$, $n$,
$\bar{C}_{P,y}$
My plan was to create a character vector with these and later rbind the
values to them. When I create the vector like:
Season=c("$\sum_{i}\sum_{j}C_{P,i,j,y}\times\mathit{FC}_{i}$","$XU_{alt,y}$"
,"$n$&quo...
2019 Jun 27
4
Re: [PATCH 9/9] Rust bindings: Complete bindings
Patch 9 is a kind of dumping ground of all kinds of stuff.  It may be
better to spend some time with git rebase -i trying to work this into
more coherent patches.
Rich.
-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-p2v converts physical machines to virtual machines.  Boot with a
live
2019 Jun 27
0
[PATCH 7/9] Rust bindings: Complete actions
...diff --git a/generator/rust.ml b/generator/rust.ml
index aa8b249ff..79e16dfc6 100644
--- a/generator/rust.ml
+++ b/generator/rust.ml
@@ -60,10 +60,11 @@ let generate_rust () =
 
   pr "
 use std::collections;
+use std::convert;
 use std::ffi;
 use std::slice;
 use std::ptr;
-use std::os::raw::c_char;
+use std::os::raw::{c_char, c_int};
 
 
 #[allow(non_camel_case_types)]
@@ -74,6 +75,8 @@ extern \"C\" {
     fn guestfs_create() -> *mut guestfs_h;
     fn guestfs_create_flags(flags: i64) -> *mut guestfs_h;
     fn guestfs_close(g: *mut guestfs_h);
+    fn guestfs_last_error(...
2019 Jun 27
0
[PATCH 9/9] Rust bindings: Complete bindings
...t.ml b/generator/rust.ml
index 4766357be..ee65b1073 100644
--- a/generator/rust.ml
+++ b/generator/rust.ml
@@ -61,14 +61,16 @@ let generate_rust () =
   pr "
 use std::collections;
 use std::convert;
+use std::convert::TryFrom;
 use std::ffi;
-use std::slice;
-use std::ptr;
 use std::os::raw::{c_char, c_int, c_void};
+use std::ptr;
+use std::slice;
+use std::str;
 
 
 #[allow(non_camel_case_types)]
-enum guestfs_h {}  // opaque struct
+enum guestfs_h {} // opaque struct
 
 #[link(name = \"guestfs\")]
 extern \"C\" {
@@ -141,22 +143,22 @@ impl CreateFlags {
 }
 
 struct N...
2002 Oct 13
3
Can't make a shadow directory
...rote:
>
> > Hi,
> >
> > I'm trying to make a shadow directory, and followed the instructions out 
>of
> > the Wine manual, but it doesn't work. I should do this:
> >
>...
> > I didn't came further than:
> >
> > [root@ben /]# mkdir c_shadow
> > [root@ben /]# cd c_shadow
> > [root@ben c_shadow]# ln -s /c_/* .
>
>This is only going to work if your windows drive is monted on
>/c_.  I know, in the examples before, we mounted it on /c
>so maybe you want to do
>ln -s /c/* .
>instead, IOW substitute the re...
2007 Jun 12
1
Warning under R 2.6.0: Rd files with unknown encoding
Dear R-devel list members,
Under the development version of R (2.6.0), I notice that my sem package
produces the following warning:
	checking Rd files ... WARNING
	Rd files with unknown encoding:
	residuals.Rd
I wonder what the warning means. As far as I can see, residuals.Rd is
similar to the other .Rd files in the package.
At least for the time being, I won't reproduce residuals.Rd here
2019 Jun 27
16
[PATCH 1/9] Rust bindings: Add Rust bindings
...@@ -161,6 +161,8 @@ HEADING([Checking for Go])
 m4_include([m4/guestfs-golang.m4])
 HEADING([Checking for GObject Introspection])
 m4_include([m4/guestfs-gobject.m4])
+HEADING([Checking for Rust])
+m4_include([m4/guestfs-rust.m4])
 HEADING([Checking for Vala])
 VAPIGEN_CHECK
 
@@ -315,6 +317,7 @@ AC_CONFIG_FILES([Makefile
                  ruby/Rakefile
                  ruby/examples/Makefile
                  ruby/ext/guestfs/extconf.rb
+                 rust/Makefile
                  sparsify/Makefile
                  sysprep/Makefile
                  test-data/Makefile
diff --git a/gener...
2019 Jul 02
16
[PATCH] Add Rust bindings
I fixed the patch I submitted before based on comments, and there are some
commits which are merged or divided. So, I will re-send all the patches.
Regards,
Hiroyuki Katsura
2010 Jan 11
1
Help with Order
...in each file but each file refers to measurement 
data obtained at a different time.
Here's the code
library(reshape)
# Enter file name to Read & Save data
FileName=readline("Enter File name:\n")
# Find first occurance of file
for ( round1 in 1 : 6) {
ReadFile=paste(round1,"C_",FileName,"_Stats.csv", sep="")
if (file.exists(ReadFile))
break
}
x = data.frame(read.csv(ReadFile, header=TRUE),rnd=round1)
for ( round2 in (round1+1) : 6) {
#
ReadFile=paste(round2,"C_",FileName,"_Stats.csv", sep="")
if (file.exists(ReadFil...
2020 Sep 11
0
[libnbd PATCH v2 2/5] generator: Refactor filtering of accepted OFlags
...fix)
+         | OFlags (_, {flag_prefix}, _) -> pr "%s" (camel_case flag_prefix)
         );
         pr "\n"
     ) optargs;
@@ -298,7 +298,7 @@ let print_binding (name, { args; optargs; ret; shortdesc }) =
       function
       | OClosure { cbname } -> pr "    var c_%s C.nbd_%s_callback\n"
                                  cbname cbname
-      | OFlags (n, _) -> pr "    var c_%s C.uint32_t\n" n
+      | OFlags (n, _, _) -> pr "    var c_%s C.uint32_t\n" n
     ) optargs;
     pr "    if optargs != nil {\n";
     List.ite...
2010 Jul 21
1
function of an integral
...of an integral of
another function.
The problem is the following:
I have a variable called cip. I have to create another variable called bip
that is a function of the former variable cip and also the cumulative
distribution function of the variable cip.
Consider the equation below:
b_{i}\left(c_{i},F,I,p_{0}\right)=c_{i}+\frac{1}{\left[1-F\left(c_{i}\right)\right]^{I-1}}\int_{\overline{c}}^{1}\left[1-F\left(u\right)\right]^{I-1}du
In my case, the equation will be:
bip=cip+\frac{1}{\left[1-F\left(cip\right)\right]^{4}}\int_{cip}^{2,967}\left[1-F\left(u\right)\right]^{4}du
I am fa...
2005 Dec 15
0
[LLVMdev] Vector LLVM extension v.s. DirectX Shaders
On Thu, 15 Dec 2005, Tzu-Chien Chiu wrote:
> To write a compiler for Microsoft Direct3D shaders from our hardware,
> I have a program which translates the Direct3D shader assembly to LLVM
> assembly. I added several intrinsics for this purpose.
> It's a vector ISA and has some special instructions like:
> * rcp (reciprocal)
> * frc (the fractional portion of each input