Boxline in curses ( Linux )

Discussion in 'C Programming' started by M.Senthil Kumar, Feb 21, 2004.

  1. hai all,
    I need a help from you. I 'm working in a project using "curses.h" in
    Linux using 'C'. I have some doughts regarding menus and line.
    1. I used to draw box in window using ACS_HLINE,ACS_VLINE. But what
    happened is, the line is not a straight line. Instead of that it look
    continus hypen ( - ) for HLINE and continuous ( | ) for VLINE.
    I'm using curses version : 5.3.20030118 came along with RedHat 9.0 .
    Please tellme how to draw straight line. ( It is working correctly
    in version : 5.2.20020406 come along with RedHat 7.3 )

    thanks,
    Senthil kumar.M
    M.Senthil Kumar, Feb 21, 2004
    #1
    1. Advertising

  2. M.Senthil Kumar

    Jack Klein Guest

    On 20 Feb 2004 22:03:02 -0800, (M.Senthil
    Kumar) wrote in comp.lang.c:

    > hai all,
    > I need a help from you. I 'm working in a project using "curses.h" in
    > Linux using 'C'. I have some doughts regarding menus and line.
    > 1. I used to draw box in window using ACS_HLINE,ACS_VLINE. But what
    > happened is, the line is not a straight line. Instead of that it look
    > continus hypen ( - ) for HLINE and continuous ( | ) for VLINE.
    > I'm using curses version : 5.3.20030118 came along with RedHat 9.0 .
    > Please tellme how to draw straight line. ( It is working correctly
    > in version : 5.2.20020406 come along with RedHat 7.3 )
    >
    > thanks,
    > Senthil kumar.M


    This group discusses the standard C language, which does not include
    third party libraries and extensions like curses.

    For Linux programming, ask in news:comp.os.linux.development.apps.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
    comp.lang.c++ http://www.parashift.com/c -faq-lite/
    alt.comp.lang.learn.c-c++
    http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
    Jack Klein, Feb 21, 2004
    #2
    1. Advertising

  3. M.Senthil Kumar

    nrk Guest

    M.Senthil Kumar wrote:

    > hai all,
    > I need a help from you. I 'm working in a project using "curses.h" in
    > Linux using 'C'. I have some doughts regarding menus and line.
    > 1. I used to draw box in window using ACS_HLINE,ACS_VLINE. But what
    > happened is, the line is not a straight line. Instead of that it look
    > continus hypen ( - ) for HLINE and continuous ( | ) for VLINE.
    > I'm using curses version : 5.3.20030118 came along with RedHat 9.0 .
    > Please tellme how to draw straight line. ( It is working correctly
    > in version : 5.2.20020406 come along with RedHat 7.3 )
    >
    > thanks,
    > Senthil kumar.M


    Your question is not topical in this group as we primarily discuss the C
    language as described in the ANSI/ISO standards. Here are some groups
    where you might find better guidance:

    comp.unix.programmer
    comp.os.linux.development.apps
    comp.os.linux.development

    Please do read their FAQs before posting though. You can find the FAQ for
    comp.lang.c at:
    http://www.eskimo.com/~scs/C-faq/top.html

    -nrk
    --
    Remove devnull for email
    nrk, Feb 21, 2004
    #3
  4. M.Senthil Kumar

    Derk Gwen Guest

    # 1. I used to draw box in window using ACS_HLINE,ACS_VLINE. But what
    # happened is, the line is not a straight line. Instead of that it look
    # continus hypen ( - ) for HLINE and continuous ( | ) for VLINE.

    An inherent aspect of curses is that it is intended to draw only ASCII
    character on a rectangular grid on a terminal or terminal emulator. If
    you want fancier graphics, you're going to need X-Windows or OpenGL.
    X-Windows should be available on most Linux installs.

    --
    Derk Gwen http://derkgwen.250free.com/html/index.html
    Death is the worry of the living. The dead, like myself,
    only worry about decay and necrophiliacs.
    Derk Gwen, Feb 21, 2004
    #4
  5. M.Senthil Kumar

    Malcolm Guest

    OT: Boxline in curses ( Linux )

    "Derk Gwen" <> wrote in message
    > An inherent aspect of curses is that it is intended to draw only ASCII
    > character on a rectangular grid on a terminal or terminal emulator. If
    > you want fancier graphics, you're going to need X-Windows or
    > OpenGL.
    > X-Windows should be available on most Linux installs.
    >

    ASCII characters are basically Latin alphanumerics, a bit of punctuation,
    and a few non-printed controls. However most terminals have an extended
    8-bit character set, the ANSI set, which includes characters designed for
    simple boxes and menus and the like. I would be surprised if curses doesn't
    support these.
    Malcolm, Feb 21, 2004
    #5
  6. Re: OT: Boxline in curses ( Linux )

    Malcolm wrote:
    > "Derk Gwen" <> wrote in message
    >
    >>An inherent aspect of curses is that it is intended to draw only ASCII
    >>character on a rectangular grid on a terminal or terminal emulator. If
    >>you want fancier graphics, you're going to need X-Windows or
    >>OpenGL.
    >>X-Windows should be available on most Linux installs.
    >>

    >
    > ASCII characters are basically Latin alphanumerics, a bit of punctuation,
    > and a few non-printed controls. However most terminals have an extended
    > 8-bit character set, the ANSI set, which includes characters designed for
    > simple boxes and menus and the like. I would be surprised if curses doesn't
    > support these.
    >
    >


    ANSI characters can be drawn, but once you set the high bit you lose
    portability to systems that don't support ANSI. The DOS terminals come
    to mind, as they still have graphical characters in the `extended ASCII'
    codepoints. Which is a fairly dumb idea in this day and age, but, then,
    so's DOS.

    --
    My address is yvoregnevna gjragl-guerr gjb-gubhfnaq guerr ng lnubb qbg pbz
    Note: Rot13 and convert spelled-out numbers to numerical equivalents.
    August Derleth, Feb 21, 2004
    #6
  7. M.Senthil Kumar

    Derk Gwen Guest

    Re: OT: Boxline in curses ( Linux )

    "Malcolm" <> wrote:
    #
    # "Derk Gwen" <> wrote in message
    # > An inherent aspect of curses is that it is intended to draw only ASCII
    # > character on a rectangular grid on a terminal or terminal emulator. If
    # > you want fancier graphics, you're going to need X-Windows or
    # > OpenGL.
    # > X-Windows should be available on most Linux installs.
    # >
    # ASCII characters are basically Latin alphanumerics, a bit of punctuation,
    # and a few non-printed controls. However most terminals have an extended
    # 8-bit character set, the ANSI set, which includes characters designed for
    # simple boxes and menus and the like. I would be surprised if curses doesn't
    # support these.

    curses was originally written when signedness of C char was subject to
    speculation; only codes 0 through 127 could be used portably; and those
    were the only available codes on the terminals then targetted. Programs
    like vi did (do?) use the extra bit for other purposes. I don't know how
    curses has evolved: I wouldn't trust it with codes 128 through 255 without
    clear documentation that it could handle those.

    Also codes 128 through 255 have wildly different interpretations on
    different machines, a chaos slowly being colonised with Unicode.

    --
    Derk Gwen http://derkgwen.250free.com/html/index.html
    OOOOOOOOOO! NAVY SEALS!
    Derk Gwen, Feb 22, 2004
    #7
  8. M.Senthil Kumar

    Richard Bos Guest

    Re: OT: Boxline in curses ( Linux )

    Derk Gwen <> wrote:

    > "Malcolm" <> wrote:
    > #
    > # "Derk Gwen" <> wrote in message
    > # > An inherent aspect of curses is that it is intended to draw only ASCII
    > # > character on a rectangular grid on a terminal or terminal emulator. If
    > # > you want fancier graphics, you're going to need X-Windows or
    > # > OpenGL.
    > # > X-Windows should be available on most Linux installs.
    > # >
    > # ASCII characters are basically Latin alphanumerics, a bit of punctuation,
    > # and a few non-printed controls. However most terminals have an extended
    > # 8-bit character set, the ANSI set, which includes characters designed for
    > # simple boxes and menus and the like. I would be surprised if curses doesn't
    > # support these.
    >
    > curses was originally written when signedness of C char was subject to
    > speculation; only codes 0 through 127 could be used portably;


    This is still true. Plain char may be either signed or unsigned. OTOH,
    on the systems where curses is available, it's likely to be signed.

    Richard
    Richard Bos, Feb 23, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Skeleton Man

    curses and color

    Skeleton Man, May 25, 2004, in forum: Perl
    Replies:
    0
    Views:
    608
    Skeleton Man
    May 25, 2004
  2. Guido
    Replies:
    6
    Views:
    876
    Guido
    May 5, 2004
  3. Konrad Koller
    Replies:
    3
    Views:
    757
    Konrad Koller
    Jan 9, 2005
  4. Jean-Paul Calderone
    Replies:
    2
    Views:
    422
    Joel Hedlund
    Feb 9, 2006
  5. Replies:
    1
    Views:
    293
Loading...

Share This Page