2N/A * The contents of this file are subject to the terms of the 2N/A * Common Development and Distribution License (the "License"). 2N/A * You may not use this file except in compliance with the License. 2N/A * See the License for the specific language governing permissions 2N/A * and limitations under the License. 2N/A * When distributing Covered Code, include this CDDL HEADER in each 2N/A * If applicable, add the following below this CDDL HEADER, with the 2N/A * fields enclosed by brackets "[]" replaced with your own identifying 2N/A * information: Portions Copyright [yyyy] [name of copyright owner] 2N/A * Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved. 2N/A * This function returns a fullpath based on the "dir" and "filepath" input 2N/A * - If the filepath specified does not start with a "/" and the directory 2N/A * is also given, prepend the directory to the filename. 2N/A * - If only dir or filepath is given, this function returns a copy of the 2N/A * - If the filepath is fully qualified already and the "dir" is also 2N/A * given, return NULL to indicate an error. 2N/A * This function converts the input string to the value of time 2N/A * - If the input string is NULL, return zero second. 2N/A * - The input string needs to be in the form of: 2N/A * number-second(s), number-minute(s), number-hour(s) or 2N/A * memcmp_pad_max() is a specialized version of memcmp() which 2N/A * compares two pieces of data up to a maximum length. If the 2N/A * the two data match up the maximum length, they are considered 2N/A * matching. Trailing blanks do not cause the match to fail if 2N/A * one of the data is shorted. Note that we really do mean just ' ' 2N/A * not isspace(3C), as required by PKCS#11. 2N/A * Examples of matches: 2N/A * "Number One | X" (X is beyond maximum length) 2N/A * Examples of mismatches: 2N/A /* No point in comparing anything beyond max_sz */ 2N/A /* Find shorter of the two data. */ 2N/A }
else {
/* d1_len > d2_len */ 2N/A /* Have a match in the shortest length of data? */ 2N/A /* If the rest of longer data is nulls or blanks, call it a match. */