For faster navigation, this Iframe is preloading the Wikiwand page for Патч.

Патч

Матеріал з Вікіпедії — вільної енциклопедії.

Патч або латка (англ. Patch) — інформація, призначена для автоматизованого внесення певних змін в комп'ютерні файли.

Виправлення може застосовуватися до файлів вже встановленої програми, або до її початкових кодів. Сюди входить виправлення помилок, зміна зовнішнього вигляду, поліпшення ергономічності або продуктивності програм, а також будь-які інші зміни, які розробник побажав зробити.

Розмір патчів може варіюватися від декількох кілобайт до сотень мегабайт. Зокрема, дуже великими патчі можуть бути при зміні або заміні бінарних даних, таких як файли з графікою і звуком (часто зустрічаються в комп'ютерних іграх). Тим не менш, великий розмір може бути викликаний і численністю внесених змін. При цьому слова «патч», «латка» зазвичай використовуються для позначення невеликих виправлень окремих програм. Великі патчі, що значно змінюють або оновлюють систему або набір програм називають пакетом оновлень (Service Pack).

Патч для внесення змін в початковий код зазвичай має формат текстового файлу.

В ОС UNIX та Linux патч може бути отриманий командою diff[1], застосований командою patch[2].

Приклад

[ред. | ред. код]

Первинний файл:

int main() {
    printf("Hello");
}

Вміст файла патчу:

2c2,3
< printf("Hello");
---
> printf("Hello\n");
> return 0;

Файл після накладання патчу:

int main() {
    printf("Hello\n");
    return 0;
}

Патч в культурі

[ред. | ред. код]

Примітки

[ред. | ред. код]


{{bottomLinkPreText}} {{bottomLinkText}}
Патч
Listen to this article

This browser is not supported by Wikiwand :(
Wikiwand requires a browser with modern capabilities in order to provide you with the best reading experience.
Please download and use one of the following browsers:

This article was just edited, click to reload
This article has been deleted on Wikipedia (Why?)

Back to homepage

Please click Add in the dialog above
Please click Allow in the top-left corner,
then click Install Now in the dialog
Please click Open in the download dialog,
then click Install
Please click the "Downloads" icon in the Safari toolbar, open the first download in the list,
then click Install
{{::$root.activation.text}}

Install Wikiwand

Install on Chrome Install on Firefox
Don't forget to rate us

Tell your friends about Wikiwand!

Gmail Facebook Twitter Link

Enjoying Wikiwand?

Tell your friends and spread the love:
Share on Gmail Share on Facebook Share on Twitter Share on Buffer

Our magic isn't perfect

You can help our automatic cover photo selection by reporting an unsuitable photo.

This photo is visually disturbing This photo is not a good choice

Thank you for helping!


Your input will affect cover photo selection, along with input from other users.

X

Get ready for Wikiwand 2.0 🎉! the new version arrives on September 1st! Don't want to wait?