Refactor marshall utilities out, some clean-up, and prepare iOS/macOS project for libjson-c
This commit is contained in:
@@ -259,11 +259,12 @@ mpw() {
|
||||
(( mpw_color )) && CFLAGS+=( -DMPW_COLOR ) LDFLAGS+=( -l"curses" )
|
||||
(( mpw_json )) && CFLAGS+=( -DMPW_JSON ) LDFLAGS+=( -l"json-c" )
|
||||
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-algorithm.c -o core/mpw-algorithm.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-types.c -o core/mpw-types.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-util.c -o core/mpw-util.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-marshall.c -o core/mpw-marshall.o
|
||||
cc "${CFLAGS[@]}" "$@" "core/mpw-algorithm.o" "core/mpw-types.o" "core/mpw-util.o" "core/mpw-marshall.o" \
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-algorithm.c -o core/mpw-algorithm.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-types.c -o core/mpw-types.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-util.c -o core/mpw-util.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-marshall-util.c -o core/mpw-marshall-util.o
|
||||
cc "${CFLAGS[@]}" "$@" -c core/mpw-marshall.c -o core/mpw-marshall.o
|
||||
cc "${CFLAGS[@]}" "$@" "core/mpw-algorithm.o" "core/mpw-types.o" "core/mpw-util.o" "core/mpw-marshall-util.o" "core/mpw-marshall.o" \
|
||||
"${LDFLAGS[@]}" "cli/mpw-cli.c" -o "mpw"
|
||||
echo "done! Now run ./install or use ./mpw"
|
||||
}
|
||||
|
@@ -240,7 +240,7 @@ int main(int argc, char *const argv[]) {
|
||||
masterPassword = strdup( user->masterPassword );
|
||||
algorithmVersion = user->algorithm;
|
||||
siteType = user->defaultType;
|
||||
for (int s = 0; s < user->sites_count; ++s) {
|
||||
for (size_t s = 0; s < user->sites_count; ++s) {
|
||||
MPMarshalledSite site = user->sites[s];
|
||||
if (strcmp( siteName, site.name ) == 0) {
|
||||
siteType = site.type;
|
||||
|
Reference in New Issue
Block a user