I was looking at some code and I am trying to figure out what does the 770
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.
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 :::
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.
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)
well it's an undocumented feature then.
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.
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?
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
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
If I'm not mistakened, the 770 is base 8, or Octognal representation.i'm not seeing any 770You 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 waySame as *nix permissions/mask values.
digital man
Re: Re: Coding question
By: Digital Man to MRO on Wed Nov 14 2018 08:41 pm
If I'm not mistakened, the 770 is base 8, or Octognal representation.i'm not seeing any 770You 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 waySame as *nix permissions/mask values.
digital man
Just a FYI to the other poster....
Sysop: | Ree |
---|---|
Location: | Toronto, ON |
Users: | 2 |
Nodes: | 10 (0 / 10) |
Uptime: | 131:33:48 |
Calls: | 377 |
Calls today: | 2 |
Files: | 2 |
Messages: | 38,904 |