/external/icu/icu4c/source/common/ |
D | cstr.h | 46 class U_COMMON_API CStr : public UMemory { 48 CStr(const UnicodeString &in); 49 ~CStr(); 54 CStr(const CStr &other); // Forbid copying of this class. 55 CStr &operator =(const CStr &other); // Forbid assignment.
|
D | cstr.cpp | 21 CStr::CStr(const UnicodeString &in) { in CStr() function in CStr 47 CStr::~CStr() { in ~CStr() 50 const char * CStr::operator ()() const { in operator ()()
|
/external/icu/libicu/cts_headers/ |
D | cstr.h | 46 class U_COMMON_API CStr : public UMemory { 48 CStr(const UnicodeString &in); 49 ~CStr(); 54 CStr(const CStr &other); // Forbid copying of this class. 55 CStr &operator =(const CStr &other); // Forbid assignment.
|
/external/crosvm/sys_util/src/ |
D | passwd.rs | 7 use std::ffi::CStr; 17 pub fn get_user_id(user_name: &CStr) -> Result<uid_t> { in get_user_id() 49 pub fn get_group_id(group_name: &CStr) -> Result<gid_t> { in get_group_id() 85 let root_name = CStr::from_bytes_with_nul(b"root\0").unwrap(); in get_good_uid() 94 let bad_name = CStr::from_bytes_with_nul(b"this better not be a user\0").unwrap(); in get_bad_uid() 105 let root_name = CStr::from_bytes_with_nul(b"root\0").unwrap(); in get_good_gid() 114 let bad_name = CStr::from_bytes_with_nul(b"this better not be a group\0").unwrap(); in get_bad_gid()
|
/external/rust/crates/nix/src/ |
D | lib.rs | 81 use std::ffi::{CStr, OsStr}; 172 where F: FnOnce(&CStr) -> T; in with_nix_path() 185 where F: FnOnce(&CStr) -> T { in with_nix_path() 200 where F: FnOnce(&CStr) -> T { in with_nix_path() 205 impl NixPath for CStr { implementation 215 where F: FnOnce(&CStr) -> T { in with_nix_path() 235 where F: FnOnce(&CStr) -> T { in with_nix_path() 248 Ok(f(CStr::from_ptr(buf.as_ptr() as *const c_char))) in with_nix_path() 265 fn with_nix_path<T, F>(&self, f: F) -> Result<T> where F: FnOnce(&CStr) -> T { in with_nix_path() 279 fn with_nix_path<T, F>(&self, f: F) -> Result<T> where F: FnOnce(&CStr) -> T { in with_nix_path()
|
D | kmod.rs | 6 use std::ffi::CStr; 46 pub fn init_module(module_image: &[u8], param_values: &CStr) -> Result<()> { in init_module() 83 pub fn finit_module<T: AsRawFd>(fd: &T, param_values: &CStr, flags: ModuleInitFlags) -> Result<()> { in finit_module() argument 119 pub fn delete_module(name: &CStr, flags: DeleteModuleFlags) -> Result<()> { in delete_module() argument
|
D | unistd.rs | 15 use std::ffi::{CStr, OsString}; 608 let len = CStr::from_ptr(buf.as_ptr() as *const c_char).to_bytes().len(); in getcwd() 719 fn to_exec_array<S: AsRef<CStr>>(args: &[S]) -> Vec<*const c_char> { in to_exec_array() 731 pub fn execv<S: AsRef<CStr>>(path: &CStr, argv: &[S]) -> Result<Infallible> { in execv() argument 755 pub fn execve<SA: AsRef<CStr>, SE: AsRef<CStr>>(path: &CStr, args: &[SA], env: &[SE]) -> Result<Inf… in execve() argument 776 pub fn execvp<S: AsRef<CStr>>(filename: &CStr, args: &[S]) -> Result<Infallible> { in execvp() argument 796 pub fn execvpe<SA: AsRef<CStr>, SE: AsRef<CStr>>(filename: &CStr, args: &[SA], env: &[SE]) -> Resul… in execvpe() argument 824 pub fn fexecve<SA: AsRef<CStr> ,SE: AsRef<CStr>>(fd: RawFd, args: &[SA], env: &[SE]) -> Result<Infa… in fexecve() argument 847 pub fn execveat<SA: AsRef<CStr>,SE: AsRef<CStr>>(dirfd: RawFd, pathname: &CStr, args: &[SA], in execveat() argument 943 pub fn gethostname(buffer: &mut [u8]) -> Result<&CStr> { in gethostname() argument [all …]
|
/external/rust/crates/rusqlite/src/ |
D | raw_statement.rs | 6 use std::ffi::CStr; 67 pub fn column_decltype(&self, idx: usize) -> Option<&CStr> { in column_decltype() argument 73 Some(CStr::from_ptr(decltype)) in column_decltype() 78 pub fn column_name(&self, idx: usize) -> Option<&CStr> { in column_name() argument 91 Some(CStr::from_ptr(ptr)) in column_name() 138 pub fn sql(&self) -> Option<&CStr> { in sql() argument 142 Some(unsafe { CStr::from_ptr(ffi::sqlite3_sql(self.ptr)) }) in sql()
|
D | version.rs | 2 use std::ffi::CStr; 16 let cstr = unsafe { CStr::from_ptr(ffi::sqlite3_libversion()) }; in version()
|
D | trace.rs | 3 use std::ffi::{CStr, CString}; 30 let c_slice = unsafe { CStr::from_ptr(msg).to_bytes() }; in config_log() 75 let c_slice = CStr::from_ptr(z_sql).to_bytes(); in trace() 103 let c_slice = CStr::from_ptr(z_sql).to_bytes(); in profile()
|
/external/rust/crates/libloading/src/ |
D | util.rs | 1 use std::ffi::{CStr, CString}; 10 pub(crate) fn cstr_cow_from_bytes(slice: &[u8]) -> Result<Cow<'_, CStr>, Error> { in cstr_cow_from_bytes() argument 14 None => unsafe { Cow::Borrowed(CStr::from_ptr(&ZERO)) }, in cstr_cow_from_bytes() 16 Some(&0) => Cow::Borrowed(CStr::from_bytes_with_nul(slice) in cstr_cow_from_bytes()
|
/external/rust/crates/android_logger/src/ |
D | lib.rs | 80 use std::ffi::{CStr, CString}; 92 fn android_log(prio: log_ffi::LogPriority, tag: &CStr, msg: &CStr) { in android_log() argument 104 fn android_log(_priority: Level, _tag: &CStr, _msg: &CStr) {} in android_log() argument 163 let tag: &CStr = unsafe { CStr::from_ptr(mem::transmute(tag_bytes.as_ptr())) }; in log() 278 tag: &'a CStr, 284 pub fn new(level: Level, tag: &CStr) -> PlatformLogWriter { in new() 302 pub fn new(level: Level, tag: &CStr) -> PlatformLogWriter { in new() 360 let msg: &CStr = unsafe { CStr::from_ptr(mem::transmute(self.buffer.as_ptr())) }; in output_specified_len() 532 let tag = CStr::from_bytes_with_nul(b"tag\0").unwrap(); in platform_log_writer_init_values() 633 PlatformLogWriter::new(Level::Warn, &CStr::from_bytes_with_nul(b"tag\0").unwrap()) in get_tag_writer()
|
/external/rust/crates/rusqlite/src/util/ |
D | small_cstr.rs | 2 use std::ffi::{CStr, CString, NulError}; 76 pub fn as_cstr(&self) -> &CStr { in as_cstr() argument 78 debug_assert!(CStr::from_bytes_with_nul(bytes).is_ok()); in as_cstr() 79 unsafe { CStr::from_bytes_with_nul_unchecked(bytes) } in as_cstr() 102 type Target = CStr; 104 fn deref(&self) -> &CStr { in deref() argument
|
D | sqlite_string.rs | 81 pub(crate) fn as_cstr(&self) -> &std::ffi::CStr { in as_cstr() argument 82 unsafe { std::ffi::CStr::from_ptr(self.as_ptr()) } in as_cstr() 143 debug_assert_eq!(std::ffi::CStr::from_ptr(res_ptr.as_ptr()).to_bytes(), bytes); in from_str() 222 std::ffi::CStr::from_ptr(s0).to_str().unwrap(), in test_into_raw() 226 std::ffi::CStr::from_ptr(s1).to_str().unwrap(), in test_into_raw()
|
/external/llvm/utils/TableGen/ |
D | CodeGenInstruction.cpp | 204 static void ParseConstraint(const std::string &CStr, CGIOperandList &Ops) { in ParseConstraint() argument 206 std::string::size_type wpos = CStr.find_first_of(" \t"); in ParseConstraint() 207 std::string::size_type start = CStr.find_first_not_of(" \t"); in ParseConstraint() 208 std::string Tok = CStr.substr(start, wpos - start); in ParseConstraint() 210 std::string Name = CStr.substr(wpos+1); in ParseConstraint() 213 PrintFatalError("Illegal format for @earlyclobber constraint: '" + CStr + "'"); in ParseConstraint() 226 std::string::size_type pos = CStr.find_first_of('='); in ParseConstraint() 228 start = CStr.find_first_not_of(" \t"); in ParseConstraint() 229 std::string Name = CStr.substr(start, pos - start); in ParseConstraint() 234 PrintFatalError("Illegal format for tied-to constraint: '" + CStr + "'"); in ParseConstraint() [all …]
|
/external/llvm-project/llvm/utils/TableGen/ |
D | CodeGenInstruction.cpp | 234 static void ParseConstraint(const std::string &CStr, CGIOperandList &Ops, in ParseConstraint() argument 237 std::string::size_type wpos = CStr.find_first_of(" \t"); in ParseConstraint() 238 std::string::size_type start = CStr.find_first_not_of(" \t"); in ParseConstraint() 239 std::string Tok = CStr.substr(start, wpos - start); in ParseConstraint() 241 std::string Name = CStr.substr(wpos+1); in ParseConstraint() 246 Rec->getName() + "': '" + CStr + "'"); in ParseConstraint() 261 std::string::size_type pos = CStr.find_first_of('='); in ParseConstraint() 264 Rec->getLoc(), "Unrecognized constraint '" + CStr + in ParseConstraint() 266 start = CStr.find_first_not_of(" \t"); in ParseConstraint() 269 wpos = CStr.find_first_of(" \t", start); in ParseConstraint() [all …]
|
/external/crosvm/fuse/src/ |
D | filesystem.rs | 6 use std::ffi::CStr; 83 pub name: &'a CStr, 410 fn lookup(&self, ctx: Context, parent: Self::Inode, name: &CStr) -> io::Result<Entry> { in lookup() 498 linkname: &CStr, in symlink() argument 500 name: &CStr, in symlink() argument 520 name: &CStr, in mknod() argument 540 name: &CStr, in mkdir() argument 563 fn unlink(&self, ctx: Context, parent: Self::Inode, name: &CStr) -> io::Result<()> { in unlink() 572 fn rmdir(&self, ctx: Context, parent: Self::Inode, name: &CStr) -> io::Result<()> { in rmdir() 592 oldname: &CStr, in rename() argument [all …]
|
/external/icu/icu4c/source/test/intltest/ |
D | rbbimonkeytest.cpp | 135 printf("epandedDef: %s\n", CStr(expandedDef)()); in addCharClass() 141 … __FILE__, __LINE__, u_errorName(status), CStr(name)(), CStr(expandedDef)()); in addCharClass() 154 IntlTest::gTest->logln("Redefinition of character class %s\n", CStr(cclass->fName)()); in addCharClass() 178 __FILE__, __LINE__, CStr(name)(), CStr(definition)()); in addRule() 216 printf("fExpandedRule: %s\n", CStr(thisRule->fExpandedRule)()); in addRule() 223 __FILE__, __LINE__, CStr(thisRule->fExpandedRule)()); in addRule() 235 localeName.append(CStr(value)(), -1, status); in setKeywordParameter() 249 … IntlTest::gTest->errln("%s:%d Unrecognized break type %s", __FILE__, __LINE__, CStr(value)()); in setKeywordParameter() 313 printf("scanned class: %s = %s\n", CStr(className)(), CStr(classDef)()); in compileRules() 330 printf("scanned rule: %s : %s\n", CStr(ruleName)(), CStr(ruleDef)()); in compileRules() [all …]
|
/external/libchromeos-rs/src/ |
D | syslog.rs | 5 use std::ffi::CStr; 36 let cmsg = if let Ok(m) = CStr::from_bytes_with_nul(msg.as_bytes()) { in log() 54 pub fn init(ident: &'static CStr) -> Result<(), SetLoggerError> { in init()
|
D | read_dir.rs | 5 use std::ffi::CStr; 28 pub name: &'r CStr, 114 fn strip_padding(b: &[u8]) -> &CStr { in strip_padding() argument 123 unsafe { CStr::from_bytes_with_nul_unchecked(&b[..pos + 1]) } in strip_padding()
|
/external/rust/crates/grpcio/src/ |
D | log_util.rs | 3 use std::ffi::CStr; 25 let file_str = unsafe { CStr::from_ptr(args.file).to_str().unwrap() }; in delegate() 28 let msg = unsafe { CStr::from_ptr(args.message).to_string_lossy() }; in delegate()
|
D | auth_context.rs | 4 use std::ffi::CStr; 44 Some(CStr::from_ptr(p).to_str().expect("valid UTF-8 data")) in peer_identity_property_name() 125 unsafe { CStr::from_ptr((*self.prop).name) } in name()
|
/external/crosvm/libcrosvm_control/src/ |
D | lib.rs | 9 use std::ffi::CStr; 22 let socket_path = unsafe { CStr::from_ptr(socket_path) }; in validate_socket_path() 183 let dev_path = Path::new(unsafe { CStr::from_ptr(dev_path) }.to_str().unwrap_or("")); in crosvm_client_usb_attach() 234 let battery_type = unsafe { CStr::from_ptr(battery_type) }; in crosvm_client_modify_battery() 235 let property = unsafe { CStr::from_ptr(property) }; in crosvm_client_modify_battery() 236 let target = unsafe { CStr::from_ptr(target) }; in crosvm_client_modify_battery()
|
/external/crosvm/qcow_utils/src/ |
D | qcow_utils.rs | 8 use std::ffi::CStr; 22 let c_str = CStr::from_ptr(path); in create_qcow_with_size() 51 let c_str = CStr::from_ptr(path); in expand_disk_image()
|
/external/rust/crates/nix/src/sys/ |
D | memfd.rs | 5 use std::ffi::CStr; 14 pub fn memfd_create(name: &CStr, flags: MemFdCreateFlag) -> Result<RawFd> { in memfd_create() argument
|