#
# Package: Reference Standard M
# File:    rsm/etc/magic
# Summary: Magic file for Reference Standard M
#
# David Wicksell <dlw@linux.com>
# Copyright © 2020-2024 Fourth Watch Software LC
#
# This program is free software: you can redistribute it and/or modify it
# under the terms of the GNU Affero General Public License (AGPL) as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
# License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see https://www.gnu.org/licenses/.
#
# SPDX-FileCopyrightText:  © 2020 David Wicksell <dlw@linux.com>
# SPDX-License-Identifier: AGPL-3.0-or-later
#
#
# If you want to install this for a single user, copy this file to $HOME/.magic.
# If $HOME/.magic already exists, append the non-comment contents of this file
# to it. You may optionally compile it with:
#   cd $HOME && file -C -m $HOME/.magic
#
# If you want to install this for every user, copy this file to /etc/magic. If
# /etc/magic already has magic entries in it, append the non-comment contents of
# this file to it.

0       long       4155766917U              Reference Standard M database file
!:mime  application/x-rsm-database
>24     leshort    <256                     \b, version %u, little endian
>24     beshort    <256                     \b, version %u, big endian

0       long       4155766916U              Reference Standard M journal file
!:mime  application/x-rsm-journal
>12     leshort    12                       \b, version 2, little endian
>12     beshort    12                       \b, version 2, big endian
>12     leshort    8                        \b, version 1, little endian
>12     beshort    8                        \b, version 1, big endian

0       regex/1lc  \\^\\$(routine\\(|r\\()  Reference Standard M source text
!:mime  text/x-rsm
