diff --git a/strtoarr.py b/strtoarr.py index 5f3198d..b5f0163 100755 --- a/strtoarr.py +++ b/strtoarr.py @@ -3,7 +3,7 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. -#!/usr/bin/python3 + ## # @file # @brief File to create string arrays @@ -19,7 +19,7 @@ import sys import os -inString = str(sys.argv[1]); +inString = str(sys.argv[1]) print("static const char {0}[{1}] = {{ ".format(sys.argv[2], len(inString)), end='') for letter in inString[:-1]: @@ -27,6 +27,5 @@ for letter in inString[:-1]: print("{0:#x}, ".format(p), end='') p = ord(inString[-1]) -print("{0:#x} ".format(int(p)), end='') -print("}; // " + inString) -print("static const uint8_t {0}_len = {1};".format(sys.argv[2], len(inString))) +print("{0:#x} ".format(int(p)) + "}; // " + inString) +print("static const uint8_t {0}_len = {1};".format(sys.argv[2], len(inString))) \ No newline at end of file