search for: nullstr

Displaying 20 results from an estimated 34 matches for "nullstr".

Did you mean: nullptr
2005 Jan 12
1
RODBC package -- sqlQuery(channel,.....,nullstring=0) stillgives NA's
There is something strange in R behaviour (perhaps). I have run the same select in Oracle SQL*Plus (version 10.1.0.2.0) and the output comes out with NULLs (which is what it ougth to be). But in R I still get the same result with NAs (no matter I use na.strings or nullstring arguments) An output example follows below: Using na.string="0" and nullstring="0" (sorry by the indents): Length 2003 2002 2001 2000 1999 1998 1997 1996 1995 1 32 NA 1 NA NA NA NA NA 2 NA 2 34 3 NA NA NA NA NA NA 6 NA 3...
2005 Jan 12
0
RODBC package -- sqlQuery(channel,.....,nullstring=0)stillgives NA's
...Thank you for your replies but the door is still open so as to know a solution to the select without coercing NAs to 0s after retrieving the data Best, Luis >>> Prof Brian Ripley <ripley at stats.ox.ac.uk> 12/01/2005 11:21:33 >>> PLEASE do read the help page, which says nullstring: character string to be used when reading 'SQL_NULL_DATA' character items from the database. ^^^^^^^^^^^^^^^ so this does not apply to numeric items. You can of course easily change numeric NAs to 0s, if you want to. On Wed, 12 Jan 2005, Luis Rideau Cruz wrote: &...
2005 Jan 11
1
RODBC package -- sqlQuery(channel,.....,nullstring=0) still gives NA's
R-help, I'm using the RODBC package to retrieve data froma ODBC database which contain NA's. By using the argument nullstring = "0" in sqlQuery() I expect to coerce them to numeric but still get NA's in my select. I'm running on Windows XP > version _ platform i386-pc-mingw32 arch i386 os mingw32 system i386, mingw32 status...
2020 Nov 09
4
[[PATCH v1 0/3] Fix clang build warnings
New clangs emit some warnings. The code isn't wrong, but should be updated to prevent warning creep. Bill Wendling (3): [klibc] dash: shell: Fix clang warnings [klibc] dash: shell: Fix clang warnings about format string [klibc] Kbuild: use an enum to silence a clang warning usr/dash/eval.c | 6 +++--- usr/dash/jobs.c | 2 +- usr/kinit/nfsmount/dummypmap.c
2020 Mar 28
0
[klibc:update-dash] dash: exec: Do not allocate stack string in padvance
...entry *cmdp) idx = cmdp->param.index; path = pathval(); do { - name = padvance(&path, cmdp->cmdname); - stunalloc(name); + padvance(&path, cmdp->cmdname); } while (--idx >= 0); + name = stackblock(); out1str(name); out1fmt(snlfmt, cmdp->rehash ? "*" : nullstr); } @@ -291,6 +290,7 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path) int e; int updatetbl; struct builtincmd *bcmd; + int len; /* If name contains a slash, don't use PATH or hash table */ if (strchr(name, '/') != NULL) { @@ -362,8 +362,8 @@ fi...
2010 Jan 24
0
Setting the value of max in calls to sqlGetResults
...sqlGetResults to get the same result (and the same error) > library(RODBC) > channel <- odbcConnect("OraLSH", <user>, <password>) > odbcQuery (channel, "select sysdate from dual") > sqlGetResults(channel, as.is=FALSE, errors=FALSE, max=0, buffsize=1, nullstring=NA, na.strings="NA", believeNRows=TRUE, dec=getOption("dec")) Which returns the same error, namely: Error in .Call(C_RODBCFetchRows, attr(channel, "handle_ptr"), max, buffsize, : negative length vectors are not allowed > However, if I modify the value of max=...
2010 Jan 24
0
Setting thevalue of max in calls to sqlGetResults
...sqlGetResults to get the same result (and the same error) > library(RODBC) > channel <- odbcConnect("OraLSH", <user>, <password>) > odbcQuery (channel, "select sysdate from dual") > sqlGetResults(channel, as.is=FALSE, errors=FALSE, max=0, buffsize=1, nullstring=NA, na.strings="NA", believeNRows=TRUE, dec=getOption("dec")) Which returns the same error, namely: Error in .Call(C_RODBCFetchRows, attr(channel, "handle_ptr"), max, buffsize, : negative length vectors are not allowed > However, if I modify the value of max=...
2007 Jan 27
0
[PATCH] dash: Fix "pwd -P" breakage due to getcwd(0, 0) usage
...). usr/dash/cd.c | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/usr/dash/cd.c b/usr/dash/cd.c index 1849c69..567393f 100644 --- a/usr/dash/cd.c +++ b/usr/dash/cd.c @@ -251,8 +251,9 @@ inline STATIC char * getpwd() { - char *dir = getcwd(0, 0); - return dir ? dir : nullstr; + char buf[PATH_MAX]; + char *dir = getcwd(buf, sizeof(buf)); + return dir ? savestr(dir) : nullstr; } int -- 1.5.0.rc1.gbcae
2010 Apr 02
1
[PATCH] dash: cd fix getpwd
...#ifdef __GLIBC__ char *dir = getcwd(0, 0); + if (dir) + return dir; #else char buf[PATH_MAX]; - char *dir = getcwd(buf, sizeof(buf)); + if(getcwd(buf, sizeof(buf))) + return savestr(buf); #endif - if (dir) - return dir; sh_warnx("getcwd() failed: %s", strerror(errno)); return nullstr; } -- 1.7.0.3
2006 Oct 17
2
RODBC and NULL values
...| | 13 | 1 1 | 5 | | | 10 | 0 10 | 13 | 13 | | 22 | 0 However, these are all converted to zeros when I use RODBC's sqlQuery(), making interpretation impossible. I have tried using the nullstring and na.strings options, but these don't seem to have any effect. I have tried various combinations of NULL, NA and "". Forgive my awkward SQL. > channel = odbcConnect("ataxia", uid="mark") > disease = sqlQuery(channel, "select calc_survival_unilatera...
2020 Mar 27
2
[PATCH v2 5/5] Clean up clang warnings
...2 +- 5 files changed, 14 insertions(+), 14 deletions(-) diff --git a/usr/dash/eval.c b/usr/dash/eval.c index ae83508ba160..2fa1a59995da 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -103,8 +103,8 @@ STATIC int bltincmd(int, char **); STATIC const struct builtincmd bltin = { - name: nullstr, - builtin: bltincmd + .name = nullstr, + .builtin = bltincmd }; @@ -274,7 +274,7 @@ checkexit: n->nbinary.ch1, (flags | ((isor >> 1) - 1)) & EV_TESTED ); - if (!exitstatus == isor) + if ((!exitstatus) == isor) break; if (!evalskip) { n = n->nbinary.ch2;...
2020 Mar 28
0
[klibc:update-dash] dash: exec: Stricter pathopt parsing
...urn padvance_magic(path, name, 1); +} diff --git a/usr/dash/mail.c b/usr/dash/mail.c index 7f9e49de..8eacb2d0 100644 --- a/usr/dash/mail.c +++ b/usr/dash/mail.c @@ -79,7 +79,7 @@ chkmail(void) for (mtp = mailtime; mtp < mailtime + MAXMBOXES; mtp++) { int len; - len = padvance(&mpath, nullstr); + len = padvance_magic(&mpath, nullstr, 2); if (!len) break; p = stackblock(); diff --git a/usr/dash/main.c b/usr/dash/main.c index c87fbd73..e8e42565 100644 --- a/usr/dash/main.c +++ b/usr/dash/main.c @@ -300,7 +300,8 @@ find_dot_file(char *basename) while ((len = padvance(&am...
2020 Mar 28
0
[klibc:update-dash] dash: eval: Add assignment built-in support again
...rser.h | 1 + 5 files changed, 97 insertions(+), 75 deletions(-) diff --git a/usr/dash/eval.c b/usr/dash/eval.c index ff27ba9c..9e88fef2 100644 --- a/usr/dash/eval.c +++ b/usr/dash/eval.c @@ -100,8 +100,9 @@ STATIC int bltincmd(int, char **); STATIC const struct builtincmd bltin = { - name: nullstr, - builtin: bltincmd + .name = nullstr, + .builtin = bltincmd, + .flags = BUILTIN_REGULAR, }; @@ -648,22 +649,42 @@ out: result->fd, result->buf, result->nleft, result->jp)); } -static char ** -parse_command_args(char **argv, const char **path) +static struct strlist *fill_ar...
2019 Aug 05
2
Vm in state "in shutdown"
...r mon, 1048 qemuMonitorMessagePtr msg) 1049 { 1050 int ret = -1; 1051 1052 /* Check whether qemu quit unexpectedly */ 1053 if (mon->lastError.code != VIR_ERR_OK) { 1054 VIR_DEBUG("Attempt to send command while error is set %s", 1055 NULLSTR(mon->lastError.message)); 1056 virSetError(&mon->lastError); 1057 return -1; 1058 } 1059 1060 if (!mon->watch) { 1061 VIR_WARN("Attempt to send command while mon->watch is zero"); 1062 virReportError(VIR_ERR_INTERNAL_ERROR, "%s&...
2015 Apr 17
0
[ANNOUNCE] xdpyinfo 1.3.2
...on was in error along with usage message Sprinkle consts in StrCmp to quiet cast warnings config: Add missing AC_CONFIG_SRCDIR configure: Drop AM_MAINTAINER_MODE autogen.sh: Honor NOCONFIGURE=1 Mark required arguments to Xlib error handler as unused Delete unused NULLSTR macro xdpyinfo 1.3.2 git tag: xdpyinfo-1.3.2 http://xorg.freedesktop.org/archive/individual/app/xdpyinfo-1.3.2.tar.bz2 MD5: 8809037bd48599af55dad81c508b6b39 SHA1: 0922fc31f8fc82ac20e326a6c9eb33ed7d57ad87 SHA256: 30238ed915619e06ceb41721e5f747d67320555cc38d459e954839c189ccaf51 PGP: http://...
2019 Jan 25
0
[klibc:update-dash] [BUILTIN] Handle -- in dotcmd
...ed, 6 insertions(+), 2 deletions(-) diff --git a/usr/dash/main.c b/usr/dash/main.c index 00c5e00d..985e8c4e 100644 --- a/usr/dash/main.c +++ b/usr/dash/main.c @@ -321,15 +321,19 @@ dotcmd(int argc, char **argv) { int status = 0; - if (argc >= 2) { /* That's what SVR2 does */ + nextopt(nullstr); + argv = argptr; + + if (*argv) { char *fullname; - fullname = find_dot_file(argv[1]); + fullname = find_dot_file(*argv); setinputfile(fullname, INPUT_PUSH_FILE); commandname = fullname; status = cmdloop(0); popfile(); } + return status; }
2019 Jan 25
0
[klibc:update-dash] expand: Fix bugs with words connected to the right of $@
...p--; @@ -1032,7 +1032,10 @@ ifsbreakup(char *string, int maxargs, struct arglist *arglist) realifs = ifsset() ? ifsval() : defifs; ifsp = &ifsfirst; do { + int afternul; + p = string + ifsp->begoff; + afternul = nulonly; nulonly = ifsp->nulonly; ifs = nulonly ? nullstr : realifs; ifsspc = 0; @@ -1097,7 +1100,7 @@ ifsbreakup(char *string, int maxargs, struct arglist *arglist) } if (isifs) { - if (!nulonly) + if (!(afternul || nulonly)) ifsspc = isdefifs; /* Ignore IFS whitespace at start */ if (q == start && ifssp...
2019 Jan 25
0
[klibc:update-dash] builtin: Move echo space/nl handling into print_escape_str
...likely(*argv)) - nonl += print_escape_str("%s", NULL, NULL, *argv++); - if (likely((nonl + !*argv) > 1)) - break; + if (!s || !*++argv) + fmt = lastfmt; - c = *argv ? ' ' : '\n'; - out1c(c); - } while (*argv); + nonl = print_escape_str(fmt, NULL, NULL, s ?: nullstr); + } while (!nonl && *argv); return 0; }
2020 Mar 28
0
[klibc:update-dash] dash: [BUILTIN] Handle -- in dotcmd
...ed, 6 insertions(+), 2 deletions(-) diff --git a/usr/dash/main.c b/usr/dash/main.c index 00c5e00d..985e8c4e 100644 --- a/usr/dash/main.c +++ b/usr/dash/main.c @@ -321,15 +321,19 @@ dotcmd(int argc, char **argv) { int status = 0; - if (argc >= 2) { /* That's what SVR2 does */ + nextopt(nullstr); + argv = argptr; + + if (*argv) { char *fullname; - fullname = find_dot_file(argv[1]); + fullname = find_dot_file(*argv); setinputfile(fullname, INPUT_PUSH_FILE); commandname = fullname; status = cmdloop(0); popfile(); } + return status; }
2020 Mar 28
0
[klibc:update-dash] dash: expand: Fix bugs with words connected to the right of $@
...p--; @@ -1032,7 +1032,10 @@ ifsbreakup(char *string, int maxargs, struct arglist *arglist) realifs = ifsset() ? ifsval() : defifs; ifsp = &ifsfirst; do { + int afternul; + p = string + ifsp->begoff; + afternul = nulonly; nulonly = ifsp->nulonly; ifs = nulonly ? nullstr : realifs; ifsspc = 0; @@ -1097,7 +1100,7 @@ ifsbreakup(char *string, int maxargs, struct arglist *arglist) } if (isifs) { - if (!nulonly) + if (!(afternul || nulonly)) ifsspc = isdefifs; /* Ignore IFS whitespace at start */ if (q == start && ifssp...