search for: tempnam

Displaying 20 results from an estimated 127 matches for "tempnam".

Did you mean: tempname
2019 May 31
2
use of buffers in sprintf and snprintf
No, that will make it even worse since you'll be declaring a lot more memory that you actually have. The real problem is that you're ignoring the truncation, so you probably want to use something like if (snprintf(tempname, sizeof(tempname), "%s.%d", of1name, j) >= sizeof(tempname)) Rf_error("file name is too long"); BTW: most OSes systems have a path limits that are no lower than 256 so you should allow at least as much. Cheers, Simon > On May 29, 2019, at 11:49 AM, jing hua zhao &lt...
2018 May 28
5
readLines function with R >= 3.5.0
On 28.05.2018 11:07, G?bor Cs?rdi wrote: > stdin() is not the same as file("stdin"), see the note in ?stdin. In particular stdin() works in an interactive session but not when R -f / Rscript is used, since it does not wait for the user to input anything: $ R -f readLines.R R version 3.5.0 (2018-04-23) -- "Joy in Playing" Copyright (C) 2018 The R Foundation for Statistical
2019 May 31
0
use of buffers in sprintf and snprintf
...k <simon.urbanek at r-project.org> wrote: > > No, that will make it even worse since you'll be declaring a lot more memory that you actually have. > > The real problem is that you're ignoring the truncation, so you probably want to use something like > > if (snprintf(tempname, sizeof(tempname), "%s.%d", of1name, j) >= sizeof(tempname)) Rf_error("file name is too long"); > > BTW: most OSes systems have a path limits that are no lower than 256 so you should allow at least as much. On MS Windows, there's actually a limit of 255 characters...
2007 May 31
0
loading several "samples" of data from hard-drive, run "lm", "rlm", etc, save results in a list
...uot;) For example purposes, I have written code that creates similar data files using the "airquality" dataset. (see below) #this creates my sample data files library(datasets) getwd() #fyi for(m in 5:9) { tempdata=subset(airquality,Month==m) for (col in 1:4){ tempdata2 = tempdata[col] tempname=paste(names(airquality)[col],m,sep=".") assign(tempname,tempdata2,pos=.GlobalEnv ) save( list=tempname , file = paste(tempname,".r",sep="" ) ) rm(tempdata2,list=tempname,tempname) } rm(tempdata,col,m) } (While it might be possible to combine all the data into one...
2019 May 30
2
use of buffers in sprintf and snprintf
...and 127 [-Wformat-truncation=] hap_c.c:392:46: warning: ?%d? directive output may be truncated writing between 1 and 10 bytes into a region of size between 0 and 127 [-Wformat-truncation=] Essentially, I have #define MAX_FILENAME_LEN 128 char of1name[MAX_FILENAME_LEN],of2name[MAX_FILENAME_LEN], tempname[MAX_FILENAME_LEN]; ... snprintf(tempname,sizeof(tempname),"%s.%d", of1name, j); It looks I could get around with #define MAX_FILENAME_LEN 128 #define MAX_FILENAME_LEN2 256 char of1name[MAX_FILENAME_LEN],of2name[MAX_FILENAME_LEN], tempname[MAX_FILENAME_LEN2]; ... snprintf(tempnam...
2012 Oct 16
0
Free space cache writeback issue
...t: -- DEV=/dev/sdv1 MP=/mnt/scratch umount $MP mkfs.btrfs -M $DEV mount -o inode_cache $DEV $MP cat /dev/urandom | head -c 654321 > $MP/1 mkdir $MP/2 mv $MP/1 $MP/2/1 btrfs subvol snap $MP $MP/@1 rm $MP/2/1 umount $MP mount -o inode_cache $DEV $MP cat /dev/urandom | head -c 654321 > $MP/tempname-1 ls -li $MP/@1/2/1 $MP/tempname-1 -- Actual result: > 257 -rw-r--r-- 1 root root 654321 Oct 16 15:04 /mnt/scratch/@1/2/1 > 259 -rw-r--r-- 1 root root 654321 Oct 16 15:04 /mnt/scratch/tempname-1 Expected result: Both files should have inode 257. If I make any of the following changes, I...
2001 Oct 09
3
Unlisting while preserving object types?
Hi A toy example is probably the least ambiguous way of explaining what I'm trying to do. > library(ts) > zz<-list(a=rnorm(100),b=rt(100,3)) > zz.spec<-lapply(zz,spectrum,plot=F) > summary(zz.spec) Length Class Mode a 15 spec list b 15 spec list I'm looking for an elegant way to fetch components of the sub-lists a and b of zz.spec; e.g. to make a matrix
2005 Jan 29
0
Processed: webmin bugs
...The module was working right until the last update (apt). Bug reassigned from package `webmin' to `webmin-postgresql'. > tag 273377 woody wontfix Bug#273377: webmin: Static SSL cert/key pair Tags were: woody security Tags added: woody, wontfix > tag 285762 woody wontfix Bug#285762: tempname() in web-lib.pl does not create a temp file Tags were: patch woody Bug#289464: webmin-core: Scheduled Cron Jobs doesn't show nothing Tags added: woody, wontfix > tag 289464 woody wontfix Bug#289464: webmin-core: Scheduled Cron Jobs doesn't show nothing Tags were: wontfix woody patch Bu...
2004 Aug 06
2
Error compiling ices-0.3
I'm trying to compile ices-0.3 on a RedHat 9, kernel 2.4.23 box and I receive the following error: : the use of `tmpnam_r' is dangerous, better use `mkstemp' /usr/lib/python2.2/config/libpython2.2.a(posixmodule.o)(.text+0x385e): In function `posix_tempnam': : the use of `tempnam' is dangerous, better use `mkstemp' playlist/libplaylist.a(pm_perl.o)(.text+0x515): In function `pl_perl_eval': /usr/src/ices-0.3/src/playlist/pm_perl.c:253: undefined reference to `PL_thr_key' playlist/libplaylist.a(pm_perl.o)(.text+0x65d):/usr/src/ices...
2007 Dec 06
3
using "eval(parse(text)) " , gsub(pattern, replacement, x) , to process "code" within a loop/custom function
...#function that processes code submitted as "text.i" for each date in "dates.i" fn.dateloop <- function(text.i, dates.i ) { for(d in 1: length(dates.i) ) { tempdate <- dates.i[d] text.i2 <- recurse(text.i, pat.i='#', rep.i=tempdate) temp0=eval(parse(t=text.i2)) tempname <- paste(names(temp0)[1], tempdate, sep='.') save(list='temp0', file = tempname) } # next d } # end fn.dateloop ####################### ##################### #a sample custom function that I want to run on each sample of data fn.mn <- function(x, y) { res = x - y names(res)...
2004 Aug 06
2
libpthread and icecast2
...rypt(3) not present in the system! /usr/lib/libc.so.4: warning: tmpnam() possibly used unsafely; consider using mkstemp() /usr/lib/libc.so.4: warning: this program uses f_prealloc(), which is stupid. /usr/lib/libc.so.4: WARNING! des_cipher(3) not present in the system! /usr/lib/libc.so.4: warning: tempnam() possibly used unsafely; consider using mkstemp() Mike -- <mystica@darktech.org> --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project homepage: http://www.icecast.org/ To unsubscribe from this list, send a message to 'icecast-request@xiph.org' containing...
2001 Sep 25
2
read.table() suggestions
Hi, I understand work is being done to improve read.table(), especially by Prof. Brian D. Ripley. I offer below a version that I wrote, in the hope some aspects of it may prove useful or at least inspire discussion. Be aware that my version differs in a couple fundamental ways that reflect my aversion to dataframes and factors. So it returns a list of vectors which are all character,
2010 Apr 25
2
[git pull] small fixes, sh4, getruage() README's
hello hpa, current patch queue for review, please pull: git pull git://git.debian.org/users/maks/klibc.git maks Aurelien Jarno (1): [klibc] sh4: syscalls fixes Benjamin Cama (1): [klibc] fstype: btrfs size endianness fix Thorsten Glaser (1): [klibc] add getrusage() maximilian attems (3): [klibc] resume: silence warning on resume try [klibc] bootp_packet.h minor
2020 Mar 28
0
[klibc:update-dash] dash: builtin: Default to mktemp, not tempfile
...orDate: Fri, 7 Sep 2018 10:34:11 +0200 Committer: Ben Hutchings <ben at decadent.org.uk> CommitDate: Sat, 28 Mar 2020 21:42:55 +0000 [klibc] dash: builtin: Default to mktemp, not tempfile [ dash commit ad072645af04c31300c84d2840fcf1a8d48588ec ] Don't use tempfile, as it currently runs tempnam(), which is insecure and fails under pseudo(1). Signed-off-by: Andrej Shadura <andrew.shadura at collabora.co.uk> Signed-off-by: Herbert Xu <herbert at gondor.apana.org.au> Signed-off-by: Ben Hutchings <ben at decadent.org.uk> --- usr/dash/mkbuiltins | 2 +- 1 file changed, 1 i...
2004 Aug 06
0
libpthread and icecast2
...in the system! > /usr/lib/libc.so.4: warning: tmpnam() possibly used unsafely; consider using mkstemp() > /usr/lib/libc.so.4: warning: this program uses f_prealloc(), which is stupid. > /usr/lib/libc.so.4: WARNING! des_cipher(3) not present in the system! > /usr/lib/libc.so.4: warning: tempnam() possibly used unsafely; consider using mkstemp() I considering this a bug in FreeBSD. To my knowledge icecast uses none of these functions directly. Nor really anything resembling them. I'm not sure how to get rid of them :) If you find a way, I will be intereted to know how, since these...
2004 Aug 06
0
Error compiling ices-0.3
...wrote: > I'm trying to compile ices-0.3 on a RedHat 9, kernel 2.4.23 box and I > receive the following error: > > : the use of `tmpnam_r' is dangerous, better use `mkstemp' > /usr/lib/python2.2/config/libpython2.2.a(posixmodule.o)(.text+0x385e): > In function `posix_tempnam': > : the use of `tempnam' is dangerous, better use `mkstemp' > playlist/libplaylist.a(pm_perl.o)(.text+0x515): In function > `pl_perl_eval': > /usr/src/ices-0.3/src/playlist/pm_perl.c:253: undefined reference to > `PL_thr_key' > playlist/libplaylist.a(pm_perl...
2004 Aug 06
0
Ices0.3 and Perl 5.8.3
...present in the system! /usr/lib/libc_r.so: warning: tmpnam() possibly used unsafely; consider using mkstemp() /usr/lib/libc_r.so: warning: this program uses f_prealloc(), which is not recommended. /usr/lib/libc_r.so: WARNING! des_cipher(3) not present in the system! /usr/lib/libc_r.so: warning: tempnam() possibly used unsafely; consider using mkstemp() playlist/libplaylist.a(pm_perl.o): In function `pl_perl_eval': /usr/home/herbal/UNIX/ices-0.3/src/playlist/pm_perl.c(.text+0x3d3): undefined reference to `Perl_call_pv' /usr/home/herbal/UNIX/ices-0.3/src/playlist/pm_perl.c(.text+0x4a5):...
2010 Oct 05
4
upgrade python to python2.6.4 using yum
...libpython2.6.a -lpthread -ldl -lutil -lm libpython2.6.a(posixmodule.o): In function `posix_tmpnam': /tmp/Python-2.6.4/./Modules/posixmodule.c:7180: warning: the use of `tmpnam_r' is dangerous, better use `mkstemp' libpython2.6.a(posixmodule.o): In function `posix_tempnam': /tmp/Python-2.6.4/./Modules/posixmodule.c:7135: warning: the use of `tempnam' is dangerous, better use `mkstemp' running build running build_ext Failed to find the necessary bits to build these modules: bsddb185 sunaudiodev To find the necessary bits, look in setup.py in de...
2004 Aug 06
2
libpthread and icecast2
Heres a question for anyone awake at this hour, does icecast2 require libpthread? I'm trying to build it on a freebsd 4.3 box, and it wants to link against libpthread. If this is not required on the freebsd platform, then is it safe to just take out of the makefile? Thanks Mike -- <mystica@darktech.org> --- >8 ---- List archives: http://www.xiph.org/archives/ icecast project
2014 Oct 05
1
FreeBSD 10-RELEASE-amd64(on arch x86_64)
...gpl.lo CC basename-lgpl.lo CC stripslash.lo CC fd-hook.lo CC freading.lo CC getugroups.lo CC localcharset.lo CC glthread/lock.lo CC malloca.lo CC mgetgroups.lo CC nonblocking.lo CC passfd.lo CC physmem.lo CC pipe2.lo CC sig-handler.lo CC sockets.lo CC stat-time.lo CC strnlen1.lo CC sys_socket.lo CC tempname.lo CC glthread/threadlib.lo CC unistd.lo CC wctype-h.lo CC xsize.lo CC asnprintf.lo CC canonicalize-lgpl.lo CC fclose.lo CC fdatasync.lo CC fflush.lo CC fseek.lo CC fseeko.lo CC getgroups.lo CC ioctl.lo CC mktime.lo CC openpty.lo CC printf-args.lo CC printf-parse.lo CC pthread_sigmask.lo CC random...