[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
tutorial
From: |
Pierre Ancelot |
Subject: |
tutorial |
Date: |
Wed, 19 Jan 2005 23:22:38 +0100 |
User-agent: |
KMail/1.7.1 |
Hi, i am following a little tutorial because of a software i wish to package
for debian which has a few errors (see second post...) and in this tutorial,
there is this :
After having done all they told :
* Usage: (1) $ flex sample1.lex
* (2) $ gcc lex.yy.c -lfl
* (3) $ ./a.out
I type "username" and i get (null)
address@hidden:~/flex$ ./a.out
username
(null)
address@hidden:~/flex$
Here is the code, anyone willing to tell what's wrong in this ?
%{
/* need this for the call to getlogin() below */
#include <unistd.h>
%}
%%
username printf("%s\n", getlogin());
%%
main()
{
yylex();
}
pgpGBy4__4MyK.pgp
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- tutorial,
Pierre Ancelot <=