Lines Matching +full:per +full:- +full:string

1 // SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0
4 * Module Name: exconcat - Concatenate-type AML operators
6 * Copyright (C) 2000 - 2023, Intel Corp.
27 * PARAMETERS: operand0 - First source object
28 * operand1 - Second source object
29 * actual_return_desc - Where to place the return object
30 * walk_state - Current walk state
34 * DESCRIPTION: Concatenate two objects with the ACPI-defined conversion
37 * Per the ACPI spec (up to 6.1), Concatenate only supports Integer,
38 * String, and Buffer objects. However, we support all objects here
40 * and the Printf/Fprintf macros. The extension returns a string
65 switch (operand0->common.type) { in acpi_ex_do_concatenate()
70 operand0_type = operand0->common.type; in acpi_ex_do_concatenate()
75 /* For all other types, get the "object type" string */ in acpi_ex_do_concatenate()
90 switch (operand1->common.type) { in acpi_ex_do_concatenate()
95 operand1_type = operand1->common.type; in acpi_ex_do_concatenate()
100 /* For all other types, get the "object type" string */ in acpi_ex_do_concatenate()
117 * guaranteed to be either Integer/String/Buffer by the operand in acpi_ex_do_concatenate()
141 /* Other types have already been converted to string */ in acpi_ex_do_concatenate()
159 operand0->common.type)); in acpi_ex_do_concatenate()
177 * (Both are Integer, String, or Buffer), and we can now perform in acpi_ex_do_concatenate()
180 * There are three cases to handle, as per the ACPI spec: in acpi_ex_do_concatenate()
183 * 2) Two Strings concatenated to produce a new String in acpi_ex_do_concatenate()
200 buffer = (char *)return_desc->buffer.pointer; in acpi_ex_do_concatenate()
204 memcpy(buffer, &operand0->integer.value, in acpi_ex_do_concatenate()
210 &local_operand1->integer.value, in acpi_ex_do_concatenate()
216 /* Result of two Strings is a String */ in acpi_ex_do_concatenate()
219 local_operand0-> in acpi_ex_do_concatenate()
220 string.length + in acpi_ex_do_concatenate()
221 local_operand1-> in acpi_ex_do_concatenate()
222 string.length)); in acpi_ex_do_concatenate()
228 buffer = return_desc->string.pointer; in acpi_ex_do_concatenate()
232 strcpy(buffer, local_operand0->string.pointer); in acpi_ex_do_concatenate()
233 strcat(buffer, local_operand1->string.pointer); in acpi_ex_do_concatenate()
241 operand0->buffer. in acpi_ex_do_concatenate()
243 local_operand1-> in acpi_ex_do_concatenate()
250 buffer = (char *)return_desc->buffer.pointer; in acpi_ex_do_concatenate()
254 memcpy(buffer, operand0->buffer.pointer, in acpi_ex_do_concatenate()
255 operand0->buffer.length); in acpi_ex_do_concatenate()
256 memcpy(buffer + operand0->buffer.length, in acpi_ex_do_concatenate()
257 local_operand1->buffer.pointer, in acpi_ex_do_concatenate()
258 local_operand1->buffer.length); in acpi_ex_do_concatenate()
266 operand0->common.type)); in acpi_ex_do_concatenate()
289 * PARAMETERS: obj_desc - Object to be converted
290 * return_desc - Where to place the return object
294 * DESCRIPTION: Convert an object of arbitrary type to a string object that
307 type_string = acpi_ut_get_type_name(obj_desc->common.type); in acpi_ex_convert_to_object_type_string()
314 strcpy(return_desc->string.pointer, "["); in acpi_ex_convert_to_object_type_string()
315 strcat(return_desc->string.pointer, type_string); in acpi_ex_convert_to_object_type_string()
316 strcat(return_desc->string.pointer, " Object]"); in acpi_ex_convert_to_object_type_string()
326 * PARAMETERS: operand0 - First source object
327 * operand1 - Second source object
328 * actual_return_desc - Where to place the return object
329 * walk_state - Current walk state
356 * Note2: zero-length buffers are allowed; treated like one end_tag in acpi_ex_concat_template()
366 length0 = ACPI_PTR_DIFF(end_tag, operand0->buffer.pointer); in acpi_ex_concat_template()
375 length1 = ACPI_PTR_DIFF(end_tag, operand1->buffer.pointer); in acpi_ex_concat_template()
392 new_buf = return_desc->buffer.pointer; in acpi_ex_concat_template()
393 memcpy(new_buf, operand0->buffer.pointer, length0); in acpi_ex_concat_template()
394 memcpy(new_buf + length0, operand1->buffer.pointer, length1); in acpi_ex_concat_template()
398 new_buf[new_length - 1] = 0; in acpi_ex_concat_template()
399 new_buf[new_length - 2] = ACPI_RESOURCE_NAME_END_TAG | 1; in acpi_ex_concat_template()