Loading ...
Sorry, an error occurred while loading the content.

Re: [blug-prog]

Expand Messages
  • Pallav Nawani
    ... All the RTOS s have only one mode of operation - kernel mode . Eg. VxWorks.Also, I think you could say that DOS only provides Kernel Mode , since User
    Message 1 of 25 , Nov 1, 2001
    • 0 Attachment
      On Thu, 1 Nov 2001, kirti wrote:

      > Hi
      >
      > Normaly we come across 2 modes of operation , user mode & kernel mode, Is
      > there any OS which provides
      > only one mode of operation ??? I think DOS doesn't support kernel mode as a
      > seperate mode of operation, does any
      > OS for Embeded has such fearures ?? If anybody knows it then let me know
      > it.

      All the RTOS's have only one mode of operation - "kernel
      mode". Eg. VxWorks.Also, I think you could say that DOS only
      provides "Kernel Mode", since User programs are allowed direct
      access to all resources.


      --

      regards,
      Pallav.

      _______________________________________________________________________
      Skill without imagination is craftsmanship and gives us many useful objects
      such as wickerwork picnic baskets. Imagination without skill gives us modern
      art.
      -- Tom Stoppard
      _________________________________________________________________
      | |
      |Pallav Nawani |
      |Sasken Communication Technologies Ltd. |
      |Domlur, Bangalore. |
      |Personal Web Page: http://members.dencity.com/pallavnawani |
      |_______________________________________________________________|
    • Sukesh R
      Hi, Can anyone give me some tips and links on ARM assembly programming, I have to run linux on ARM -Regards, Sukesh [Non-text portions of this message have
      Message 2 of 25 , Nov 1, 2001
      • 0 Attachment
        Hi,
        Can anyone give me some tips and links on ARM assembly programming, I have to
        run linux on ARM

        -Regards,
        Sukesh




        [Non-text portions of this message have been removed]
      • Pallav Nawani
        ... I don t think this has anything to do with portability. VxWorks is the most dominant commercial RTOS in the market today, that should say a lot about
        Message 3 of 25 , Nov 1, 2001
        • 0 Attachment
          On Sat, 3 Nov 2001, K T Ligesh wrote:

          > On Fri, Nov 02, 2001 at 09:26:47AM +0530, Pallav Nawani wrote:
          > > On Thu, 1 Nov 2001, kirti wrote:
          > >
          > > > Hi
          > > >
          > > > there any OS which provides
          > > > only one mode of operation ??? I think DOS doesn't support kernel mode as a
          > >
          > > All the RTOS's have only one mode of operation - "kernel
          > > mode". Eg. VxWorks.Also, I think you could say that DOS only
          > > provides "Kernel Mode", since User programs are allowed direct
          > > access to all resources.
          > >
          >
          > Vxworks provides only a single mode, which makes it efficient
          >at the cost of portability. I think LynxOs also provides both

          I don't think this has anything to do with portability. VxWorks
          is the most dominant commercial RTOS in the market today, that
          should say a lot about portability.

          As far as efficiency is concerned, that comes from not having
          to manage virtual memory, two spaces (user & kernel) and
          eliminating the extra memory copy that you need to do if you
          manage user & kernel spaces.


          --

          regards,
          Pallav.

          _______________________________________________________________________
          Skill without imagination is craftsmanship and gives us many useful objects
          such as wickerwork picnic baskets. Imagination without skill gives us modern
          art.
          -- Tom Stoppard
          _________________________________________________________________
          | |
          |Pallav Nawani |
          |Sasken Communication Technologies Ltd. |
          |Domlur, Bangalore. |
          |Personal Web Page: http://members.dencity.com/pallavnawani |
          |_______________________________________________________________|
        • K T Ligesh
          ... RTLinux or RTAI works the normal way, providing both user and kernel modes. Vxworks provides only a single mode, which makes it efficient at the cost of
          Message 4 of 25 , Nov 2, 2001
          • 0 Attachment
            On Fri, Nov 02, 2001 at 09:26:47AM +0530, Pallav Nawani wrote:
            > On Thu, 1 Nov 2001, kirti wrote:
            >
            > > Hi
            > >
            > > Normaly we come across 2 modes of operation , user mode & kernel mode, Is
            > > there any OS which provides
            > > only one mode of operation ??? I think DOS doesn't support kernel mode as a
            > > seperate mode of operation, does any
            > > OS for Embeded has such fearures ?? If anybody knows it then let me know
            > > it.
            >
            > All the RTOS's have only one mode of operation - "kernel
            > mode". Eg. VxWorks.Also, I think you could say that DOS only
            > provides "Kernel Mode", since User programs are allowed direct
            > access to all resources.
            >

            RTLinux or RTAI works the normal way, providing both user and kernel modes. Vxworks provides only a single mode, which makes it efficient at the cost of portability. I think LynxOs also provides both the modes.

            - -- Ligesh
          • K T Ligesh
            ... I meant portability between OSe s, not between hardwares. You cannot take a Unix program and make it run on Vxworks.. even with a few tweaks. On the other
            Message 5 of 25 , Nov 2, 2001
            • 0 Attachment
              On Fri, Nov 02, 2001 at 11:18:35AM +0530, Pallav Nawani wrote:
              > On Sat, 3 Nov 2001, K T Ligesh wrote:
              >
              > > On Fri, Nov 02, 2001 at 09:26:47AM +0530, Pallav Nawani wrote:
              > > > On Thu, 1 Nov 2001, kirti wrote:
              > > >
              > > > > Hi
              > > > >
              > > > > there any OS which provides
              > > > > only one mode of operation ??? I think DOS doesn't support kernel mode as a
              > > >
              > > > All the RTOS's have only one mode of operation - "kernel
              > > > mode". Eg. VxWorks.Also, I think you could say that DOS only
              > > > provides "Kernel Mode", since User programs are allowed direct
              > > > access to all resources.
              > > >
              > >
              > > Vxworks provides only a single mode, which makes it efficient
              > >at the cost of portability. I think LynxOs also provides both
              >
              > I don't think this has anything to do with portability. VxWorks
              > is the most dominant commercial RTOS in the market today, that
              > should say a lot about portability.
              >

              I meant portability between OSe's, not between hardwares.
              You cannot take a Unix program and make it run on Vxworks.. even with a few tweaks. On the other hand, All linux applications runs directly on RTLinux or RTAI and for that matter RTLinux can be said to be Source Code compatible with all UNICES, though they may not run in Real Time.

              Is Vxworks programs source compatible with other OS'es? I have not worked on Vxworks, but I think it is not.


              - -- Ligesh
            • Santosh Bhat
              As u rightly said all the rtos run at the kernel level , so as to make the context switch time and latency minimal.There is no concept of system call out here,
              Message 6 of 25 , Nov 4, 2001
              • 0 Attachment
                As u rightly said all the rtos run at the kernel level , so as to make the
                context switch time and latency minimal.There is no concept of system call
                out here, what ever the function you write will be a direct entry point to
                the kernel.
                Regards
                ----- Original Message -----
                From: kirti <kirtim@...>
                To: <linux-embedded@...>
                Cc: <linux-bangalore-programming@yahoogroups.com>
                Sent: Thursday, November 01, 2001 10:36 AM
                Subject: [blug-prog]


                > Hi
                >
                > Normaly we come across 2 modes of operation , user mode & kernel mode, Is
                > there any OS which provides
                > only one mode of operation ??? I think DOS doesn't support kernel mode as
                a
                > seperate mode of operation, does any
                > OS for Embeded has such fearures ?? If anybody knows it then let me know
                > it.
                >
                > regards
                > Kirti
                >
                > *********************************************************
                > Disclaimer
                >
                > This message (including any attachments) contains
                > confidential information intended for a specific
                > individual and purpose, and is protected by law.
                > If you are not the intended recipient, you should
                > delete this message and are hereby notified that
                > any disclosure, copying, or distribution of this
                > message, or the taking of any action based on it,
                > is strictly prohibited.
                >
                > *********************************************************
                > Visit us at http://www.mahindrabt.com
                >
                >
                > --
                > ---------------------------------------------------------------
                > This is the programming list of the Bangalore Linux Users Group
                > ---------------------------------------------------------------
                > Go to http://linux-bangalore.org for more information
                > about us, as well as our other mailing lists
                >
                >
                > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                >
                >
              • kirti
                No thats not the case here so many RTOS support 2 modes of operation , there is contex switch here. ... what ever the function you write will be a direct entry
                Message 7 of 25 , Nov 4, 2001
                • 0 Attachment
                  No thats not the case here so many RTOS support 2 modes of operation , there
                  is contex switch here.

                  > As u rightly said all the rtos run at the kernel level , so as to make the
                  > context switch time and latency minimal.There is no concept of system call
                  > out here, what ever the function you write will be a direct entry point to
                  > the kernel.



                  what ever the function you write will be a direct entry point to
                  > the kernel.
                  At least I have not seen this case in any known RTOS except vxWorks but
                  still it gives support for syscall thro'gn linking table.


                  just check out this
                  r_
                  Kirti

                  *********************************************************
                  Disclaimer

                  This message (including any attachments) contains
                  confidential information intended for a specific
                  individual and purpose, and is protected by law.
                  If you are not the intended recipient, you should
                  delete this message and are hereby notified that
                  any disclosure, copying, or distribution of this
                  message, or the taking of any action based on it,
                  is strictly prohibited.

                  *********************************************************
                  Visit us at http://www.mahindrabt.com
                • Santosh Bhat
                  The soft real time system if you are talking about , then it is right.But if you are expecting the hard real time capabilities then the rtos should run at the
                  Message 8 of 25 , Nov 4, 2001
                  • 0 Attachment
                    The soft real time system if you are talking about , then it is right.But if
                    you are expecting the hard real time capabilities then the rtos should run
                    at the Kernel mode it self.
                    As u mentioned the memory protection is the issue need to be addressed by
                    the programmer.
                    Regards

                    ----- Original Message -----
                    From: kirti <kirtim@...>
                    To: <linux-bangalore-programming@yahoogroups.com>
                    Cc: "Santosh Bhat" <sanbhat@...>
                    Sent: Monday, November 05, 2001 12:09 PM
                    Subject: Re: [blug-prog]


                    > No thats not the case here so many RTOS support 2 modes of operation ,
                    there
                    > is contex switch here.
                    >
                    > > As u rightly said all the rtos run at the kernel level , so as to make
                    the
                    > > context switch time and latency minimal.There is no concept of system
                    call
                    > > out here, what ever the function you write will be a direct entry point
                    to
                    > > the kernel.
                    >
                    >
                    >
                    > what ever the function you write will be a direct entry point to
                    > > the kernel.
                    > At least I have not seen this case in any known RTOS except vxWorks but
                    > still it gives support for syscall thro'gn linking table.
                    >
                    >
                    > just check out this
                    > r_
                    > Kirti
                    >
                    > *********************************************************
                    > Disclaimer
                    >
                    > This message (including any attachments) contains
                    > confidential information intended for a specific
                    > individual and purpose, and is protected by law.
                    > If you are not the intended recipient, you should
                    > delete this message and are hereby notified that
                    > any disclosure, copying, or distribution of this
                    > message, or the taking of any action based on it,
                    > is strictly prohibited.
                    >
                    > *********************************************************
                    > Visit us at http://www.mahindrabt.com
                    >
                    >
                    > --
                    > ---------------------------------------------------------------
                    > This is the programming list of the Bangalore Linux Users Group
                    > ---------------------------------------------------------------
                    > Go to http://linux-bangalore.org for more information
                    > about us, as well as our other mailing lists
                    >
                    >
                    > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                    >
                    >
                  • Santosh Bhat
                    Hi there is a beautiful pgm written to monitor the whether report ,a simulator which fits well in a floppy developed on RTAI , with the core kernel and the
                    Message 9 of 25 , Nov 5, 2001
                    • 0 Attachment
                      Hi there is a beautiful pgm written to monitor the whether report ,a
                      simulator which fits well in a floppy developed on RTAI , with the core
                      kernel and the applicaton , Soon i guess the size should not be a problem
                      ,but the bench marks may be a issue.
                      Regards
                      Santosh Bhat
                      ----- Original Message -----
                      From: K T Ligesh <ligesh@...>
                      To: <linux-bangalore-programming@yahoogroups.com>
                      Sent: Tuesday, November 06, 2001 3:50 PM
                      Subject: Re: [blug-prog]


                      > On Mon, Nov 05, 2001 at 12:09:08PM +0530, kirti wrote:
                      > > No thats not the case here so many RTOS support 2 modes of operation ,
                      there
                      > > is contex switch here.
                      >
                      > RTLinux *supports* dual mode. But the real time programming is done in
                      the kernel mode and loaded as a kernel module. So, as far as the real time
                      subroutine is concerned, there is no context switch. It cannot be. RTlinux
                      also allows context switch, but this is used by the non-realtime programs.
                      >
                      > The problem with RTlinux is the size and not the context switch.
                      >
                      > I don't know how exactly ecos works, but I guess it is modelled in the
                      like of Vxworks rather than RTlinux.
                      >
                      >
                      > - -- Ligesh
                      >
                      >
                      >
                      > --
                      > ---------------------------------------------------------------
                      > This is the programming list of the Bangalore Linux Users Group
                      > ---------------------------------------------------------------
                      > Go to http://linux-bangalore.org for more information
                      > about us, as well as our other mailing lists
                      >
                      >
                      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                      >
                      >
                    • K T Ligesh
                      ... RTLinux *supports* dual mode. But the real time programming is done in the kernel mode and loaded as a kernel module. So, as far as the real time
                      Message 10 of 25 , Nov 6, 2001
                      • 0 Attachment
                        On Mon, Nov 05, 2001 at 12:09:08PM +0530, kirti wrote:
                        > No thats not the case here so many RTOS support 2 modes of operation , there
                        > is contex switch here.

                        RTLinux *supports* dual mode. But the real time programming is done in the kernel mode and loaded as a kernel module. So, as far as the real time subroutine is concerned, there is no context switch. It cannot be. RTlinux also allows context switch, but this is used by the non-realtime programs.

                        The problem with RTlinux is the size and not the context switch.

                        I don't know how exactly ecos works, but I guess it is modelled in the like of Vxworks rather than RTlinux.


                        - -- Ligesh
                      • K T Ligesh
                        ... That, I guess is a good sign. But the problem here is that the base linux kernel doesn t allow trimming down after a certain point. Especially if it has to
                        Message 11 of 25 , Nov 6, 2001
                        • 0 Attachment
                          On Mon, Nov 05, 2001 at 04:07:57PM +0530, Santosh Bhat wrote:
                          > Hi there is a beautiful pgm written to monitor the whether report ,a
                          > simulator which fits well in a floppy developed on RTAI , with the core
                          > kernel and the applicaton , Soon i guess the size should not be a problem
                          > ,but the bench marks may be a issue.

                          That, I guess is a good sign. But the problem here is that the base linux kernel doesn't allow trimming down after a certain point. Especially if it has to support the non-realtime applications. When it comes to the embedded applications with memories in tens of KBs) RTai may not be the solution.

                          Ecos from RH is written with such areas in mind. You can check it out.

                          Could you send me the link for the weather report program.



                          - -- Ligesh
                        • gulshan
                          hi folks I have a problem with the following code when I try to run the program  for option 2 ie it switches to str_token function. but it does not execute
                          Message 12 of 25 , Nov 30, 2001
                          • 0 Attachment
                            hi folks


                            I have a problem with the following code
                            when I try to run the program  for option 2
                            ie it switches to str_token function.
                            but it does not execute the fgets statement there and
                            comes out of the fun and again presents the set of
                            choices again.
                            but if I press control+d
                            it executes the str_token function correctly.
                            could someone explain why this is happening and
                            possibe remedy?

                            /*******code***/
                            #define MAXSIZE 100

                            void my_token();
                            void str_token();
                            void token_help();
                            void call_exit();


                            int main(void){
                            char buff[3],*p;
                            int opt;
                            do {
                            printf("Enter 1 to tokenize the string
                            analytically\n"); printf("Enter 2 to tokenize using
                            strtok\n");
                            printf("Enter 3 for help \n");
                            printf("Enter 4 to exit from the program \n");
                            p=fgets(buff,2,stdin);
                            opt=atoi(buff);

                            switch(opt) {
                            case 1 : my_token();
                            break;
                            case 2 : str_token();
                            break;
                            case 3 : token_help();
                            break;
                            case 4 : printf("bye ...\n");
                            break;
                            default : printf("unknown option ..\n");

                            }
                            } while (opt!=4); // end of dowhile loop

                            return 0;

                            } // end of main


                            void my_token() {
                            printf("my token method is yet to be
                            implemented\n");

                            }

                            void str_token() {
                            char buffer[MAXSIZE],*ptr2buff;

                            printf("Enter a string to be tokeniased:");

                            fgets(buffer,MAXSIZE,stdin);

                            puts(buffer);


                            }

                            void token_help(){
                            printf("token help program is yet to be
                            implemented\n");
                            }
                            void call_exit(){
                            printf("calling the exit function .. have fun\n");
                            exit(1);
                            }


                            /***/

                            regards
                            gulshan

                            __________________________________________________
                            Do You Yahoo!?
                            Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
                            http://geocities.yahoo.com/ps/info1
                          • Manju Hanasi
                            In your first fgets try to use, fgets (buff, 3, stdin); Reason: fgets actually reads n-1 characters (or till n) and stores 0 at the end. This means if your
                            Message 13 of 25 , Nov 30, 2001
                            • 0 Attachment
                              In your first fgets try to use,
                              fgets (buff, 3, stdin);

                              Reason:
                              fgets actually reads n-1 characters (or till \n) and
                              stores \0 at the end. This means if your code has,
                              fgets (buff, 2, stdin);
                              and you enter, 2\n (2 and a new line)
                              fgets only reads 2-1 characters, i.e. it reads only
                              2 not the '\n'. So 'newline' char will be kept in
                              input buffer. Next time when you call fgets in your
                              str_token function, fgets picks this remaining '\n'.
                              So it looks as if it is NOT executing fgets statement.

                              MMH

                              --- gulshan <gulshan_28@...> wrote:
                              > hi folks
                              >
                              >
                              > I have a problem with the following code
                              > when I try to run the program  for option 2
                              > ie it switches to str_token function.
                              > but it does not execute the fgets statement there
                              > and
                              > comes out of the fun and again presents the set of
                              > choices again.
                              > but if I press control+d
                              > it executes the str_token function correctly.
                              > could someone explain why this is happening and
                              > possibe remedy?
                              >
                              > /*******code***/
                              > #define MAXSIZE 100
                              >
                              > void my_token();
                              > void str_token();
                              > void token_help();
                              > void call_exit();
                              >
                              >
                              > int main(void){
                              > char buff[3],*p;
                              > int opt;
                              > do {
                              > printf("Enter 1 to tokenize the string
                              > analytically\n"); printf("Enter 2 to tokenize
                              > using
                              > strtok\n");
                              > printf("Enter 3 for help \n");
                              > printf("Enter 4 to exit from the program \n");
                              > p=fgets(buff,2,stdin);
                              > opt=atoi(buff);
                              >
                              > switch(opt) {
                              > case 1 : my_token();
                              > break;
                              > case 2 : str_token();
                              > break;
                              > case 3 : token_help();
                              > break;
                              > case 4 : printf("bye ...\n");
                              > break;
                              > default : printf("unknown option ..\n");
                              >
                              > }
                              > } while (opt!=4); // end of dowhile loop
                              >
                              > return 0;
                              >
                              > } // end of main
                              >
                              >
                              > void my_token() {
                              > printf("my token method is yet to be
                              > implemented\n");
                              >
                              > }
                              >
                              > void str_token() {
                              > char buffer[MAXSIZE],*ptr2buff;
                              >
                              > printf("Enter a string to be tokeniased:");
                              >
                              > fgets(buffer,MAXSIZE,stdin);
                              >
                              > puts(buffer);
                              >
                              >
                              > }
                              >
                              > void token_help(){
                              > printf("token help program is yet to be
                              > implemented\n");
                              > }
                              > void call_exit(){
                              > printf("calling the exit function .. have fun\n");
                              > exit(1);
                              > }
                              >
                              >
                              > /***/
                              >
                              > regards
                              > gulshan
                              >
                              > __________________________________________________
                              > Do You Yahoo!?
                              > Yahoo! GeoCities - quick and easy web site hosting,
                              > just $8.95/month.
                              > http://geocities.yahoo.com/ps/info1
                              >


                              __________________________________________________
                              Do You Yahoo!?
                              Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
                              http://geocities.yahoo.com/ps/info1
                            • Abhishek Nayani
                              ... _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
                              Message 14 of 25 , Nov 30, 2001
                              • 0 Attachment
                                -----BEGIN PGP SIGNED MESSAGE-----
                                Hash: SHA1

                                Hi ,

                                Just change

                                - -- p=fgets(buff,2,stdin);
                                to
                                ++ p=fgets(buf, sizeof(buf),stdin);

                                and also ur not using p for anything yet.


                                Bye,
                                Abhi.

                                On Friday 30 November 2001 02:28 pm, gulshan wrote:
                                > hi folks
                                >
                                >
                                > I have a problem with the following code
                                > when I try to run the program for option 2
                                > ie it switches to str_token function.
                                > but it does not execute the fgets statement there and
                                > comes out of the fun and again presents the set of
                                > choices again.
                                > but if I press control+d
                                > it executes the str_token function correctly.
                                > could someone explain why this is happening and
                                > possibe remedy?
                                -----BEGIN PGP SIGNATURE-----
                                Version: GnuPG v1.0.6 (GNU/Linux)
                                Comment: For info see http://www.gnupg.org

                                iD8DBQE8B1YeJMnEy0L9g2kRAm9RAJ9bagbB+BG5NhbsVLCJ7d1iWHVYkgCggrNg
                                WK32LTXLpR5AL+hL1vK+QLA=
                                =y1l5
                                -----END PGP SIGNATURE-----

                                _________________________________________________________
                                Do You Yahoo!?
                                Get your free @... address at http://mail.yahoo.com
                              • Anil Kumar Saharan
                                ... Try using fflush(stdin) before using fgets. This type of problems generally occurs because of unflushed buffer. anil ===== Anil Saharan Visit me at
                                Message 15 of 25 , Nov 30, 2001
                                • 0 Attachment
                                  --- gulshan <gulshan_28@...> wrote:
                                  > hi folks
                                  >
                                  >
                                  > I have a problem with the following code
                                  > when I try to run the program  for option 2

                                  Try using fflush(stdin) before using fgets. This type of problems
                                  generally occurs because of unflushed buffer.

                                  anil


                                  =====
                                  Anil Saharan
                                  Visit me at http://www.mycgiserver.com/~anilks
                                  ----------------------------------------------------------

                                  __________________________________________________
                                  Do You Yahoo!?
                                  Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
                                  http://geocities.yahoo.com/ps/info1
                                • Pallav Nawani
                                  ... change p=fgets(buff,2,stdin); to p=fgets(buff,3,stdin); A matter of arithmetic ;) ( common problem with people using fgets for the first time) if you set
                                  Message 16 of 25 , Nov 30, 2001
                                  • 0 Attachment
                                    On Fri, 30 Nov 2001, gulshan wrote:

                                    > hi folks
                                    >
                                    >
                                    > I have a problem with the following code
                                    > when I try to run the program  for option 2
                                    > ie it switches to str_token function.
                                    > but it does not execute the fgets statement there and
                                    > comes out of the fun and again presents the set of
                                    > choices again.

                                    change p=fgets(buff,2,stdin);
                                    to
                                    p=fgets(buff,3,stdin);

                                    A matter of arithmetic ;) ( common problem with people using
                                    fgets for the first time)
                                    if you set 2 as the no. of chars, fgets will take 2-1=1
                                    characters as input, ignoring the newline. It will be read
                                    in the next call to fgets, and it will return immediately.
                                    note that your input + newline makes two characters, and so
                                    you must set the upper limit to 3.

                                    > but if I press control+d
                                    > it executes the str_token function correctly.

                                    I think that the reason is that you have setup fgets to take up
                                    2-1 = 1 characters as input, and ctrl-D is a valid character, and
                                    since ctrl-d also means end of input, your program doesnot wait
                                    for you to press enter. I don't know why it goes to input no 2
                                    though. may have something to do with how atoi handles ctrl-d.
                                    probably it returns with the error code 2? can you check that?


                                    regards,
                                    Pallav.

                                    _______________________________________________________________________
                                    It is a profoundly erroneous truism, repeated by all copy-books and
                                    by eminent people when they are making speeches, that we should cultivate
                                    the habit of thinking about what we are doing. The precise opposite is the
                                    case. Civilization advances by extending the numbers of important operations
                                    which we can perform without thinking about them. Operations of thought are
                                    like cavalry charges in battle -- they are strictly limited in number, they
                                    require fresh horses, and must only be made at decisive moments.
                                    -- Alfred North Whitehead
                                    _________________________________________________________________
                                    | |
                                    |Pallav Nawani |
                                    |Sasken Communication Technologies Ltd. |
                                    |Domlur, Bangalore. |
                                    |Personal Web Page: http://members.dencity.com/pallavnawani |
                                    |_______________________________________________________________|
                                  • Abhishek Nayani
                                    ... _________________________________________________________ Do You Yahoo!? Get your free @yahoo.com address at http://mail.yahoo.com
                                    Message 17 of 25 , Nov 30, 2001
                                    • 0 Attachment
                                      -----BEGIN PGP SIGNED MESSAGE-----
                                      Hash: SHA1

                                      Hi,


                                      On Friday 30 November 2001 03:27 pm, Anil Kumar Saharan wrote:
                                      > --- gulshan <gulshan_28@...> wrote:
                                      > > hi folks
                                      > >
                                      > >
                                      > > I have a problem with the following code
                                      > > when I try to run the program for option 2
                                      >
                                      > Try using fflush(stdin) before using fgets. This type of problems
                                      > generally occurs because of unflushed buffer.

                                      fflush() is never used on an input stream !, its only for the *output*
                                      stream. Its undefined behaviour if used on an input stream.

                                      Bye,
                                      Abhi.

                                      >
                                      > anil
                                      >
                                      >
                                      > =====
                                      > Anil Saharan
                                      > Visit me at http://www.mycgiserver.com/~anilks
                                      > ----------------------------------------------------------
                                      >
                                      > __________________________________________________
                                      > Do You Yahoo!?
                                      > Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
                                      > http://geocities.yahoo.com/ps/info1
                                      >
                                      >
                                      > ---------------------------------------------------------
                                      > The Linux Bangalore/2001 conference is on December 10-12!
                                      > Have you checked out http://linux-bangalore.org/2001 yet?
                                      > Do it now!
                                      > ---------------------------------------------------------
                                      >
                                      > ---------------------------------------------------------------
                                      > This is the programming list of the Bangalore Linux Users Group
                                      > ---------------------------------------------------------------
                                      > Go to http://linux-bangalore.org for more information
                                      > about us, as well as our other mailing lists
                                      >
                                      >
                                      > Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
                                      -----BEGIN PGP SIGNATURE-----
                                      Version: GnuPG v1.0.6 (GNU/Linux)
                                      Comment: For info see http://www.gnupg.org

                                      iD8DBQE8B1tyJMnEy0L9g2kRAvIiAKCPeGgQv3dHuR/aXjyhjHqFIMFaswCfWxAo
                                      NJ0lKPO6t6trggmwYlEe4mU=
                                      =nXa2
                                      -----END PGP SIGNATURE-----

                                      _________________________________________________________
                                      Do You Yahoo!?
                                      Get your free @... address at http://mail.yahoo.com
                                    • sharma ajay
                                      thanx i got it regards gulshan ... __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just
                                      Message 18 of 25 , Nov 30, 2001
                                      • 0 Attachment
                                        thanx

                                        i got it

                                        regards gulshan

                                        --- Pallav Nawani <pallav@...> wrote:
                                        >
                                        > On Fri, 30 Nov 2001, gulshan wrote:
                                        >
                                        > > hi folks
                                        > >
                                        > >
                                        > > I have a problem with the following code
                                        > > when I try to run the program for option 2
                                        > > ie it switches to str_token function.
                                        > > but it does not execute the fgets statement there
                                        > and
                                        > > comes out of the fun and again presents the set of
                                        > > choices again.
                                        >
                                        > change p=fgets(buff,2,stdin);
                                        > to
                                        > p=fgets(buff,3,stdin);
                                        >
                                        > A matter of arithmetic ;) ( common problem with
                                        > people using
                                        > fgets for the first time)
                                        > if you set 2 as the no. of chars, fgets will take
                                        > 2-1=1
                                        > characters as input, ignoring the newline. It will
                                        > be read
                                        > in the next call to fgets, and it will return
                                        > immediately.
                                        > note that your input + newline makes two characters,
                                        > and so
                                        > you must set the upper limit to 3.
                                        >
                                        > > but if I press control+d
                                        > > it executes the str_token function correctly.
                                        >
                                        > I think that the reason is that you have setup fgets
                                        > to take up
                                        > 2-1 = 1 characters as input, and ctrl-D is a valid
                                        > character, and
                                        > since ctrl-d also means end of input, your program
                                        > doesnot wait
                                        > for you to press enter. I don't know why it goes to
                                        > input no 2
                                        > though. may have something to do with how atoi
                                        > handles ctrl-d.
                                        > probably it returns with the error code 2? can you
                                        > check that?
                                        >
                                        >
                                        > regards,
                                        > Pallav.
                                        >
                                        >
                                        _______________________________________________________________________
                                        > It is a profoundly erroneous truism, repeated by
                                        > all copy-books and
                                        > by eminent people when they are making speeches,
                                        > that we should cultivate
                                        > the habit of thinking about what we are doing. The
                                        > precise opposite is the
                                        > case. Civilization advances by extending the
                                        > numbers of important operations
                                        > which we can perform without thinking about them.
                                        > Operations of thought are
                                        > like cavalry charges in battle -- they are strictly
                                        > limited in number, they
                                        > require fresh horses, and must only be made at
                                        > decisive moments.
                                        > -- Alfred North Whitehead
                                        >
                                        _________________________________________________________________
                                        > | |
                                        > |Pallav Nawani |
                                        > |Sasken Communication Technologies Ltd. |
                                        > |Domlur, Bangalore. |
                                        > |Personal Web Page:
                                        > http://members.dencity.com/pallavnawani |
                                        >
                                        |_______________________________________________________________|
                                        >
                                        >
                                        >


                                        __________________________________________________
                                        Do You Yahoo!?
                                        Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
                                        http://geocities.yahoo.com/ps/info1
                                      • Amber Gupta
                                        ... From: Sreekanth Y. [mailto:sreekanth_y@trigent.com] Sent: Friday, July 25, 2003 8:57 AM To: linux-bangalore-programming@yahoogroups.com Subject:
                                        Message 19 of 25 , Jul 24, 2003
                                        • 0 Attachment
                                          -----Original Message-----
                                          From: Sreekanth Y. [mailto:sreekanth_y@...]
                                          Sent: Friday, July 25, 2003 8:57 AM
                                          To: linux-bangalore-programming@yahoogroups.com
                                          Subject: [blug-prog]


                                          Hi guys,

                                          Can any one tell me how to start XWindows Programming?
                                          Which GUI do u suggest...?
                                          Which GUI Development Environment do u suggest?
                                          Is there any demand for this sort of programming?

                                          Best Regards
                                          !! Sreekant !!
                                          Champion is not one who never fails, but one who NEVER QUITS !





                                          ---------------------------------------------------------------
                                          This is the programming list of the Bangalore Linux Users Group
                                          ---------------------------------------------------------------
                                          Go to http://linux-bangalore.org for more information
                                          about us, as well as our other mailing lists

                                          Before you post to this list, please read
                                          http://linux-bangalore.org/articles/smart-questions.php


                                          Your use of Yahoo! Groups is subject to
                                          http://docs.yahoo.com/info/terms/
                                        • arun
                                          ... From: Ganesan R To: Sent: Friday, July 25, 2003 11:35 AM Subject: Re: [blug-prog] ...
                                          Message 20 of 25 , Jul 24, 2003
                                          • 0 Attachment
                                            ----- Original Message -----
                                            From: "Ganesan R" <rganesan@...>
                                            To: <linux-bangalore-programming@yahoogroups.com>
                                            Sent: Friday, July 25, 2003 11:35 AM
                                            Subject: Re: [blug-prog]


                                            > >>>>> "Sreekanth" == Sreekanth Y <sreekanth_y@...> writes:
                                            >
                                            > > Hi guys,
                                            >
                                            > > Can any one tell me how to start XWindows Programming?

                                            > > Is there any demand for this sort of programming?

                                            Java always seemed like a good choice to produce UI's on Unix systems

                                            It might not be so much fun but i guess it would be a much better choice from
                                            an organizational persepective.

                                            my -duh- 2 bits
                                            arun
                                          • Biju Chacko
                                            ... I am unconvinced of the utility of Java as a GUI tool. It excels as a server-side programming tool, but both Swing and AWT are (IMHO) are too slow for any
                                            Message 21 of 25 , Jul 25, 2003
                                            • 0 Attachment
                                              On Fri, 25 Jul 2003 12:11:57 +0530, arun wrote:

                                              > > >>>>> "Sreekanth" == Sreekanth Y <sreekanth_y@...> writes:
                                              > >
                                              > > > Hi guys,
                                              > >
                                              > > > Can any one tell me how to start XWindows Programming?
                                              >
                                              > > > Is there any demand for this sort of programming?
                                              >
                                              > Java always seemed like a good choice to produce UI's on Unix systems

                                              I am unconvinced of the utility of Java as a GUI tool. It excels as a
                                              server-side programming tool, but both Swing and AWT are (IMHO) are too
                                              slow for any kind of serious application.

                                              It's too bad really, because the Java language and it's class libraries
                                              are really elegant. It's just the VM concept that sucks.

                                              The so-called advantages of "compile once, run everywhere" are
                                              outweighed by the sucky performance of VMs.

                                              If you need to do cross-platform GUIs, you are spoiled for choice. GTK+,
                                              qt, wxWindows, tk all work on Windows and Unix. Mac's are also supported
                                              to a lesser extent. Even MFC has been ported to some Unixen.

                                              My toolkit of choice is GTK+, but thats only because I had to learn it
                                              to work on XFce.

                                              But any of the toolkits I mentioned is far more practical (IMHO) for
                                              GUIs than Java.

                                              -- b

                                              --
                                              -----------------------------------------------------------------------
                                              Biju 'botsie' Chacko biju_chacko at vsnl dot net
                                              http://www.symonds.net/~botsie Public Key available on request
                                              -----------------------------------------------------------------------
                                            • arun
                                              ... From: Biju Chacko To: Sent: Saturday, July 26, 2003 10:26 AM Subject: Re:
                                              Message 22 of 25 , Jul 26, 2003
                                              • 0 Attachment
                                                ----- Original Message -----
                                                From: "Biju Chacko" <biju_chacko@...>
                                                To: <linux-bangalore-programming@yahoogroups.com>
                                                Sent: Saturday, July 26, 2003 10:26 AM
                                                Subject: Re: [blug-prog]


                                                > On Fri, 25 Jul 2003 12:11:57 +0530, arun wrote:
                                                >
                                                > > > >>>>> "Sreekanth" == Sreekanth Y <sreekanth_y@...> writes:
                                                > > >
                                                > > > > Hi guys,
                                                > > >
                                                > > > > Can any one tell me how to start XWindows Programming?
                                                > >
                                                > > > > Is there any demand for this sort of programming?
                                                > >
                                                > > Java always seemed like a good choice to produce UI's on Unix systems
                                                >
                                                > I am unconvinced of the utility of Java as a GUI tool. It excels as a
                                                > server-side programming tool, but both Swing and AWT are (IMHO) are too
                                                > slow for any kind of serious application.
                                                >
                                                > It's too bad really, because the Java language and it's class libraries
                                                > are really elegant. It's just the VM concept that sucks.
                                                >
                                                > The so-called advantages of "compile once, run everywhere" are
                                                > outweighed by the sucky performance of VMs.

                                                > If you need to do cross-platform GUIs, you are spoiled for choice.

                                                True but somehow they are never so prevalent (no flames please - i speak
                                                from a users perspective - only an opinion). And then again Java seemed
                                                good to me only from an "organizational perspective" - ie maintainability and
                                                stuff i think might be easy with Java just coz more people use it , develop
                                                with
                                                it and i guess it might be easier to find a person to maiatain Java code

                                                I'am really allergic against heavy duty sluggish UI's and for this reason was
                                                averse
                                                to Java but now with the kindof memory and processing powers i think its more
                                                OK (nothing more nothing less). You have ur UI and it can run on multiple
                                                systems
                                                - it does that. The performance is more of a *personal preference* & some
                                                people
                                                can live with that

                                                arun

                                                ps: As for XWindow managers go i prefer the light weight ones like xfce etc -
                                                iam right now searching the answer for as to how much base XWindow engine
                                                (dont ask me what i mean by that - window manager or whatever is lower)
                                                being a user mode driver can affect its performace. (eagerly waiting for 2.6
                                                too)
                                              • Ganesan R
                                                ... There s an alternative from IBM called SWT which is supposed to be pretty snappy. I believe It uses a peer model (like AWT); i.e each Java component has a
                                                Message 23 of 25 , Jul 27, 2003
                                                • 0 Attachment
                                                  >>>>> "Biju" == Biju Chacko <biju_chacko@...> writes:

                                                  > I am unconvinced of the utility of Java as a GUI tool. It excels as a
                                                  > server-side programming tool, but both Swing and AWT are (IMHO) are too
                                                  > slow for any kind of serious application.

                                                  There's an alternative from IBM called SWT which is supposed to be pretty
                                                  snappy. I believe It uses a peer model (like AWT); i.e each Java component
                                                  has a native peer. On Linux SWT uses GTK+ 2.x.

                                                  > It's too bad really, because the Java language and it's class libraries
                                                  > are really elegant. It's just the VM concept that sucks.
                                                  > The so-called advantages of "compile once, run everywhere" are
                                                  > outweighed by the sucky performance of VMs.

                                                  The VM concept is not the problem. I agree that the current state of Java
                                                  VMs or rather the Java Runtime as a whole sucks. They're too bloated, slow
                                                  to startup etc etc. That doesn't mean the VM concept is a problem. Perl and
                                                  Python based UIs can be quite snappy. With SWT I've heard that even Java UIs
                                                  can be snappy. There is an even a java-gnome project with direct access to
                                                  the GTK+ APIs (it won't be cross platform, of course).

                                                  > If you need to do cross-platform GUIs, you are spoiled for choice. GTK+,
                                                  > qt, wxWindows, tk all work on Windows and Unix. Mac's are also supported
                                                  > to a lesser extent. Even MFC has been ported to some Unixen.

                                                  I guess wxWindows and QT are practical choices today for a true
                                                  cross-platform GUI toolkits.

                                                  Ganesan

                                                  --
                                                  Ganesan R (rganesan at debian dot org) | http://www.debian.org/~rganesan/
                                                  1024D/5D8C12EA, fingerprint F361 84F1 8D82 32E7 1832 6798 15E0 02BA 5D8C 12EA
                                                • suman
                                                  hi ... I would like to add some points here regarding java VM. JavaVM the recent one from IBM is as fast a s MSVC++6.0 atleast on windows. So in less time i
                                                  Message 24 of 25 , Aug 7, 2003
                                                  • 0 Attachment
                                                    hi
                                                    > The VM concept is not the problem. I agree that the current state of Java
                                                    > VMs or rather the Java Runtime as a whole sucks. They're too bloated, slow
                                                    > to startup etc etc. That doesn't mean the VM concept is a problem. Perl and
                                                    > Python based UIs can be quite snappy. With SWT I've heard that even Java
                                                    > UIs can be snappy. There is an even a java-gnome project with direct access
                                                    > to the GTK+ APIs (it won't be cross platform, of course).
                                                    >
                                                    I would like to add some points here regarding java VM.
                                                    JavaVM the recent one from IBM is as fast a s MSVC++6.0 atleast on windows.
                                                    So in less time i think it will be the same on inux.

                                                    > I guess wxWindows and QT are practical choices today for a true
                                                    > cross-platform GUI toolkits.
                                                    I donno about wxxindows but Qt is good cros platform sol.
                                                    Though i have never wokrd on windows with qt i fond it very fine.
                                                    NOTE: my doubt is there smthg like signals and slots mechanism for java like
                                                    c++.
                                                    -suman
                                                  Your message has been successfully submitted and would be delivered to recipients shortly.