fortune strfile [autarkic or not]

2004-05-12 Thread svartsjel
Hi.

Recently, I asked if it was feasible or not to run Cygwin’s fortune
separated on any Win32 system. Christopher Faylor was not amused about
my question due to a misunderstanding, sorry for that.

First, it’s not my aim to cherry pick (as to quote Brian Dessent)
integral parts of the Cygwin project for any reasons whatsoever. I did
hope to hunt down a minor, but rather vexing problem of mine (maybe not
the most effective way, but I’m not a programmer after all).

Quite a while ago, I decided to set up new fortune quotes of my own. In
order to enable fortune to process them, I used strfile for generating
the needed DATs. Usually, this is a trivial task:

strfile [-io] quotes [quotes.dat]

(I once noticed that both -i and -o are worthy for enabling fortune’s -s
and -l option, respectively.) One should be able now to invoke fortune
like this:

fortune [-aeslo] quotes

But this time fortune didn’t return a quote, instead I read — nothing.
Calling fortune multiple times, once or twice one quote was printed out
on screen, this was the first element of the file quotes. The
remaining two hundred quotes or so didn’t show up, often empty lines
were given back. I tried it again and again, varying strfile’s arguments
strfile -i file, strfile -r etc, I repeated the procedure using
quote collections like linuxcookie, startrek, zippy of the fortune
directory and so on, but no workable DATs were written. Strangely
enough, using the *original* DATs coming with Cygwin’s fortune release,
everything works fine.

Now at least I know, that stuffing cygwin1.dll in a directory, bundled
with fortune and some of the *original* DATs and quote files, indeed,
fortune will work on any Windows system with a DOS prompt. However,
strfile will still behave oddly, writing DATs that seem to be faulty
somehow. I found a posting of Lee D. Rothstein, also dealing with
(different) strfile headaches:
http://cygwin.com/ml/cygwin/2003-06/msg00148.html

I didn’t check strfile out since then. What's the secret about strfile
and those DAT files?

Greetings,

Mikka


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Autarkic fortune/strfile usage possible?

2004-05-05 Thread svartsjel
Hi,

I wonder if outsourcing of both fortune and strfile executables is
possible, so these programs might be run independently on a Win32 system
lacking the regular Cygwin environment.
Is it feasible somehow to supply just the indispensable Cygwin library
(or libraries) to Windows, so fortune and strfile (needed for generating
fortune's dat files) can be run via cmd.exe?
Fortune is a unique, lovely little program, I'd like to use on other
machines as well - without Cygwin.
Any opinions?

Greetings,

Mikka


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



compiling woes (httping 0.0.3 make error)

2003-12-11 Thread svartsjel
Hi Brian!

  $ make install
  gcc -ansi -O2   -c -o error.o error.c
  error.c:1:21: ncurses.h: No such file or directory
  make: *** [error.o] Error 1

 Well, does /usr/include/ncurses.h exist?

No, I can't find ncurses.h anywhere, although ncurses had been installed.
Entering the command:
$ find / -name ncurses*

The following is output:
/etc/setup/ncurses.lst.gz
/usr/share/doc/Cygwin/ncurses-5.3.README
/usr/share/doc/ncurses-5.3
/usr/share/doc/ncurses-5.3/ncurses-intro.html

 If not, using the setup package search facility available here
 http://cygwin.com/packages/ shows ncurses.h to be part of
 ncurses/ncurses-5.2-8.  Is that installed?
Hum, shouldn't it be part of the successor version as well?

 If you want help here, you will have to post more output.  We need to
 see why the make of parser.c returned 255.
Funny. Doubting my first attempt, I extracted the archive once again, this
time right into /tmp
(i.e. C:\cygwin\tmp).
Now, the output is different:

$ make
make -C src build
make[1]: Entering directory `/tmp/boxes-1.0.1/src'
make CFLAGS_ADDTL=-O boxes
make[2]: Entering directory `/tmp/boxes-1.0.1/src'
gcc -ansi -I. -Iregexp -Wall -W -O   -c -o parser.o parser.c
parser.y: In function `design_needed':
parser.y:389: warning: implicit declaration of function `strcasecmp'
parser.y: In function `yyparse':
parser.y:537: warning: implicit declaration of function `strdup'
parser.y:1034: warning: implicit declaration of function `strncasecmp'
gcc -ansi -I. -Iregexp -Wall -W -O   -c -o lex.yy.o lex.yy.c
lexer.l: In function `yylex':
lexer.l:172: warning: implicit declaration of function `strdup'
lexer.l: At top level:
lexer.l:1299: warning: `yy_flex_realloc' defined but not used
gcc -ansi -I. -Iregexp -Wall -W -O   -c -o boxes.o boxes.c
boxes.c: In function `is_dir':
boxes.c:328: error: `S_IFMT' undeclared (first use in this function)
boxes.c:328: error: (Each undeclared identifier is reported only once
boxes.c:328: error: for each function it appears in.)
boxes.c:328: error: `S_IFDIR' undeclared (first use in this function)
boxes.c: In function `get_config_file':
boxes.c:381: warning: implicit declaration of function `strdup'
boxes.c: In function `process_commandline':
boxes.c:653: warning: implicit declaration of function `strncasecmp'
boxes.c: In function `style_sort':
boxes.c:901: warning: implicit declaration of function `strcasecmp'
make[2]: *** [boxes.o] Error 1
make[2]: Leaving directory `/tmp/boxes-1.0.1/src'
make[1]: *** [build] Error 2
make[1]: Leaving directory `/tmp/boxes-1.0.1/src'
make: *** [build] Error 2

As you might guess already, I haven't got the slightest clue what's going
on...

Appreciating any help,
Regards,

Michael


-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



was: httping 0.0.3 make error

2003-12-10 Thread svartsjel
Dirk Sondermann wrote:
 try  make CC='gcc -ansi'  or replace the first line of the makefile by
 CC=gcc -ansi.

Hallo Dirk,

Thanks for the reply.
Taking your suggestion into account, I'll get (after updating the Makefile):

$ make install
gcc -ansi -O2   -c -o error.o error.c
error.c:1:21: ncurses.h: No such file or directory
make: *** [error.o] Error 1

It doesn't seem to be that different...

BTW, I also tried to compile boxes
(http://boxes.thomasjensen.com), but many errors occured there, too.
(Something like:
make[2]: *** [parser.c] Error 255
make[1]: *** [build] Error 2-- twice!
...)

I'm generally not very experienced in compiling, but:
Could it be possible that httping (or boxes) just won't
compile for Cygwin?

I'd be quite happy to discover a way, though...

Greetings,

Michael


-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



httping 0.0.3 make error

2003-12-08 Thread svartsjel
Hi,

I didn't work with make so far, and would like to install httping 0.0.3 by
Folkert van Heusden (http://osx.freshmeat.net/projects/httping) for the
current Cygwin release.
Did anyone manage to compile this program?
I read the FAQ items concerning make and verified that MAKE_MODE is set to
unix.
Trying to do a 'make', I receive the following error:

gcc -O2   -c -o http.o http.c
make: *** [http.o] Error 255

(Probably a trivial question, but) What went wrong?

Greetings,

Michael


-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



was: bash loop troubles

2003-12-07 Thread svartsjel
Igor Pechtchanski wrote:

 If I guessed correctly at what you're trying to accomplish (create aliases
 *in your current shell* to duplicate cmd.exe's syntax for switching
 drives; not at all obvious from the above description), and how you're
 doing it (from the inside of a bash *script*), you seem to have forgotten
 that scripts run in a subshell, and aliases created within that subshell
 will not get propagated back to the parent shell.

Perfect, that's it! Indeed, I didn't think of *that*.
Thus, placing the loop inside /etc/alias which is sourced from /etc/profile
with
the line:

test -e /etc/alias  . /etc/alias

it'll create my intended drive letter assignments a:, b:, c: etc.
And Larry's right, this isn't Cygwin specific...

Thank you very much, Igor.
Greetings,

Michael


-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



bash loop troubles

2003-12-06 Thread svartsjel
Hi,

I tried to run the following bash script:

for drive in a b c d e f g h i j k l m n o p q r s t u v w x y z
do
   alias ${drive}:=cd /cygdrive/${drive}
done

I guess, the syntax for the loop is okay, if I replace the alias line with a
simple echo command:

echo $drive

I get

a
b
...

and so on.

Doing the following (both at the prompt and within a bash script):

drive='c'; alias $drive:=cd /cygdrive/$drive

will lead to the alias as expected. Merely inside the loop it just doesn't
seem to work.
Any hints?

Thanks in advance,

Michael


-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Neu: Preissenkung für MMS und FreeMMS! http://www.gmx.net



--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Problem reports:   http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



ls question

2003-03-31 Thread svartsjel
Hi,

I'm working with a localized (german) Windows (XP) version and
Cygwin 1.3.20-1 (in conjunction with rxvt). Doing the following:

cd /cygdrive/c
cd Profile
cd Administrator
ll | grep Start
dr-xr-xr-x+   3 Administ Kein0  1. Mar 12:00 Startmenü

'Startmenü' is now properly displayed, though performing 'ls -l'
results in:

[...]
dr-xr-xr-x+ 2 Administ Kein 0   1. Mar 12:00 SendTo
dr-xr-xr-x+ 3 Administ Kein 0   1. Mar 12:00 Startmen?
drwxrwxrwx+ 6 Administ Kein 0   1. Mar 12:00 UserData
[...]

Both 'cd Startmenü' and 'cd Startmen?' will change in the Startmenü
subdirectory.
Also, the directories 'Müller' and 'Möller' will look exactly the
same through ls:

drwx---r-x+ 2 Administ Kein 0  1. Mar 12:00 M?ller
drwx---r-x+ 2 Administ Kein 0  1. Mar 12:00 M?ller

Is there any way of changing this ls behaviour, i.e. enabling *full*
support for umlauts (8-Bit ASCII) somehow? May I influence this with
an entry within the .inputrc config file?
I've set the following there:

set convert-meta off
set input-meta on
set meta-flag on
set output-meta on

Thanks in advance,
greetings,

Svartsjel

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
Bitte lächeln! Fotogalerie online mit GMX ohne eigene Homepage!


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/



Re: assimilation cmd towards cygwin/bash

2003-02-07 Thread svartsjel
Nigel Steward wrote:
 Time to get used to left-button copy,
 middle-button paste. Once you get a
 grip on the that, you've been officially
 assimilated! :-)

 Put this line in your cygwin.bat...

 rxvt -sl 1000 -rv -geometry 120x30 +sr -e bash -i

Hi Nigel!

Well, this has nothing to do with the actual question I posted,
neither rxvt nor bash are the point:
I'm seeking a possibility to enhance the cmd.exe in order to allow
closing/exiting it via simple Ctrl+D - not more, and not less.
Any other ideas perhaps?

Regards,

Svartsjel

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Re: assimilation cmd towards cygwin/bash

2003-02-07 Thread svartsjel
Shankar Unni wrote:
 As long as you don't mind hitting CR after the ^D, this seems to
 work:

c:\ doskey ^D=exit

 Now, if you hit ^Dcr  (the cr is unfortunately required), CMD.EXE
 will exit.
Yes, this seems to work... and there should still be a trick for adding the
missing cr key code to the line, maybe a bit like:
doskey ^D=exit nul | x
[ x representing the cr key code ]
I guess a different, i.e. enhanced doskey replacement could allow this?
Or better: an additional program which emulates key codes?
Unfortunately I don't know any...
The only way in the past of getting cr to work properly for keyboard
macros was ANSI.SYS. Any other suggestions?

Greetings,

Svartsjel

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




assimilation cmd towards cygwin/bash

2003-02-04 Thread svartsjel
Hi,

I know, this won't be a real Cygwin question, well, anyway...
As I got quite used to Cygwin and Linux I began assimilating the cmd
console's look and feel towards Unix style (name completion, 'ls,la,ll'
instead of 'dir..' etc.).
Unfortunately, there's still one big, annoying MS-feature: one must
enter 'exit' in order to terminate the cmd console.
Well, I mapped a doskey macro to it, so 'Q-Enter' will also do, but I'm
accustomed to the shortcut 'Ctrl-D' (without 'Enter') and would like to
use this in conjunction with the cmd console as well.
Does anyone know whether this could be done in Windows XP?
I surmise, I once did a tweak ten years ago dealing with Windows 3.1 -
one could 'abuse' a system variable named WINPRMT to map the 'Esc' key
value ('Ctrl-P-Esc') to the 'exit nul' command, so hitting Escape closed
the Dos console, it required ANSI.SYS to be loaded.
Any new suggestions for Windows XP?

Best wishes,

Svartsjel

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




How to automatically process file/dir names?

2003-01-18 Thread svartsjel
Hi,

Quite a few problems arise from within self-written scripts when dealing
with (Windows') file and directory names containing spaces.
I therefore thought about a script which takes a directory as argument,
recursively processing both file and (sub)dir names in it (starting with the
argument's name itself), replacing each space with an underscore (additionally
also rendering everything lowercase), and cutting off trailing space(s) from
names, respectively.
For instance, the processed files fortunes-o_, index_2.htm_ and index2_.html
should be detected and fixed like this: fortunes-o, index_2.htm,
index2.html.
How would you accomplish that?
Many thanks in advance, and best wishes!

svartsjel

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




aspell within cygwin?

2003-01-18 Thread svartsjel
Hi,

how can I use aspell in conjunction with Cygwin (vim)?

greetings,

svartsjel

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




was: How can I abbreviate /cygdrive/DRIVELETTER ?

2003-01-17 Thread svartsjel
Thank you, Max, Igor and Andrew for your suggestions!
Yes, I knew the cygdrive-prefix possibility already, nevertheless: thanks,
Corinna!
I assume Max' softlink solution will please my laziness best.
It's somewhat strange I didn't come up with this little trick myself...

Best wishes,


Svartsjel

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




How can I abbreviate /cygdrive/DRIVELETTER ?

2003-01-16 Thread svartsjel
Hi everyone!

As I often access different drives from within the bash I'm wondering if
there's a quicker way to get on, say, drive l (a network drive) than entering
'cd /cygdrive/l'?
I alias'd '/cygdrive/l' to 'l' which works fine for cd, but not for commands
like chmod, cp, mv etc. Among others I'd like to use the automatic command
line completion which doesn't work for /cygdrive/... either.
Any suggestions?

Best wishes,

Svartsjel

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/




Question concerning fortune

2003-01-16 Thread svartsjel
I'm fond of fortune and therefore would like to know whether a new version
of this neat little prog is to be released with Cygwin. Maybe with new
libraries of quotes?
Another point is this behaviour I noticed a while ago. Let's suppose, we
created a library looking like this:

BOF
One quote
%
Another one
%
And finally, a third one
%
EOF

and now we compile the corresponding .dat file, fortune (or rather strfile?)
assumes four different quotes because of the last '%' that precedes the
EOF.
It's not exactly a bug, though...

Best wishes,

Svartsjel

-- 
+++ GMX - Mail, Messaging  more  http://www.gmx.net +++
NEU: Mit GMX ins Internet. Rund um die Uhr für 1 ct/ Min. surfen!


--
Unsubscribe info:  http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ:   http://cygwin.com/faq/