• Coding question

    From Plt@VERT/MB to All on Sat Nov 10 23:06:57 2018
    I was looking at some code and I am trying to figure out what does the 770 mean on the following open statement?

    fopen var_001 770 "%/ntelval.tmp

    What does 770 do?

    Thanks

    ---
    � Synchronet � sbbs.dynu.net 2025
  • From Plt@VERT/MB to All on Sat Nov 10 23:33:51 2018
    Re: Coding question
    By: Plt to All on Sat Nov 10 2018 23:06:57

    I was looking at some code and I am trying to figure out what does the 770

    I found the answer to my question.

    ---
    � Synchronet � sbbs.dynu.net 2025
  • From MRO@VERT/BBSESINF to Plt on Sat Nov 10 23:42:49 2018
    Re: Coding question
    By: Plt to All on Sat Nov 10 2018 11:33 pm

    Re: Coding question
    By: Plt to All on Sat Nov 10 2018 23:06:57

    I was looking at some code and I am trying to figure out what does the 770

    I found the answer to my question.



    unbaja creates random designations for stuff that is lost when it decompiles. atleast i think that's why.

    so if i had a variable that was named BUTT, when decompiled it would give
    it another designation
    ---
    � Synchronet � ::: BBSES.info - free BBS services :::
  • From Nelgin@VERT/EOTLBBS to MRO on Sun Nov 11 18:15:44 2018
    MRO wrote:
    Re: Coding question
    By: Plt to All on Sat Nov 10 2018 11:33 pm

    Re: Coding question
    By: Plt to All on Sat Nov 10 2018 23:06:57

    I was looking at some code and I am trying to figure out what does the
    770

    I found the answer to my question.



    unbaja creates random designations for stuff that is lost when it decompiles.
    atleast i think that's why.

    so if i had a variable that was named BUTT, when decompiled it would give
    it another designation
    ---
    � Synchronet � ::: BBSES.info - free BBS services :::

    Probably more to do with the mode the file is created with. 770 = rwx to
    both owner and group and no permissions to other.

    ---
    � Synchronet � End Of The Line BBS - endofthelinebbs.com
  • From MRO@VERT/BBSESINF to Nelgin on Sun Nov 11 22:31:47 2018
    Re: Re: Coding question
    By: Nelgin to MRO on Sun Nov 11 2018 06:15 pm

    MRO wrote:
    Re: Coding question
    By: Plt to All on Sat Nov 10 2018 11:33 pm

    Re: Coding question
    By: Plt to All on Sat Nov 10 2018 23:06:57

    I was looking at some code and I am trying to figure out what does the
    770

    I found the answer to my question.



    unbaja creates random designations for stuff that is lost when it decompiles.
    atleast i think that's why.

    so if i had a variable that was named BUTT, when decompiled it would give it another designation
    ---
    ■ Synchronet ■ ::: BBSES.info - free BBS services :::

    Probably more to do with the mode the file is created with. 770 = rwx to both owner and group and no permissions to other.


    well it's an undocumented feature then.

    *FOPEN <int_var> <#> <"str" or str_var> FILE_IO.INC
    args: handle access path_and_filename *------------------------------------------
    This function opens or creates a disk file (path_and_filename) for read and/or write access. This function is the Baja equivalent of the standard C fopen() function. No file I/O operations can be performed on a file until it has been opened with this function. The 'handle' argument must be a defined integer variable name. The 'access' argument is the requested open access. The access flags (defined in FILE_IO.INC) are:

    Access Flag Description
    ~~~~~~~~~~~ ~~~~~~~~~~~
    O_RDONLY Read Only
    O_WRONLY Write Only
    O_RDWR Read and write
    O_CREAT Create (create if doesn't exist)
    O_APPEND Append (writes to end of file)
    O_TRUNC Truncate (truncates file to 0 bytes automatically)
    O_EXCL Exclusive (only open/create if file doesn't exist)
    O_DENYNONE Deny None (shareable, for use with record locking)
    ---
    � Synchronet � ::: BBSES.info - free BBS services :::
  • From Digital Man@VERT to MRO on Sun Nov 11 21:04:05 2018
    Re: Re: Coding question
    By: MRO to Nelgin on Sun Nov 11 2018 10:31 pm

    Re: Re: Coding question
    By: Nelgin to MRO on Sun Nov 11 2018 06:15 pm

    MRO wrote:
    Re: Coding question
    By: Plt to All on Sat Nov 10 2018 11:33 pm

    Re: Coding question
    By: Plt to All on Sat Nov 10 2018 23:06:57

    I was looking at some code and I am trying to figure out what does the
    770

    I found the answer to my question.



    unbaja creates random designations for stuff that is lost when it decompiles.
    atleast i think that's why.

    so if i had a variable that was named BUTT, when decompiled it would give it another designation
    ---
    ■ Synchronet ■ ::: BBSES.info - free BBS services :::

    Probably more to do with the mode the file is created with. 770 = rwx to both owner and group and no permissions to other.


    well it's an undocumented feature then.

    *FOPEN <int_var> <#> <"str" or str_var> FILE_IO.INC
    args: handle access path_and_filename *------------------------------------------
    This function opens or creates a disk file (path_and_filename) for read and/or write access. This function is the Baja equivalent of the standard C fopen() function. No file I/O operations can be performed on a file until it has been opened with this function. The 'handle' argument must be a defined integer variable name. The 'access' argument is the requested open access. The access flags (defined in FILE_IO.INC) are:

    Access Flag Description
    ~~~~~~~~~~~ ~~~~~~~~~~~
    O_RDONLY Read Only
    O_WRONLY Write Only
    O_RDWR Read and write
    O_CREAT Create (create if doesn't exist)
    O_APPEND Append (writes to end of file)
    O_TRUNC Truncate (truncates file to 0 bytes automatically)
    O_EXCL Exclusive (only open/create if file doesn't exist) O_DENYNONE Deny None (shareable, for use with record locking)

    It's the integer value of the programmer's specified file access. i.e. 770 is the combintaino of some of the O_* flags. It's documented.

    digital man

    This Is Spinal Tap quote #29:
    I find lost luggage. I locate mandolin strings in the middle of Austin!
    Norco, CA WX: 61.1�F, 10.0% humidity, 2 mph SW wind, 0.00 inches rain/24hrs
    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From Nelgin@VERT/EOTLBBS to MRO on Mon Nov 12 00:27:59 2018
    MRO wrote:
    well it's an undocumented feature then.

    I was guessing, it looked like a file mode. I never claimed to be an expert.

    ---
    � Synchronet � End Of The Line BBS - endofthelinebbs.com
  • From MRO@VERT/BBSESINF to Digital Man on Tue Nov 13 21:35:21 2018
    Re: Re: Coding question
    By: Digital Man to MRO on Sun Nov 11 2018 09:04 pm

    It's the integer value of the programmer's specified file access. i.e. 770 is the combintaino of some of the O_* flags. It's documented.


    is it in the baja docs?
    ---
    � Synchronet � ::: BBSES.info - free BBS services :::
  • From Digital Man@VERT to MRO on Tue Nov 13 19:58:08 2018
    Re: Re: Coding question
    By: MRO to Digital Man on Tue Nov 13 2018 09:35 pm

    Re: Re: Coding question
    By: Digital Man to MRO on Sun Nov 11 2018 09:04 pm

    It's the integer value of the programmer's specified file access. i.e. 770 is the combintaino of some of the O_* flags. It's documented.


    is it in the baja docs?

    Yes: http://synchro.net/docs/baja.html#FileI/OFunctions

    The actual O_* flag integer values are defined in exec/file_io.inc

    digital man

    Synchronet/BBS Terminology Definition #5:
    BBS = Bulletin Board System
    Norco, CA WX: 62.3�F, 14.0% humidity, 0 mph WSW wind, 0.00 inches rain/24hrs ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From MRO@VERT/BBSESINF to Digital Man on Wed Nov 14 16:09:30 2018
    Re: Re: Coding question
    By: Digital Man to MRO on Tue Nov 13 2018 07:58 pm

    Re: Re: Coding question
    By: MRO to Digital Man on Tue Nov 13 2018 09:35 pm

    Re: Re: Coding question
    By: Digital Man to MRO on Sun Nov 11 2018 09:04 pm

    It's the integer value of the programmer's specified file access. i.e. 770 is the combintaino of some of the O_* flags. It's documented.


    is it in the baja docs?

    Yes: http://synchro.net/docs/baja.html#FileI/OFunctions

    The actual O_* flag integer values are defined in exec/file_io.inc


    i'm not seeing any 770
    so you are saying exclusive+truncation+create = 700 ?
    i didnt know it could be used that way
    ---
    � Synchronet � ::: BBSES.info - free BBS services :::
  • From Digital Man@VERT to MRO on Wed Nov 14 20:41:06 2018
    Re: Re: Coding question
    By: MRO to Digital Man on Wed Nov 14 2018 04:09 pm

    is it in the baja docs?

    Yes: http://synchro.net/docs/baja.html#FileI/OFunctions

    The actual O_* flag integer values are defined in exec/file_io.inc

    i'm not seeing any 770

    You just add or bit-wise-or the value together.

    so you are saying exclusive+truncation+create = 700 ?

    Right.

    i didnt know it could be used that way

    Same as *nix permissions/mask values.

    digital man

    Synchronet/BBS Terminology Definition #23:
    DSZ = DOS Send ZMODEM (by Chuck Forsberg)
    Norco, CA WX: 63.3�F, 17.0% humidity, 1 mph SW wind, 0.00 inches rain/24hrs
    ---
    � Synchronet � Vertrauen � Home of Synchronet � [vert/cvs/bbs].synchro.net
  • From John Guillory@VERT/MAINLINE to Digital Man on Fri Nov 16 00:04:37 2018
    Re: Re: Coding question
    By: Digital Man to MRO on Wed Nov 14 2018 08:41 pm

    i'm not seeing any 770
    You just add or bit-wise-or the value together.
    so you are saying exclusive+truncation+create = 700 ?
    Right.
    i didnt know it could be used that way
    Same as *nix permissions/mask values.
    digital man
    If I'm not mistakened, the 770 is base 8, or Octognal representation.
    Just a FYI to the other poster....

    ---
    � Synchronet � KF5QEO's Shack -- kingcoder.net
  • From MRO@VERT/BBSESINF to John Guillory on Thu Nov 15 20:08:15 2018
    Re: Re: Coding question
    By: John Guillory to Digital Man on Fri Nov 16 2018 12:04 am

    Re: Re: Coding question
    By: Digital Man to MRO on Wed Nov 14 2018 08:41 pm

    i'm not seeing any 770
    You just add or bit-wise-or the value together.
    so you are saying exclusive+truncation+create = 700 ?
    Right.
    i didnt know it could be used that way
    Same as *nix permissions/mask values.
    digital man
    If I'm not mistakened, the 770 is base 8, or Octognal representation.
    Just a FYI to the other poster....



    i get all that. i just didnt know you could use it with baja.
    ---
    � Synchronet � ::: BBSES.info - free BBS services :::