Skip to main content
  • Home
  • login
  • Browse the archive

    swh mirror partner logo
swh logo
SoftwareHeritage
Software
Heritage
Mirror
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

Raw File
Permalink

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
content badge Iframe embedding
swh:1:cnt:be0453e3228f22a9cddfba315748744628881980
#! /bin/sh

HERE=`dirname $0`

for f in "$@"; do
    # It's worth nothing that 'openssl sha256 -r' assumes that all input
    # is binary.  This isn't quite true, and we know better, so we convert
    # the '*stdin' marker to the filename preceded by a space.  See the
    # sha1sum manual for a specification of the format.
    case "$f" in
        *.c | *.c.in | *.h | *.h.in | *.inc)
            cat "$f" \
                | $HERE/lang-compress.pl 'C' \
                | unifdef -DFIPS_MODULE=1 \
                | openssl sha256 -r \
                | sed -e "s| \\*stdin|  $f|"
            ;;
        *.pl )
            cat "$f" \
                | $HERE/lang-compress.pl 'perl' \
                | openssl sha256 -r \
                | sed -e "s| \\*stdin|  $f|"
            ;;
        *.S )
            cat "$f" \
                | $HERE/lang-compress.pl 'S' \
                | openssl sha256 -r \
                | sed -e "s| \\*stdin|  $f|"
            ;;
    esac
done

ENEA — Copyright (C), ENEA. License: GNU AGPLv3+.
Legal notes  ::  JavaScript license information ::  Web API

back to top