/usr/share/psychtoolbox-3/PsychOneliners/hexstr.m is in psychtoolbox-3-common 3.0.11.20131230.dfsg1-1build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | function str=hexstr(n)
% str=hexstr(n)
% Convert any number to a hex string representing the lower 32 bits,
% emulating the C format %lx for a long. This works with both positive and
% negative numbers, unlike the MATLAB format %x (and %tx and %bx) which
% can't deal with negative numbers.
%
% fprintf('Error 0x%s.\n',hexstr(err));
%
% See also DEC2HEX, FPRINTF.
% 4/24/05 dgp Wrote it.
h=dec2hex(n+2^33);
str=h(end-7:end);
|