1% fh = export_headerfile_open(headerfn, corp) 2% 3% Inputs 4% headerfn - File name of exported header file 5% corp - optional corporation name, defaults to Intel Corporation 6% 7% Outputs 8% fh - file handle 9 10% SPDX-License-Identifier: BSD-3-Clause 11% 12% Copyright(c) 2022 Intel Corporation. All rights reserved. 13 14function fh = export_headerfile_open(headerfn, corp) 15 16 if nargin < 2 17 corp = 'Intel Corporation'; 18 end 19 20 fh = fopen(headerfn, 'w'); 21 if fh < 0 22 error('Could not open file'); 23 end 24 fprintf(fh, '/* SPDX-License-Identifier: BSD-3-Clause\n'); 25 fprintf(fh, ' *\n'); 26 fprintf(fh, ' * Copyright(c) %s %s. All rights reserved.\n', ... 27 datestr(now, 'yyyy'), corp); 28 fprintf(fh, ' */\n\n'); 29end 30