Bug#582137: dc is ignoring the .dcrc file.

2012-01-05 Thread John Gruenenfelder
Package: dc
Version: 1.06.95-2+b1
Followup-For: Bug #582137


This bug was originally filed in March 2011, almost ten months ago.  The
report also includes a very small patch that appears to solve the issue.  Is
there any estimate on when this fix might be included in the Debian version of
dc?

dc is great little tool, but I don't always remember to execute 4 k every
time I run it and then wonder why the division I just did returned a whole
number result.



-- System Information:
Debian Release: wheezy/sid
  APT prefers unstable
  APT policy: (500, 'unstable'), (1, 'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 3.1.6 (SMP w/8 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dc depends on:
ii  dpkg  1.16.1.2
ii  install-info  4.13a.dfsg.1-8
ii  libc6 2.13-24

dc recommends no packages.

dc suggests no packages.

-- no debconf information


-- 
--John GruenenfelderSystems Manager, MKS Imaging Technology, LLC.
Try Weasel Reader for PalmOS  --  http://weaselreader.org
This is the most fun I've had without being drenched in the blood
of my enemies!
--Sam of Sam  Max



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#582137: dc is ignoring the .dcrc file.

2011-10-29 Thread Stephen Gregory
I would really like to see the .dcrc option back.


as a workaround you can use the command:

$ dc -f .dcrc -

or

$ dc -e commands -

As you don't always want the - option it is hard to alias these
commands so I declare a funtion instead. In .bashrc I have the following:

dc () 
{ 
if [ -n $1 ]; then
/usr/bin/dc -f .dcrc $*;
else
/usr/bin/dc -f .dcrc -;
fi
}

I think it does what I expect.



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#582137: dc is ignoring the .dcrc file.

2011-03-19 Thread Jan Braun
Package: dc
Version: 1.06.95-2
Followup-For: Bug #582137

This is a regression. Terran Melconian ter...@consistent.org provided
patches in bug #167274 to implement .dcrc and the -E command line
option, wich were applied in version 1.06-9 .

The 1.06.94-1 debian changelog entry notes:
* Upstream has removed the '-E' option.

My guess is that the .dcrc handling got lost there as well.

Please reinstate it, unless upstream disagrees with that as well.
In that case, please remove the (debian-specific) manpage patch
mentioning .dcrc .

Attached ist Terran's .dcrc patch again, slightly modified for
1. moving reading the rcfile to before argument processing, and
2. changed line numbers/context

Rationale for #1 is that I think
$ dc
$ dc -
$ dc -f -
should all behave the same.

regards,
Jan

-- System Information:
Debian Release: wheezy/sid
  APT prefers testing
  APT policy: (990, 'testing'), (99, 'unstable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.32-5-686 (SMP w/1 CPU core)
Locale: LANG=C, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dc depends on:
ii  dpkg  1.15.8.10  Debian package management system
ii  install-info  4.13a.dfsg.1-6 Manage installed documentation in 
ii  libc6 2.11.2-11  Embedded GNU C Library: Shared lib

dc recommends no packages.

dc suggests no packages.

-- no debconf information

-- 
()  ascii ribbon campaign - against html e-mail
/\  www.asciiribbon.org   - against proprietary attachments
diff -ur bc-1.06.95.old//dc/dc.c bc-1.06.95/dc/dc.c
--- bc-1.06.95.old//dc/dc.c	2009-10-05 01:00:07.0 +0200
+++ bc-1.06.95/dc/dc.c	2011-03-19 23:12:32.0 +0100
@@ -45,6 +45,8 @@
 # include sys/stat.h
 #endif
 #include getopt.h
+#include pwd.h
+#include unistd.h
 #include dc.h
 #include dc-proto.h
 
@@ -245,6 +247,29 @@
 	return r;
 }
 
+static void
+try_rcfile(void)
+{
+char *homedir;
+struct passwd *pw;
+char *rcfile;
+FILE *input;
+
+homedir=getenv(HOME);
+if (!homedir)
+{
+	pw=getpwuid(getuid());
+	homedir=pw-pw_dir;
+}
+rcfile=malloc(strlen(homedir)+8);
+sprintf(rcfile, %s/.dcrc, homedir);
+if (!(input=fopen(rcfile, r)))
+	return;
+if (dc_evalfile(input))
+	exit(EXIT_FAILURE);
+fclose(input);
+}
+
 
 int
 main DC_DECLARG((argc, argv))
@@ -271,6 +296,8 @@
 	dc_register_init();
 	dc_array_init();
 
+	try_rcfile();
+
 	while ((c = getopt_long(argc, argv, hVe:f:, long_opts, (int *)0)) != EOF) {
 		switch (c) {
 		case 'e':


signature.asc
Description: Digital signature


Bug#582137: dc is ignoring the .dcrc file.

2010-05-18 Thread Patrick Draper

Subject: dc is ignoring the .dcrc file.
Package: dc
Version: 1.06.95-2
Severity: normal

dc should be reading the file ~/.dcrc and executing the commands there upon
startup. It is not doing this.



-- System Information:
Debian Release: squeeze/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.31.1 (SMP w/2 CPU cores; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dc depends on:
ii  dpkg  1.15.7.1   Debian package management system
ii  install-info  4.13a.dfsg.1-5 Manage installed documentation in 
ii  libc6 2.10.2-6   Embedded GNU C Library: Shared lib

dc recommends no packages.

dc suggests no packages.

-- no debconf information



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org