Find the answer to your Linux question:
Page 1 of 2 1 2 LastLast
Results 1 to 10 of 13
I know that linux is an open source but i don't know how to use it for example i want to make the + in the calculator do the multiplication ...
  1. #1
    Linux User kmitnick's Avatar
    Join Date
    May 2008
    Location
    Jordan - Amman
    Posts
    329

    need help about source code

    I know that linux is an open source but i don't know how to use it for example i want to make the + in the calculator do the multiplication so 2+5 =10 so please tell me
    Dual Booting Ubuntu 10.04, Windows 7

    Toshiba Satellite A200-1M5, Duo Core 2.0 Ghz, 1 Gigs RAM, 256 Intel Card

    You are registered Linux user number 490788
    Happy Linuxing

  2. #2
    Linux User kmitnick's Avatar
    Join Date
    May 2008
    Location
    Jordan - Amman
    Posts
    329
    anyone please answer?
    Dual Booting Ubuntu 10.04, Windows 7

    Toshiba Satellite A200-1M5, Duo Core 2.0 Ghz, 1 Gigs RAM, 256 Intel Card

    You are registered Linux user number 490788
    Happy Linuxing

  3. #3
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    I don't understand the question.

    You could write a program that would take in input and make the + sign be a multiplier. That's fairly trivial.

    As far as redefining the '+' sign across every program, that is not possible, unless you want to go and modify the source code of every calculator program to treat the '+' as multiplication. Even then, you won't be changing the meaning of '+' in their source code.

    What are you actually attempting to do?
    DISTRO=Arch
    Registered Linux User #388732

  4. #4
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,413
    If you only want to change the behaviour of the + sign in one calculator program, then download its source code, copy multiply code into the + routine, and recompile it.

    If you want to change it for everything, then that's a very big project and I wish you luck! (It will also probably break a lot of the underlying code, so I wouldn't attempt it if I were you.)
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  5. #5
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,413
    In fact, to change the way + operates, you'd have to dig much deeper, and alter the source code for the C math libraries.

    It would be easier to change one of the higher level maths functions that are defined in the calculator source code, rather than changing something as basic as +.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  6. #6
    Just Joined! cheapscotchron's Avatar
    Join Date
    Dec 2008
    Location
    swamps of jersey
    Posts
    68
    Perhaps I drank too much champagne this morning...

    While it may wreak havoc, could you simply change the code page set to have a "+" map to the ascii of "*"?


    CSR

  7. #7
    Linux User kmitnick's Avatar
    Join Date
    May 2008
    Location
    Jordan - Amman
    Posts
    329
    wut i want is to see the general idea of changing the source code of linux,
    and i assumed the + as an example so can i do it?
    for example the bluetooth applet can i edit ?
    Dual Booting Ubuntu 10.04, Windows 7

    Toshiba Satellite A200-1M5, Duo Core 2.0 Ghz, 1 Gigs RAM, 256 Intel Card

    You are registered Linux user number 490788
    Happy Linuxing

  8. #8
    Linux Guru smolloy's Avatar
    Join Date
    Apr 2005
    Location
    CA, but from N.Ireland
    Posts
    2,413
    Yes, almost all the software that comes with Linux may be edited freely.
    Registered Linux user #388328 || Registered LFS user #15880
    AMD 64 X2 4600+ :: 2X1GB DDR2 800 :: GeForce 9400 GT 512MB :: ASUS M2N32 Deluxe :: 4X250GB SATAII
    Need instant help? Try us on IRC -- #linuxforums on freenode

  9. #9
    Linux User kmitnick's Avatar
    Join Date
    May 2008
    Location
    Jordan - Amman
    Posts
    329
    wut i say is : wut does an open source os mean?
    does it mean that i can change any program in it?
    Dual Booting Ubuntu 10.04, Windows 7

    Toshiba Satellite A200-1M5, Duo Core 2.0 Ghz, 1 Gigs RAM, 256 Intel Card

    You are registered Linux user number 490788
    Happy Linuxing

  10. #10
    Linux Guru
    Join Date
    Nov 2007
    Posts
    1,695
    LinuxForums Rules

    Forum Etiquette (Simplified)

    Search the forums and search engines for solutions first.
    Wikipedia - Open Source Software

    Introduction

    Open source doesn't just mean access to the source code.

    The distribution terms of open-source software must comply with the following criteria:

    1. Free Redistribution

    The license shall not restrict any party from selling or giving away the software as a component of an aggregate software distribution containing programs from several different sources. The license shall not require a royalty or other fee for such sale.

    2. Source Code

    The program must include source code, and must allow distribution in source code as well as compiled form. Where some form of a product is not distributed with source code, there must be a well-publicized means of obtaining the source code for no more than a reasonable reproduction cost preferably, downloading via the Internet without charge. The source code must be the preferred form in which a programmer would modify the program. Deliberately obfuscated source code is not allowed. Intermediate forms such as the output of a preprocessor or translator are not allowed.

    3. Derived Works

    The license must allow modifications and derived works, and must allow them to be distributed under the same terms as the license of the original software.

    4. Integrity of The Author's Source Code

    The license may restrict source-code from being distributed in modified form only if the license allows the distribution of "patch files" with the source code for the purpose of modifying the program at build time. The license must explicitly permit distribution of software built from modified source code. The license may require derived works to carry a different name or version number from the original software.

    5. No Discrimination Against Persons or Groups

    The license must not discriminate against any person or group of persons.

    6. No Discrimination Against Fields of Endeavor

    The license must not restrict anyone from making use of the program in a specific field of endeavor. For example, it may not restrict the program from being used in a business, or from being used for genetic research.

    7. Distribution of License

    The rights attached to the program must apply to all to whom the program is redistributed without the need for execution of an additional license by those parties.

    8. License Must Not Be Specific to a Product

    The rights attached to the program must not depend on the program's being part of a particular software distribution. If the program is extracted from that distribution and used or distributed within the terms of the program's license, all parties to whom the program is redistributed should have the same rights as those that are granted in conjunction with the original software distribution.

    9. License Must Not Restrict Other Software

    The license must not place restrictions on other software that is distributed along with the licensed software. For example, the license must not insist that all other programs distributed on the same medium must be open-source software.

    10. License Must Be Technology-Neutral

    No provision of the license may be predicated on any individual technology or style of interface.

Page 1 of 2 1 2 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...