History log of /haiku/src/bin/addattr/main.cpp
Revision Date Author Comments
# d113c00b 23-Nov-2018 Augustin Cavalier <waddlesplash@gmail.com>

Remove more HOST_PLATFORM_SUNOS cruft.


# 7beac31f 27-Jan-2016 Pete Goodeve <pete.goodeve@computer.org>

addattr: Fix some deficiencies.

The addattr didn't quite match its help text, wrt the kinds of values one can
use for type codes. Aside from the list of named types (which isn't actually
quite complete compared to the choices in the source) the help said one can
enter "numeric values", and gives both hex and decimal examples.

However, trying a hex value didn't work -- only decimal numbers were accepted.
This turned out to be because the sscanf format option is "%u" (actually
B_SCNu32) which only handles decimal. It has to be B_SCNi32 (which means it
would be allowed to enter a negative value -- just not very sensible...) The
other example entry given is " 'ABCD' ", which apparently is meant to indicate
that one can enter 'FourCC' direct type-code representations, but of course
that wouldn't work as shown because the shell strips off the quotes. Escaping
the quotes -- \'ABCD\' -- or adding a second layer -- "'ABCD'" -- does work
but is not obvious. (I can't think of any other command line that requires
such a convention.)

I have added another option: "-c ABCD". The current way can
still work, but the new option should be fairly evident to anyone.

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
Fixes #12562.


# 78c9dabd 13-Mar-2015 Axel Dörfler <axeld@pinc-software.de>

addattr: added support for B_TIME_TYPE.

* Using parsedate().


# 06732c7c 12-Mar-2015 Axel Dörfler <axeld@pinc-software.de>

addattr: minor cleanup.


# 63245d99 02-Aug-2010 Joachim Seemer <humdingerb@googlemail.com>

Added the type 'icon' to the help text of addattr.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37848 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 98dc4f9c 01-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Added "icon" type for adding icons (ie. B_VECTOR_ICON_TYPE).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37830 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d293cd2c 10-May-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Andreas Faerber to work around the missing
definition of __progname on Solaris. Thanks, closes ticket #5697.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36783 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b54538cc 08-May-2010 Jérôme Duval <korli@users.berlios.de>

* use getopt() for addattr
* cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36747 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf844822 24-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added B_PRIdTIME and B_PRIiTIME macros (for time_t).
* Added FSSH_[S]SIZE_MAX to headers/private/fs_shell/fssh_types.h.
* Fixed various 64 bit compiler warnings. Nothing too serious, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34241 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b20dbc8 30-May-2009 Jérôme Duval <korli@users.berlios.de>

addattr can now add attributes to directories and symlinks


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30923 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 684f9b91 23-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Now reports a proper error when the attribute file is empty (instead of just
printing the usage info).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22984 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2384e640 05-Jul-2006 Axel Dörfler <axeld@pinc-software.de>

"addattr" now also recognizes "raw" as a type.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18043 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcdd9a92 05-Jul-2006 Axel Dörfler <axeld@pinc-software.de>

* Added option -f that allows you to read the attribute data from a file.
* No longer exits with error in case you specified "--help" or "-h".
* Now accepts typecodes in "'ABCD'" format as well.
* Can now also be built for BeOS compatible targets.
* Improved parameter check.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18038 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 758b1d0e 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 17049c45 18-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Moved bin/ directory out of apps/.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11909 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 78c9dabd9e6a969385b9c1346c4918027b63d1cf 13-Mar-2015 Axel Dörfler <axeld@pinc-software.de>

addattr: added support for B_TIME_TYPE.

* Using parsedate().


# 06732c7c7183ff41620a802729d90605ba46d567 12-Mar-2015 Axel Dörfler <axeld@pinc-software.de>

addattr: minor cleanup.


# 63245d99eae10ed7bc04cf1595289336bfd4d0f6 02-Aug-2010 Joachim Seemer <humdingerb@googlemail.com>

Added the type 'icon' to the help text of addattr.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37848 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 98dc4f9c65bb968c72b43f188032ac937e909a22 01-Aug-2010 Axel Dörfler <axeld@pinc-software.de>

* Added "icon" type for adding icons (ie. B_VECTOR_ICON_TYPE).


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37830 a95241bf-73f2-0310-859d-f6bbb57e9c96


# d293cd2cf01d0ddd2ded6a416d14be7c492e2ebf 10-May-2010 Stephan Aßmus <superstippi@gmx.de>

Patch by Andreas Faerber to work around the missing
definition of __progname on Solaris. Thanks, closes ticket #5697.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36783 a95241bf-73f2-0310-859d-f6bbb57e9c96


# b54538cc66fc51f8b03d7e84ea368e97d33564de 08-May-2010 Jérôme Duval <korli@users.berlios.de>

* use getopt() for addattr
* cleanup


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36747 a95241bf-73f2-0310-859d-f6bbb57e9c96


# cf844822db58eed3db11f93243e38503eb1a4b91 24-Nov-2009 Ingo Weinhold <ingo_weinhold@gmx.de>

* Added B_PRIdTIME and B_PRIiTIME macros (for time_t).
* Added FSSH_[S]SIZE_MAX to headers/private/fs_shell/fssh_types.h.
* Fixed various 64 bit compiler warnings. Nothing too serious, though.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@34241 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 8b20dbc8a77c04cb973b6bc853ed4cb76f2e5fc7 30-May-2009 Jérôme Duval <korli@users.berlios.de>

addattr can now add attributes to directories and symlinks


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@30923 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 684f9b91a858576650dd817533232e77a2d8060d 23-Nov-2007 Axel Dörfler <axeld@pinc-software.de>

* Now reports a proper error when the attribute file is empty (instead of just
printing the usage info).
* Minor cleanup.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@22984 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 2384e64025d80265e4744364de58c6a7ae0c4f4e 05-Jul-2006 Axel Dörfler <axeld@pinc-software.de>

"addattr" now also recognizes "raw" as a type.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18043 a95241bf-73f2-0310-859d-f6bbb57e9c96


# fcdd9a92b7f41fb747bf9980b08b7a3da97944f3 05-Jul-2006 Axel Dörfler <axeld@pinc-software.de>

* Added option -f that allows you to read the attribute data from a file.
* No longer exits with error in case you specified "--help" or "-h".
* Now accepts typecodes in "'ABCD'" format as well.
* Can now also be built for BeOS compatible targets.
* Improved parameter check.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@18038 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 758b1d0e05fe1042cce6e00d194a147802d4f9be 12-Nov-2005 Ingo Weinhold <ingo_weinhold@gmx.de>

Fixes that make Haiku build with gcc 4. Mainly out of the following
categories:
* Missing includes (like <stdlib.h> and <string.h>).
* Linking against $(TARGET_LIBSTDC++) instead of libstdc++.r4.so.
* Local variables shadowing parameters.
* Default parameters in function definitions (as opposed to function
declarations).
* All C++ stuff (nothrow, map, set, vector, min, max,...) must be imported
explicitly from the std:: namespace now.
* "new (sometype)[...]" must read "new sometype[...]", even if sometype is
something like "const char *".
* __FUNCTION__ is no longer a string literal (but a string expression), i.e.
'printf(__FUNCTION__ ": ...\n")' is invalid code.
* A type cast results in a non-lvalue. E.g. "(char *)buffer += bytes"
is an invalid expression.
* "friend class SomeClass" only works when SomeClass is known before.
Otherwise the an inner class with that name is considered as friend.
gcc 4 is much pickier about scopes.
* gcc 4 is generally stricter with respect to type conversions in C.



git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14878 a95241bf-73f2-0310-859d-f6bbb57e9c96


# 17049c451a91f427aec94b944b75876b611103e7 18-Mar-2005 Axel Dörfler <axeld@pinc-software.de>

Moved bin/ directory out of apps/.


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@11909 a95241bf-73f2-0310-859d-f6bbb57e9c96